/* ==========================================================================
   Scenes / Storyboard Tool Styles
   Uses design tokens from variables.css exclusively.
   ========================================================================== */

/* --- Toolbar --- */
.scenes-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; gap: 8px;
}

.scenes-generate-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--color-accent);
  color: var(--color-base);
  border: none;
  border-radius: var(--radius-md, 8px);
  font-family: var(--font-ui);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.scenes-generate-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.scenes-generate-btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* --- Progress --- */
.scenes-progress {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 0;
}

.scenes-progress-msg {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted);
}

/* --- Scene Card --- */
.scene-card {
  background: var(--color-surface, #161b22);
  border: 1px solid var(--color-border, #30363d);
  border-radius: var(--radius-lg, 12px);
  padding: 16px;
  margin-bottom: 12px;
  transition: opacity 0.2s, border-color 0.2s;
}

.scene-card.dragging {
  opacity: 0.5;
  border-color: var(--color-accent);
}

.scene-card.drag-over {
  border-top: 2px solid var(--color-accent);
}

/* --- Scene Header --- */
.scene-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}

.scene-drag-handle {
  cursor: grab;
  color: var(--color-text-muted, #8b949e);
  padding: 4px;
  display: flex; align-items: center;
}

.scene-drag-handle:active { cursor: grabbing; }

.scene-number {
  min-width: 24px; text-align: center;
  background: var(--color-bg-tertiary, rgba(255,255,255,0.06));
  border-radius: var(--radius-sm, 4px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted);
  padding: 2px 6px;
  font-weight: 600;
}

.scene-title-input {
  flex: 1;
  border: none;
  font-weight: 600;
  font-size: var(--text-base, 1rem);
  background: transparent;
  color: var(--color-text-bright, #e6edf3);
  font-family: var(--font-ui);
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  outline: none;
}

.scene-title-input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* --- Scene Description & Notes --- */
.scene-desc-input,
.scene-notes-input {
  width: 100%;
  background: var(--color-bg-tertiary, rgba(255,255,255,0.04));
  color: var(--color-text-primary, #c9d1d9);
  border: 1px solid var(--color-border, #30363d);
  border-radius: var(--radius-sm, 4px);
  resize: vertical;
  padding: 8px;
  font-family: var(--font-ui);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
  margin-top: 8px;
  box-sizing: border-box;
}

.scene-notes-input {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, #8b949e);
}

.scene-desc-input:focus,
.scene-notes-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* --- Scene Images --- */
.scene-images {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}

.scene-image-thumb {
  width: 120px; height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.scene-image-thumb:hover {
  border-color: var(--color-border-strong, #484f58);
}

.scene-image-thumb.selected {
  border-color: var(--color-accent);
}

/* --- Scene Actions --- */
.scene-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}

.scene-improve-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  background: var(--color-surface, #161b22);
  border: 1px solid var(--color-border, #30363d);
  border-radius: var(--radius-md, 8px);
  color: var(--color-text, #c9d1d9);
  font-family: var(--font-ui);
  font-size: var(--text-xs, 0.75rem);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.scene-improve-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.scene-improve-btn.loading {
  opacity: 0.5; pointer-events: none;
}

.scene-delete-btn {
  display: inline-flex; align-items: center;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--color-border, #30363d);
  border-radius: var(--radius-sm, 4px);
  color: var(--color-text-muted, #8b949e);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.scene-delete-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* --- Slide Preview --- */
.slide-preview-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: var(--color-bg-tertiary, rgba(255,255,255,0.04));
  margin-top: 8px;
}

.slide-preview-iframe {
  width: 100%; height: 100%;
  border: none;
}

/* --- Theme Picker --- */
.slide-theme-picker {
  display: flex; gap: 8px; padding: 8px 0;
}

.slide-theme-btn {
  padding: 6px 16px;
  border: 1px solid var(--color-border, #30363d);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text, #c9d1d9);
  font-family: var(--font-ui);
  font-size: var(--text-sm, 0.875rem);
  cursor: pointer;
  transition: all var(--transition-fast, 150ms);
}

.slide-theme-btn:hover {
  border-color: var(--color-border-strong, #484f58);
}

.slide-theme-btn.active {
  background: var(--color-accent);
  color: var(--color-base, #0d1117);
  border-color: var(--color-accent);
}

/* --- Empty State --- */
.scenes-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-muted, #8b949e);
  font-size: var(--text-sm, 0.875rem);
}

/* --- Layout Override Dropdown --- */
.layout-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: var(--color-surface, #1a1a24);
  border: 1px solid var(--color-border-strong, rgba(255,255,255,0.16));
  border-radius: var(--radius-md, 10px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.3));
  z-index: var(--z-dropdown, 100);
  padding: 4px 0;
  display: none;
  margin-top: 4px;
}
.layout-dropdown.open { display: block; }
.layout-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-primary, #e6edf3);
  cursor: pointer;
  transition: background var(--transition-fast, 150ms);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  outline: none;
}
.layout-dropdown-item:hover,
.layout-dropdown-item:focus {
  background: var(--color-bg-tertiary, #22222e);
}
.layout-dropdown-item.active {
  font-weight: 600;
}
.layout-dropdown-item .layout-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .scene-images { gap: 6px; }
  .scene-image-thumb { width: 90px; height: 60px; }
  .slide-theme-picker { flex-wrap: wrap; }
}
