/* Dark Mode Overrides - Loaded last to ensure priority */

[data-theme="dark"] .card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .grade-card-title,
[data-theme="dark"] .intro-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .card-title-text {
    color: #bae6fd !important;
    background: none !important;
    -webkit-text-fill-color: #bae6fd !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

[data-theme="dark"] .card-description,
[data-theme="dark"] .section-count,
[data-theme="dark"] .grade-card-description,
[data-theme="dark"] .intro-text,
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] .card-desc-text {
    color: #ffffff !important;
    opacity: 1 !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .grade-card,
[data-theme="dark"] .section-card {
    border: 1px solid #404040 !important;
    background-color: #262626 !important;
}

/* Fix for accordion headers with inline background colors - Match styles.css logic */
[data-theme="dark"] .accordion-header[style*="background-color"],
[data-theme="dark"] .accordion-header[style*="background:"],
[data-theme="dark"] button.accordion-header[style] {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .accordion-header[style*="background-color"] span,
[data-theme="dark"] .accordion-header[style*="background:"] span,
[data-theme="dark"] button.accordion-header[style] span {
    color: #e5e5e5 !important;
}

/* Fix for Kontrol Noktası and Karekodlar inner content boxes */
[data-theme="dark"] .accordion-body div[style*="background: white"],
[data-theme="dark"] .accordion-body div[style*="background:white"],
[data-theme="dark"] .accordion-body div[style*="background-color: white"] {
    background-color: #f5f5f5 !important;
}

[data-theme="dark"] .accordion-body div[style*="background"] div[style*="font-weight"],
[data-theme="dark"] .accordion-body div[style*="background"] span,
[data-theme="dark"] .accordion-body div[style*="background"] div {
    color: #1a1a1a !important;
}

/* Fix for Notebook Entries in Dark Mode - keep text dark on yellow paper */
[data-theme="dark"] .notebook-entry,
[data-theme="dark"] .notebook-entry p,
[data-theme="dark"] .notebook-entry li,
[data-theme="dark"] .notebook-entry h1,
[data-theme="dark"] .notebook-entry h2,
[data-theme="dark"] .notebook-entry h3,
[data-theme="dark"] .notebook-entry h4,
[data-theme="dark"] .notebook-entry h5,
[data-theme="dark"] .notebook-entry h6,
[data-theme="dark"] .notebook-entry span,
[data-theme="dark"] .notebook-entry div,
[data-theme="dark"] .notebook-entry strong,
[data-theme="dark"] .notebook-entry b {
    color: #2c3e50 !important;
}

/* Also fix the notebook note boxes */
[data-theme="dark"] .notebook-note-box,
[data-theme="dark"] .notebook-info-box,
[data-theme="dark"] .notebook-note-box p,
[data-theme="dark"] .notebook-info-box p {
    color: #1a1a1a !important;
}