/* app/assets/stylesheets/content_blocks.css */

/* Sortable ghost class for drag and drop */
.sortable-ghost {
  opacity: 0.5;
  transform: rotate(2deg);
}

/* Turbo frame loading states */
turbo-frame[busy] {
  opacity: 0.7;
  pointer-events: none;
}

/* Content block transitions */
.content-block-item {
  transition: all 0.2s ease-in-out;
}

.content-block-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Form field animations */
.content-block-form .form-field {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading spinner for turbo frames */
.turbo-frame-loading {
  position: relative;
}

.turbo-frame-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
