/* fable-editorial.css v1.3.1 — extend scene library scroll on grid only */

/* ── Page / wizard editorial headers ── */
.page-eyebrow,
.step-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin: 0 0 var(--spacing-sm);
    text-align: center;
}
.auth-card--editorial .page-eyebrow { text-align: left; }
.auth-card--editorial { border-color: rgba(200, 164, 92, 0.14); }
.settings-card.auth-card--editorial {
    background: var(--surface-raised, var(--bg-card));
    border: 1px solid var(--surface-border, rgba(255, 255, 255, 0.08));
    box-shadow: var(--shadow-sm);
}
.main-content.main-content--scroll .auth-content-wrap {
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
}

.auth-title {
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.step-flow-container .step-card {
    border-top-color: rgba(200, 164, 92, 0.14);
}
.step-flow-container .step-title {
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
}
#step1b .step-title,
#imageGenView .content-header h1,
.media-view .content-header h1,
#sessionView .content-header h1,
.aff-hero__title {
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}
#step1b .step-eyebrow {
    text-align: left;
    margin-bottom: var(--spacing-xs);
}

.modal-title,
.modal-header h2,
.modal-header h3 {
    /* One title style for every pop-up (several used bold sans h3s without .modal-title). */
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}
/* Pop-ups built outside .modal-header (payment, continue video, confirm dialogs,
   cookie settings) used bold sans titles; same serif title as the rest. */
html .pay-modal-title,
html .extend-flow-header h2,
html .confirm-modal-header h3,
html .cookie-settings-title,
html .cpmodal-title {
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* ── Quality picker (step 4) — gold selection ── */
.quality-card-badge--credit {
    background: rgba(200, 164, 92, 0.14);
    border: 1px solid rgba(200, 164, 92, 0.35);
    color: var(--accent-primary);
}
.quality-card:hover {
    border-color: var(--accent-primary);
}
.quality-card.selected {
    background: rgba(200, 164, 92, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.22);
}

/* ── Step progress (when visible) ── */
.step-progress-item.active { color: var(--accent-primary); }
.step-progress-item.active .step-progress-item-number {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #141416;
    box-shadow: 0 0 0 4px rgba(200, 164, 92, 0.22);
}

/* ── Primary CTAs: dark-on-gold (Fable spec) ── */
.auth-submit,
.step-btn-primary:not(:disabled),
.btn-lander-primary {
    color: #141416;
}
a.auth-submit { color: #141416 !important; }

/* ── Settings delete — destructive red ── */
.settings-heading--danger { color: var(--error, #ef4444); }
.settings-delete-warning {
    border-left-color: var(--error, #ef4444);
    background: rgba(239, 68, 68, 0.06);
}
.settings-delete-permanent { color: var(--error, #ef4444); }
.settings-delete-trigger,
.settings-delete-confirm-btn {
    /* #dc2626 keeps white text above 4.5:1 (the lighter red was 3.8:1). */
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.settings-delete-trigger:hover,
.settings-delete-confirm-btn:hover:not(:disabled) {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}
.settings-confirm-box--danger { border-color: rgba(239, 68, 68, 0.35); }
.settings-confirm-title--danger { color: var(--error, #ef4444); }
.settings-delete-username-display {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
    color: #f87171;
}

/* ── Toasts — editorial panel, status left border ── */
.app-toast {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-left-width: 3px;
    border-left-style: solid;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    max-width: min(92vw, 420px);
}
.app-toast.app-toast--success {
    border-left-color: var(--success);
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.12) 0%, var(--bg-elevated) 45%);
}
.app-toast.app-toast--error {
    border-left-color: var(--error);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, var(--bg-elevated) 45%);
}
.app-toast.app-toast--info {
    border-left-color: var(--accent-primary);
    background: linear-gradient(90deg, rgba(200, 164, 92, 0.14) 0%, var(--bg-elevated) 45%);
}
@media (min-width: 768px) {
    .app-toast {
        left: auto;
        right: 1.25rem;
        transform: none;
    }
}

/* ── Landing hero + steps + showcase ── */
.lander-hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.lander-showcase-badge-after {
    background: rgba(200, 164, 92, 0.65);
}
.lander-showcase-still {
    filter: grayscale(1) brightness(0.72);
}
.lander-showcase-motion {
    box-shadow: inset 0 0 0 1px rgba(200, 164, 92, 0.35);
}
.lander-showcase-fallback {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: var(--spacing-xl);
}
.lander-step-illustration {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(200, 164, 92, 0.18);
    margin-bottom: var(--spacing-sm);
}
.lander-step-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lander-step-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent-primary);
    background: rgba(200, 164, 92, 0.08);
}
.lander-step-icon-fallback i { width: 32px; height: 32px; }
.lander-feature-icon-images {
    background: rgba(200, 164, 92, 0.12) !important;
    color: var(--accent-primary) !important;
}

/* ── Extend overlay scene library ── */
.scene-library--extend {
    margin-top: var(--spacing-md);
}
.scene-library--extend .scene-library-grid-section {
    max-height: min(52vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}
.scene-library-head--compact { margin-bottom: var(--spacing-sm); }
.scene-library-head--compact .scene-library-title { font-size: 1.25rem; }
.extend-mode-toggle { margin: var(--spacing-md) 0 var(--spacing-sm); }
.extend-flow-overlay .scene-library--extend .scene-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media (max-width: 640px) {
    .extend-flow-overlay .scene-library--extend .scene-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Skeleton + empty states ── */
.scene-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-md);
}
.scene-skeleton-card {
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    animation: fable-skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes fable-skeleton-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
.fs-empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--text-secondary);
    border: 1px dashed rgba(200, 164, 92, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(200, 164, 92, 0.04);
}
.fs-empty-state-title {
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs);
}

.aff-dash-header__title {
    font-family: var(--font-display, Georgia, 'Times New Roman', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
    .scene-skeleton-card { animation: none; opacity: 0.7; }
}

/* ── Account dashboard ── */
.account-dashboard { max-width: 720px; margin: 0 auto; }
.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0 var(--spacing-xl);
}
.account-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(200, 164, 92, 0.14);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}
.account-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.account-stat-value {
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.75rem;
    color: var(--text-primary);
    line-height: 1.1;
}
.account-stat-value--plan { font-size: 1.25rem; }
.account-stat-cta { margin-top: auto; width: 100%; text-align: center; justify-content: center; white-space: nowrap; }
.account-links-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* three shortcuts: one even row, no orphan tile */
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}
.account-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.account-link-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}
.account-link-card i { width: 22px; height: 22px; color: var(--accent-primary); }
.account-email-line { margin-top: var(--spacing-lg); }

.account-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.account-section-link {
    font-size: 0.875rem;
    color: var(--accent-primary);
    text-decoration: none;
}
.account-section-link:hover { text-decoration: underline; }
.account-stat-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}
.account-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: var(--spacing-xl);
}
.account-sessions-loading,
.account-sessions-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.account-session-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(200, 164, 92, 0.1);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease;
}
.account-session-row:hover {
    border-color: rgba(200, 164, 92, 0.35);
}
.account-session-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}
.account-session-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.account-session-thumb--empty i { width: 20px; height: 20px; }
.account-session-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.account-session-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-session-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.account-session-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .account-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
/* The dashboard card is at most 720px wide, so four columns squeeze the buttons onto two lines: stay 2 x 2. */

/* ── Legal pages ── */
.legal-page-content--editorial { max-width: 720px; margin: 0 auto; }
.legal-page-content--editorial .page-eyebrow { text-align: left; margin-bottom: var(--spacing-xs); }
/* .legal-page-content h1 in style.css is more specific and made these bold. */
.legal-page-title,
.legal-page-content h1.legal-page-title {
    font-family: var(--font-display, Georgia, serif);
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 var(--spacing-lg);
    letter-spacing: -0.02em;
}

/* ── Showcase motion video ── */
.lander-showcase-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

/* ── FSModal unified primitive ── */
.fs-modal-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.fs-modal-visible .modal-content {
    animation: fsModalIn 0.22s var(--ease-out);
}
@keyframes fsModalIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
body.fs-modal-body-lock { overflow: hidden; }

.aff-apply-header--editorial .page-eyebrow { text-align: left; }
.aff-apply-header__title {
    font-family: var(--font-display, Georgia, serif);
    font-weight: 400;
}
