/**
 * foxo4dri mastery course styles
 *
 * extends the base learn page styles with course-specific theming,
 * paywall ui, loading states, and interactive visualization containers.
 * aligned to the shared mountain-meadow interactive palette.
 */

/* ============================================================
   course header badge
   ============================================================ */

.f4d-course-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.18),
        rgba(129, 140, 248, 0.1)
    );
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 2px 8px rgba(99, 102, 241, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.f4d-course-badge i {
    width: 14px;
    height: 14px;
}

/* ============================================================
   loading skeleton for paid content
   ============================================================ */

.f4d-loading {
    position: relative;
    min-height: 120px;
}

.f4d-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg,
            var(--color-bg-card, rgba(255, 255, 255, 0.03)) 25%,
            rgba(255, 255, 255, 0.06) 50%,
            var(--color-bg-card, rgba(255, 255, 255, 0.03)) 75%);
    background-size: 200% 100%;
    animation: f4d-shimmer 1.5s ease-in-out infinite;
}

@keyframes f4d-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* light mode loading skeleton */
[data-theme="light"] .f4d-loading::after {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.04) 25%,
            rgba(0, 0, 0, 0.08) 50%,
            rgba(0, 0, 0, 0.04) 75%);
    background-size: 200% 100%;
}

/* ============================================================
   paywall cta
   ============================================================ */

.f4d-paywall {
    text-align: center;
    padding: 48px 24px;
    border-radius: 16px;
    background: var(--color-bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
    margin: 32px 0;
}

.f4d-paywall-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    margin-bottom: 16px;
}

.f4d-paywall-icon i {
    width: 28px;
    height: 28px;
    color: #818cf8;
}

.f4d-paywall-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text, #fff);
}

.f4d-paywall--cert {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(129, 140, 248, 0.06);
}

.f4d-paywall-title--success {
    color: #818cf8;
}

.f4d-paywall-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-muted, rgba(255, 255, 255, 0.55));
    max-width: 520px;
    margin: 0 auto 24px;
}

.f4d-paywall-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    max-width: 440px;
    margin: 0 auto 24px;
    font-size: 0.82rem;
    color: var(--color-muted, rgba(255, 255, 255, 0.5));
    cursor: pointer;
}

.f4d-paywall-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #818cf8;
}

.f4d-paywall-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    margin: 0 auto 16px;
}

.f4d-buy-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.f4d-buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.f4d-paywall-guarantee {
    font-size: 0.78rem;
    color: var(--color-muted, rgba(255, 255, 255, 0.4));
}

.f4d-cert-form {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
}

.f4d-cert-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: rgba(0, 0, 0, 0.15);
    color: var(--color-text, #fff);
    font-size: 0.9rem;
}

/* ============================================================
   interactive visualization containers
   ============================================================ */

.f4d-interactive-header {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: #818cf8;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.f4d-interactive-body {
    min-height: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   light mode overrides
   ============================================================ */

[data-theme="light"] .f4d-course-badge {
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.12),
        rgba(129, 140, 248, 0.06)
    );
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .f4d-paywall {
    background: rgba(99, 102, 241, 0.03);
    border-color: rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .f4d-paywall-icon {
    background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .f4d-paywall-icon i {
    color: #6366f1;
}

[data-theme="light"] .f4d-paywall-title {
    color: var(--color-text-light, #1a1a2e);
}

[data-theme="light"] .f4d-paywall-desc {
    color: var(--color-muted-light, rgba(0, 0, 0, 0.55));
}

[data-theme="light"] .f4d-paywall-consent {
    color: var(--color-muted-light, rgba(0, 0, 0, 0.5));
}

[data-theme="light"] .f4d-paywall--cert {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .f4d-paywall-title--success {
    color: #4f46e5;
}

[data-theme="light"] .f4d-cert-input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    color: #1a1a2e;
}

[data-theme="light"] .f4d-interactive-header {
    color: #4f46e5;
    border-bottom-color: rgba(99, 102, 241, 0.12);
}
