/**
 * 9A Paper — Student Portal Stylesheet (student.css)
 * Interactive exam practice engine, question navigator, wallet chip, and student dashboard styles.
 */

:root {
    --student-bg-base: #f8fafc;        /* slate-50 */
    --student-bg-card: #ffffff;
    --student-border: #e2e8f0;         /* slate-200 */
    --student-border-active: #fda4af;  /* rose-300 */
    --student-text-main: #0f172a;      /* slate-900 */
    --student-text-muted: #64748b;     /* slate-500 */
    --student-red-primary: #dc2626;    /* red-600 */
    --student-red-50: #fef2f2;
    --student-emerald: #059669;
    --student-emerald-50: #ecfdf5;
    --student-amber: #d97706;
}

body.student-portal {
    background-color: var(--student-bg-base);
    color: var(--student-text-main);
    font-family: var(--font-base, 'Instrument Sans', 'Noto Sans Sinhala', 'Noto Sans Tamil', 'Iskoola Pota', 'Nirmala UI', system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Question Statement & Options Typography */
.student-question-text,
.mcq-question-statement {
    font-size: 1.05rem;
    line-height: 1.75;
    font-weight: 500;
    color: #0f172a;
}

/* Student Wallet Chip */
.credit-wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border: 1px solid #fecdd3;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #be123c;
    box-shadow: 0 1px 2px rgba(225, 29, 72, 0.05);
    transition: all 0.2s ease;
}

.credit-wallet-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.1);
}

.credit-coin-icon {
    display: inline-block;
    animation: urgentPulse 3s infinite ease-in-out;
}

/* Student Dashboard Cards */
.student-card {
    background: #ffffff;
    border: 1px solid var(--student-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.04);
}

/* Interactive Practice Exam Engine */
.exam-header-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
}

.exam-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.3s ease;
}

.exam-timer-badge.timer-urgent {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
    animation: urgentPulse 1s infinite ease-in-out;
}

/* Question Navigator Palette */
.q-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .q-nav-grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}

.q-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: ui-monospace, monospace;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.q-nav-btn:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.q-nav-btn.is-current {
    border-color: #dc2626;
    background-color: #fef2f2;
    color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.q-nav-btn.is-answered {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.q-nav-btn.is-flagged {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
}

/* MCQ Option Cards */
.mcq-option-label {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mcq-option-label:hover {
    border-color: #cbd5e1;
    background-color: #fafaf9;
    transform: translateX(2px);
}

.mcq-option-label.is-selected {
    border-color: #dc2626;
    background-color: #fff1f2;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.08);
}

.mcq-option-key {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    background-color: #f1f5f9;
    color: #334155;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mcq-option-label.is-selected .mcq-option-key {
    background-color: #dc2626;
    color: #ffffff;
}

/* Question Explanation Box */
.explanation-callout {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-left: 4px solid #3b82f6;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
}

/* Plan Card & Pricing */
.student-plan-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.student-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.06);
}

.student-plan-featured {
    border: 2px solid #dc2626;
    box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.12);
}
