/* ============================================================================
   07-EDUCATION — THEME OVERRIDES
   CourseNoteList · CourseNoteFormModal · CourseNoteExport
   ExamDetail (prep-progress, linked assignments, status badges)
   CourseDetail (notes section, initiative badge)
   ============================================================================ */

/* ============================================================================
   NOTE TYPE BADGES
   ============================================================================ */

/* Dark theme — lighten badge backgrounds */
.theme-dark .note-type-insight    { background: #1e3a5f !important; color: #93c5fd !important; }
.theme-dark .note-type-actionitem { background: #14532d !important; color: #86efac !important; }
.theme-dark .note-type-question   { background: #713f12 !important; color: #fde047 !important; }
.theme-dark .note-type-example    { background: #3b0764 !important; color: #d8b4fe !important; }

@media (prefers-color-scheme: dark) {
    .theme-default .note-type-insight    { background: #1e3a5f !important; color: #93c5fd !important; }
    .theme-default .note-type-actionitem { background: #14532d !important; color: #86efac !important; }
    .theme-default .note-type-question   { background: #713f12 !important; color: #fde047 !important; }
    .theme-default .note-type-example    { background: #3b0764 !important; color: #d8b4fe !important; }
}

/* ============================================================================
   NOTE CARDS
   ============================================================================ */

/* Dark theme */
.theme-dark .note-card {
    background: #1F2937 !important;
    border-color: #374151 !important;
}

.theme-dark .note-card-title { color: #F9FAFB !important; }
.theme-dark .note-card-date  { color: #9CA3AF !important; }
.theme-dark .note-card-content { color: #D1D5DB !important; }

.theme-dark .note-card-actions {
    border-top-color: #374151 !important;
}

.theme-dark .note-tag-chip {
    background: #374151 !important;
    color: #D1D5DB !important;
}

@media (prefers-color-scheme: dark) {
    .theme-default .note-card {
        background: #1F2937 !important;
        border-color: #374151 !important;
    }
    .theme-default .note-card-title   { color: #F9FAFB !important; }
    .theme-default .note-card-date    { color: #9CA3AF !important; }
    .theme-default .note-card-content { color: #D1D5DB !important; }
    .theme-default .note-card-actions { border-top-color: #374151 !important; }
    .theme-default .note-tag-chip     { background: #374151 !important; color: #D1D5DB !important; }
}

/* ============================================================================
   NOTE TYPE FILTER CHIPS
   ============================================================================ */

.theme-dark .note-type-chip {
    border-color: #4B5563 !important;
    color: #D1D5DB !important;
}

.theme-dark .note-type-chip:hover {
    background: #374151 !important;
}

.theme-dark .note-type-chip.active {
    background: #4F46E5 !important;
    border-color: #4F46E5 !important;
    color: #fff !important;
}

@media (prefers-color-scheme: dark) {
    .theme-default .note-type-chip        { border-color: #4B5563 !important; color: #D1D5DB !important; }
    .theme-default .note-type-chip:hover  { background: #374151 !important; }
    .theme-default .note-type-chip.active { background: #4F46E5 !important; border-color: #4F46E5 !important; color: #fff !important; }
}

/* ============================================================================
   EXAM PREP PROGRESS BAR
   ============================================================================ */

.exam-prep-track {
    height: 8px;
    border-radius: 4px;
    background: var(--sf-border-color, #E5E7EB);
    overflow: hidden;
}

.exam-prep-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.exam-prep-fill.fill-complete { background: #22c55e; }
.exam-prep-fill.fill-good     { background: #3b82f6; }
.exam-prep-fill.fill-low      { background: #f59e0b; }

/* Dark theme */
.theme-dark .exam-prep-track {
    background: #374151 !important;
}

@media (prefers-color-scheme: dark) {
    .theme-default .exam-prep-track { background: #374151 !important; }
}

/* ============================================================================
   EXPORT PAGE
   ============================================================================ */

.theme-dark .export-filters,
.theme-dark .export-options,
.theme-dark .export-preview {
    background: #1F2937 !important;
    border-color: #374151 !important;
}

.theme-dark .export-preview-body {
    background: #111827 !important;
    border-color: #374151 !important;
    color: #D1D5DB !important;
}

.theme-dark .export-format-chip {
    border-color: #4B5563 !important;
    color: #D1D5DB !important;
}

.theme-dark .export-format-chip.active {
    background: #4F46E5 !important;
    border-color: #4F46E5 !important;
    color: #fff !important;
}

@media (prefers-color-scheme: dark) {
    .theme-default .export-filters,
    .theme-default .export-options,
    .theme-default .export-preview  { background: #1F2937 !important; border-color: #374151 !important; }
    .theme-default .export-preview-body  { background: #111827 !important; border-color: #374151 !important; color: #D1D5DB !important; }
    .theme-default .export-format-chip   { border-color: #4B5563 !important; color: #D1D5DB !important; }
    .theme-default .export-format-chip.active { background: #4F46E5 !important; border-color: #4F46E5 !important; color: #fff !important; }
}

/* ============================================================================
   COURSE NOTE LIST WRAPPER (in CourseDetail)
   ============================================================================ */

.theme-dark .course-note-list-wrapper { color: #D1D5DB !important; }

.theme-dark .note-linked-task { color: #9CA3AF !important; }

@media (prefers-color-scheme: dark) {
    .theme-default .course-note-list-wrapper { color: #D1D5DB !important; }
    .theme-default .note-linked-task         { color: #9CA3AF !important; }
}

/* ============================================================================
   COURSE DETAIL PANELS
   Scoped CourseDetail.razor.css cannot reliably target the html-level theme
   class, so these page-panel overrides live in the global education theme file.
   ============================================================================ */

.theme-dark .course-command-center {
    border-color: rgba(96, 165, 250, 0.24) !important;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94)) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26) !important;
}

.theme-dark .course-command-panel,
.theme-dark .course-detail-header,
.theme-dark .detail-section,
.theme-dark .course-detail-workspace .detail-section {
    background: var(--sf-bg-secondary, #1e293b) !important;
    border-color: var(--sf-border-color, #334155) !important;
    color: var(--sf-text-primary, #e2e8f0) !important;
}

.theme-dark .course-command-panel {
    background: rgba(15, 23, 42, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 34px rgba(0, 0, 0, 0.2) !important;
}

.theme-dark .course-detail-title,
.theme-dark .detail-section-title,
.theme-dark .exam-item-title,
.theme-dark .assignment-title,
.theme-dark .study-task-item,
.theme-dark .next-action-task,
.theme-dark .course-progress-pct {
    color: var(--sf-text-heading, #f8fafc) !important;
}

.theme-dark .course-command-eyebrow,
.theme-dark .course-command-panel-label,
.theme-dark .course-progress-label,
.theme-dark .next-action-label {
    color: var(--sf-link-text, #38bdf8) !important;
}

.theme-dark .course-detail-date,
.theme-dark .course-detail-stream,
.theme-dark .course-detail-description,
.theme-dark .exam-item-date,
.theme-dark .exam-item-notes,
.theme-dark .assignment-due-chip,
.theme-dark .course-progress-fraction,
.theme-dark .next-action-exam,
.theme-dark .next-action-due,
.theme-dark .detail-empty-state,
.theme-dark .course-command-empty-progress {
    color: var(--sf-text-secondary, #cbd5e1) !important;
}

.theme-dark .detail-section-count,
.theme-dark .exam-countdown-badge,
.theme-dark .assignment-priority-badge.priority-low {
    background: var(--sf-bg-tertiary, #111827) !important;
    color: var(--sf-text-secondary, #cbd5e1) !important;
}

.theme-dark .exam-item,
.theme-dark .assignment-item,
.theme-dark .assignment-add-form,
.theme-dark .next-action-banner,
.theme-dark .course-command-empty-progress {
    background: var(--sf-bg-tertiary, #111827) !important;
    border-color: var(--sf-border-color, #334155) !important;
}

.theme-dark .exam-item.urgent,
.theme-dark .assignment-item.overdue {
    background: rgba(239, 68, 68, 0.12) !important;
    border-left-color: var(--sf-error-500, #ef4444) !important;
}

.theme-dark .exam-item.upcoming,
.theme-dark .assignment-item.urgent {
    background: rgba(245, 158, 11, 0.12) !important;
    border-left-color: var(--sf-warning-500, #f59e0b) !important;
}

.theme-dark .assignment-item.completed {
    background: rgba(15, 23, 42, 0.72) !important;
}

.theme-dark .course-command-panel .course-progress-row,
.theme-dark .next-action-banner {
    background: rgba(14, 165, 233, 0.12) !important;
}

.theme-dark .next-action-banner.next-action-complete {
    background: rgba(34, 197, 94, 0.12) !important;
    color: var(--sf-success-400, #4ade80) !important;
}

.theme-dark .course-progress-track {
    background: var(--sf-bg-primary, #0f172a) !important;
}

.theme-dark .course-detail-status-row,
.theme-dark .course-detail-description,
.theme-dark .exam-item-notes,
.theme-dark .assignment-actions,
.theme-dark .study-task-group-header,
.theme-dark .explain-section {
    border-color: var(--sf-border-color, #334155) !important;
}

.theme-dark .status-inline-select,
.theme-dark .readiness-inline-select,
.theme-dark .assignment-priority-select,
.theme-dark .assignment-date-input,
.theme-dark .assignment-add-form .sf-input {
    background-color: var(--sf-bg-primary, #0f172a) !important;
    border-color: var(--sf-border-color, #334155) !important;
    color: var(--sf-text-heading, #f8fafc) !important;
}

.theme-dark .timeline-description,
.theme-dark .timeline-week-header,
.theme-dark .timeline-session-day,
.theme-dark .timeline-session-date,
.theme-dark .timeline-session-time,
.theme-dark .timeline-session-duration,
.theme-dark .timeline-delete-confirm-label,
.theme-dark .refl-step-title,
.theme-dark .refl-month-label,
.theme-dark .refl-section-title,
.theme-dark .refl-content,
.theme-dark .ai-summary-title,
.theme-dark .ai-summary-section-title,
.theme-dark .ai-summary-text,
.theme-dark .ai-recall-item,
.theme-dark .ai-suggested-item {
    color: var(--sf-text-primary, #f1f5f9) !important;
}

.theme-dark .timeline-session-row,
.theme-dark .timeline-adhoc-form,
.theme-dark .refl-question-group,
.theme-dark .refl-card,
.theme-dark .ai-summary-wrapper,
.theme-dark .ai-suggested-item {
    background: var(--sf-bg-tertiary, #111827) !important;
    border-color: var(--sf-border-color, #334155) !important;
}

.theme-dark .timeline-week-header,
.theme-dark .refl-step,
.theme-dark .refl-form-actions,
.theme-dark .refl-section,
.theme-dark .refl-meta,
.theme-dark .ai-summary-section {
    border-color: var(--sf-border-color, #334155) !important;
}

.theme-dark .timeline-mode-badge--idle,
.theme-dark .timeline-excluded-badge,
.theme-dark .timeline-session-duration {
    background: var(--sf-bg-primary, #0f172a) !important;
    border-color: var(--sf-border-color, #334155) !important;
    color: var(--sf-text-secondary, #cbd5e1) !important;
}

@media (prefers-color-scheme: dark) {
    .theme-default .course-command-center {
        border-color: rgba(96, 165, 250, 0.24) !important;
        background:
            radial-gradient(circle at top right, rgba(96, 165, 250, 0.2), transparent 34%),
            linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94)) !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26) !important;
    }

    .theme-default .course-command-panel,
    .theme-default .course-detail-header,
    .theme-default .detail-section,
    .theme-default .course-detail-workspace .detail-section {
        background: var(--sf-bg-secondary, #1e293b) !important;
        border-color: var(--sf-border-color, #334155) !important;
        color: var(--sf-text-primary, #e2e8f0) !important;
    }

    .theme-default .course-command-panel {
        background: rgba(15, 23, 42, 0.72) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 34px rgba(0, 0, 0, 0.2) !important;
    }

    .theme-default .course-detail-title,
    .theme-default .detail-section-title,
    .theme-default .exam-item-title,
    .theme-default .assignment-title,
    .theme-default .study-task-item,
    .theme-default .next-action-task,
    .theme-default .course-progress-pct {
        color: var(--sf-text-heading, #f8fafc) !important;
    }

    .theme-default .course-command-eyebrow,
    .theme-default .course-command-panel-label,
    .theme-default .course-progress-label,
    .theme-default .next-action-label {
        color: var(--sf-link-text, #38bdf8) !important;
    }

    .theme-default .course-detail-date,
    .theme-default .course-detail-stream,
    .theme-default .course-detail-description,
    .theme-default .exam-item-date,
    .theme-default .exam-item-notes,
    .theme-default .assignment-due-chip,
    .theme-default .course-progress-fraction,
    .theme-default .next-action-exam,
    .theme-default .next-action-due,
    .theme-default .detail-empty-state,
    .theme-default .course-command-empty-progress {
        color: var(--sf-text-secondary, #cbd5e1) !important;
    }

    .theme-default .detail-section-count,
    .theme-default .exam-countdown-badge,
    .theme-default .assignment-priority-badge.priority-low {
        background: var(--sf-bg-tertiary, #111827) !important;
        color: var(--sf-text-secondary, #cbd5e1) !important;
    }

    .theme-default .exam-item,
    .theme-default .assignment-item,
    .theme-default .assignment-add-form,
    .theme-default .next-action-banner,
    .theme-default .course-command-empty-progress {
        background: var(--sf-bg-tertiary, #111827) !important;
        border-color: var(--sf-border-color, #334155) !important;
    }

    .theme-default .exam-item.urgent,
    .theme-default .assignment-item.overdue {
        background: rgba(239, 68, 68, 0.12) !important;
        border-left-color: var(--sf-error-500, #ef4444) !important;
    }

    .theme-default .exam-item.upcoming,
    .theme-default .assignment-item.urgent {
        background: rgba(245, 158, 11, 0.12) !important;
        border-left-color: var(--sf-warning-500, #f59e0b) !important;
    }

    .theme-default .assignment-item.completed {
        background: rgba(15, 23, 42, 0.72) !important;
    }

    .theme-default .course-command-panel .course-progress-row,
    .theme-default .next-action-banner {
        background: rgba(14, 165, 233, 0.12) !important;
    }

    .theme-default .next-action-banner.next-action-complete {
        background: rgba(34, 197, 94, 0.12) !important;
        color: var(--sf-success-400, #4ade80) !important;
    }

    .theme-default .course-progress-track {
        background: var(--sf-bg-primary, #0f172a) !important;
    }

    .theme-default .course-detail-status-row,
    .theme-default .course-detail-description,
    .theme-default .exam-item-notes,
    .theme-default .assignment-actions,
    .theme-default .study-task-group-header,
    .theme-default .explain-section {
        border-color: var(--sf-border-color, #334155) !important;
    }

    .theme-default .status-inline-select,
    .theme-default .readiness-inline-select,
    .theme-default .assignment-priority-select,
    .theme-default .assignment-date-input,
    .theme-default .assignment-add-form .sf-input {
        background-color: var(--sf-bg-primary, #0f172a) !important;
        border-color: var(--sf-border-color, #334155) !important;
        color: var(--sf-text-heading, #f8fafc) !important;
    }

    .theme-default .timeline-description,
    .theme-default .timeline-week-header,
    .theme-default .timeline-session-day,
    .theme-default .timeline-session-date,
    .theme-default .timeline-session-time,
    .theme-default .timeline-session-duration,
    .theme-default .timeline-delete-confirm-label,
    .theme-default .refl-step-title,
    .theme-default .refl-month-label,
    .theme-default .refl-section-title,
    .theme-default .refl-content,
    .theme-default .ai-summary-title,
    .theme-default .ai-summary-section-title,
    .theme-default .ai-summary-text,
    .theme-default .ai-recall-item,
    .theme-default .ai-suggested-item {
        color: var(--sf-text-primary, #f1f5f9) !important;
    }

    .theme-default .timeline-session-row,
    .theme-default .timeline-adhoc-form,
    .theme-default .refl-question-group,
    .theme-default .refl-card,
    .theme-default .ai-summary-wrapper,
    .theme-default .ai-suggested-item {
        background: var(--sf-bg-tertiary, #111827) !important;
        border-color: var(--sf-border-color, #334155) !important;
    }

    .theme-default .timeline-week-header,
    .theme-default .refl-step,
    .theme-default .refl-form-actions,
    .theme-default .refl-section,
    .theme-default .refl-meta,
    .theme-default .ai-summary-section {
        border-color: var(--sf-border-color, #334155) !important;
    }

    .theme-default .timeline-mode-badge--idle,
    .theme-default .timeline-excluded-badge,
    .theme-default .timeline-session-duration {
        background: var(--sf-bg-primary, #0f172a) !important;
        border-color: var(--sf-border-color, #334155) !important;
        color: var(--sf-text-secondary, #cbd5e1) !important;
    }
}
