/**
 * melanotan2 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
   ============================================================ */

.mt2-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(var(--meadow-500-rgb, 16, 185, 129), 0.18),
        rgba(var(--meadow-400-rgb, 52, 211, 158), 0.1)
    );
    color: var(--meadow-300, #6ee7bf);
    border: 1px solid rgba(var(--meadow-500-rgb, 16, 185, 129), 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 2px 8px rgba(var(--meadow-500-rgb, 16, 185, 129), 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

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

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

.mt2-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: mt2-shimmer 1.5s ease-in-out infinite;
}

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

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

/* light mode loading skeleton */
[data-theme="light"] .mt2-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
   ============================================================ */

.mt2-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;
}

.mt2-paywall-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin-bottom: 16px;
    background: rgba(var(--meadow-500-rgb, 16, 185, 129), 0.12);
    color: var(--meadow-400, #34d39e);
}

.mt2-paywall-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.mt2-paywall-title--success {
    color: var(--meadow-400, #34d39e);
}

.mt2-paywall-desc {
    font-size: 0.9rem;
    color: var(--text-secondary, #a3a3a3);
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 520px;
    margin-inline: auto;
}

.mt2-paywall--cert {
    border-color: rgba(var(--meadow-500-rgb, 16, 185, 129), 0.2);
    background: rgba(var(--meadow-500-rgb, 16, 185, 129), 0.04);
}

/* ============================================================
   stat grid
   ============================================================ */

.mt2-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.mt2-stat-card {
    text-align: center;
    padding: 16px 12px;
    border-radius: 12px;
    background: var(--color-bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
}

.mt2-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--meadow-400, #34d39e);
    margin-bottom: 4px;
}

.mt2-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary, #a3a3a3);
    line-height: 1.3;
}

/* ============================================================
   interactive area styling
   ============================================================ */

.mt2-interactive-header {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: var(--meadow-400, #34d39e);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(var(--meadow-500-rgb, 16, 185, 129), 0.2);
}

.mt2-interactive-body {
    min-height: 200px;
    position: relative;
}

.mt2-interactive-hint {
    font-size: 0.8rem;
    color: var(--text-secondary, #a3a3a3);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* receptor detail panel */
.mt2-receptor-detail {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--color-bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
    animation: mt2-fade-in 0.3s ease;
}

.mt2-receptor-detail-header {
    font-size: 0.9rem;
    padding-left: 12px;
    margin-bottom: 8px;
}

.mt2-receptor-detail-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary, #a3a3a3);
    margin: 0;
}

@keyframes mt2-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   cert input
   ============================================================ */

.mt2-cert-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.mt2-cert-input {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border, rgba(255, 255, 255, 0.15));
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #fafafa);
    font-size: 0.9rem;
    min-width: 200px;
}

[data-theme="light"] .mt2-cert-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a1a;
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 600px) {
    .mt2-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .mt2-loading::after {
        animation: none;
    }

    .mt2-receptor-detail {
        animation: none;
    }
}
