/* ============================================================================
   PRESENTATION OUTLINE PREVIEW CARDS
   Editable outline UI for the Gamma-like outline-first flow
   ============================================================================ */

.outline-preview-card {
  background: var(--bg-secondary, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  max-width: 720px;
  margin: 8px auto;
  font-family: system-ui, -apple-system, sans-serif;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ── Header ── */
.outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
  gap: 12px;
}
.outline-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.outline-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.outline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0;
  line-height: 1.3;
}
.outline-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  margin: 2px 0 0;
}
.outline-intent-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Slide count ── */
.outline-slide-count {
  padding: 0 20px 10px;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
}

/* ── Slides list ── */
.outline-slides-list {
  padding: 0 12px;
  max-height: 400px;
  overflow-y: auto;
}

/* ── Individual slide row ── */
.outline-slide-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--bg-tertiary, #f8fafc);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: default;
}
.outline-slide-row:hover {
  background: var(--bg-hover, #f1f5f9);
  border-color: var(--border, #e2e8f0);
}
.outline-slide-row.outline-dragging {
  opacity: 0.4;
}
.outline-slide-row.outline-drag-over {
  border-color: var(--accent, #003366);
  box-shadow: 0 0 0 2px rgba(0,51,102,0.12);
}

/* ── Drag grip ── */
.outline-slide-grip {
  cursor: grab;
  color: var(--text-secondary, #94a3b8);
  padding: 4px 2px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.outline-slide-row:hover .outline-slide-grip {
  opacity: 1;
}

/* ── Slide number ── */
.outline-slide-num {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #003366);
  border-radius: 6px;
  flex-shrink: 0;
}

/* ── Slide info ── */
.outline-slide-info {
  flex: 1;
  min-width: 0;
}
.outline-slide-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
  transition: background 0.15s;
}
.outline-slide-title-input:focus {
  background: var(--bg-secondary, #fff);
  box-shadow: 0 0 0 2px rgba(0,51,102,0.15);
}
.outline-slide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.outline-slide-type-select {
  font-size: 0.7rem;
  color: var(--accent, #003366);
  background: rgba(0,51,102,0.06);
  border: 1px solid rgba(0,51,102,0.12);
  border-radius: 4px;
  padding: 1px 4px;
  cursor: pointer;
  outline: none;
}
.outline-slide-type-select:focus {
  border-color: var(--accent, #003366);
}
.outline-slide-desc {
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Slide action buttons ── */
.outline-slide-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.outline-slide-row:hover .outline-slide-actions {
  opacity: 1;
}
.outline-slide-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.outline-slide-btn:hover:not(:disabled) {
  background: var(--bg-secondary, #e2e8f0);
  color: var(--text-primary, #1e293b);
}
.outline-slide-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.outline-slide-btn.outline-remove:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* ── Footer ── */
.outline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  gap: 10px;
}
.outline-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.outline-add-slide-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px dashed var(--border, #cbd5e1);
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.outline-add-slide-btn:hover {
  border-color: var(--accent, #003366);
  color: var(--accent, #003366);
  background: rgba(0,51,102,0.04);
}
.outline-skip-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.outline-skip-btn:hover {
  background: var(--bg-tertiary, #f1f5f9);
  color: var(--text-primary, #1e293b);
}
.outline-generate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #003366, #004d99);
  color: #fff;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,51,102,0.2);
}
.outline-generate-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #004d99, #0066cc);
  box-shadow: 0 4px 12px rgba(0,51,102,0.3);
  transform: translateY(-1px);
}
.outline-generate-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ── Scrollbar ── */
.outline-slides-list::-webkit-scrollbar {
  width: 4px;
}
.outline-slides-list::-webkit-scrollbar-track {
  background: transparent;
}
.outline-slides-list::-webkit-scrollbar-thumb {
  background: var(--border, #cbd5e1);
  border-radius: 4px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .outline-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .outline-slide-desc {
    display: none;
  }
  .outline-slide-actions {
    opacity: 1;
  }
  .outline-footer {
    flex-direction: column;
    gap: 8px;
  }
  .outline-footer-right {
    width: 100%;
    justify-content: flex-end;
  }
}
