/**
 * mathe.css - Farben und einheitliche Kaesten ALLER Mathematikseiten (auch Wiederholungen)
 *
 * Wird nach den Klassen-Dateien geladen: mathe8-9.css / mathe10-12.css (Struktur je
 * Stufe), dann mathe8/9/10/lk12.css (Bausteine einzelner Seiten), dann diese Datei.
 */

:root {
    /* Blaustufe 1 - Hell (Einfach) */
    --blue-light-1: #9cc8f0;
    --blue-light-2: #5f9fdc;
    --blue-light-bg: #edf4fc;

    /* Blaustufe 2 - Mittel */
    --blue-medium-1: #2672c4;
    --blue-medium-2: #1b5fae;
    --blue-medium-bg: #dce9f8;

    /* Blaustufe 3 - Dunkel (Schwer) */
    --blue-dark-1: #1e3c72;
    --blue-dark-2: #14305c;
    --blue-dark-bg: #1d4f8f;

    /* Standard-Farben */
    --mathe-primary: var(--blue-medium-1);
    --mathe-primary-bg: #f5f9fe;
    --mathe-primary-light: #c9dbf0;
    --mathe-secondary: var(--blue-medium-2);
    --mathe-accent: #1e3c72;

    /* Feedback-Farben (dezent in Blau) */
    --feedback-success: #5dade2;
    --feedback-warning: #3498db;
    --feedback-error: #2471a3;

    /* Button-Farben (Blautöne) */
    --mathe-success: var(--blue-medium-1);
    --mathe-success-dark: var(--blue-medium-2);
    --mathe-success-bg: #d4e6f1;
    --mathe-error: #55708f;
    --mathe-error-dark: #425a75;
    --mathe-error-bg: #ebf5fb;
    --mathe-warning: #85c1e9;
    --mathe-warning-dark: #5dade2;
    --mathe-warning-bg: #ebf5fb;

    /* Grautöne */
    --mathe-gray-light: #f5f5f5;
    --mathe-gray-medium: #e0e0e0;
    --mathe-gray-dark: #5f6b76;
}

/* ================================================
   Einheitliche Kaesten, Rueckmeldungen und Knoepfe (01.12.2026)
   Gleiche Bedeutung wie in der Chemie (css/chemie.css), nur in der Fachfarbe Blau.
   Gruen, Rot und Gelb sind fuer richtig, falsch und Achtung reserviert.
   ================================================ */
.hint-box {
    background: linear-gradient(135deg, #1d4f8f 0%, #1e3c72 100%);
    border-left: 5px solid #14305c;
    border-radius: 8px;
    color: #ffffff;
}
.hint-box strong { color: #ffffff; font-weight: 700; }
.hint-box p,
.hint-box ul,
.hint-box ol { color: #f1f6fd; }
.hint-box li { margin-bottom: .35rem; }
.hint-box table { color: #f1f6fd; --bs-table-color: #f1f6fd; --bs-table-bg: transparent; }
.hint-box .text-muted { color: #dce9f8 !important; }
.hint-box :is(.formula-box, .example-box, .bg-white, .bg-light, .card, .alert, .data-table) { color: #22303f; }
.hint-box :is(.formula-box, .example-box, .bg-white, .bg-light, .card, .alert, .data-table) :is(p, ul, ol, strong) { color: inherit; }
.hint-box :is(.formula-box, .example-box, .bg-white, .bg-light, .card, .alert, .data-table) .text-muted { color: #55606b !important; }
.hint-box :is(.formula-box, .example-box, .bg-white, .bg-light, .card, .alert, .data-table) .text-primary { color: var(--blue-medium-2) !important; }
/* Farbige Begriffe und Formelteile (passend zur Zeichnung) auf hellem Grund lassen */
.hint-box :is(span[style*="color"], [class*="-farbe-"]):not(:is(.bg-white, .bg-light, .formula-box, .example-box, .card, .alert, .data-table) *) { background-color: #ffffff; border-radius: 3px; padding: 0 .15em; }
.hint-box :is(.formula-box, .example-box, .bg-white, .bg-light, .card) :is(h3, h4, h5, h6) { color: var(--blue-dark-1) !important; }

.example-box { border-left: 5px solid var(--blue-medium-1); }
.formula-box { background-color: #e6f0fb; border-left: 5px solid var(--blue-dark-1); }
.step-box { background: linear-gradient(135deg, #ffffff 0%, var(--blue-light-bg) 100%); border: 1px solid #d6e2ef; border-left: 5px solid var(--blue-light-2); }
.solution-box { background: var(--blue-medium-bg); border-left: 5px solid var(--blue-dark-1); }
:is(.example-box, .formula-box, .step-box, .solution-box) > h4 { color: var(--blue-dark-1); }

.feedback { border-radius: 8px; }
.feedback.correct,
.feedback.success { background-color: #e6f4e8; border: 1px solid #a5d6a7; color: #1b5e20; }
.feedback.incorrect,
.feedback.error { background-color: #fdecea; border: 1px solid #f2b8b5; color: #8c1d18; }
.feedback.warning { background-color: #fff8e1; border: 1px solid #f0d48a; color: #6b4e00; }

.btn-mathe { background: linear-gradient(135deg, var(--blue-medium-1) 0%, var(--blue-medium-2) 100%) !important; color: #ffffff !important; }
.btn-mathe:hover { background: linear-gradient(135deg, var(--blue-medium-2) 0%, var(--blue-dark-1) 100%) !important; }
.btn-mathe-light { background: linear-gradient(135deg, #dce9f8 0%, #b9d6f3 100%) !important; color: var(--blue-dark-1) !important; }
.btn-mathe-light:hover { background: linear-gradient(135deg, #c9def5 0%, #9cc8f0 100%) !important; color: var(--blue-dark-2) !important; }
.badge-easy { background-color: #d3e6fa !important; color: var(--blue-dark-1) !important; }
.card-header-light { background: linear-gradient(135deg, #d3e6fa 0%, #a5cdf3 100%) !important; }
.card-header-light h4 { color: var(--blue-dark-1); }
.card-header-medium { background: linear-gradient(135deg, #2672c4 0%, #1b4f9e 100%) !important; }
.card-header-dark { background: linear-gradient(135deg, #1e3c72 0%, #12284f 100%) !important; }
.fach-mathe .task-card .card-header.card-header-light  { background: linear-gradient(135deg, #d3e6fa 0%, #a5cdf3 100%) !important; }
.fach-mathe .task-card .card-header.card-header-medium { background: linear-gradient(135deg, #2672c4 0%, #1b4f9e 100%) !important; }
.fach-mathe .task-card .card-header.card-header-dark   { background: linear-gradient(135deg, #1e3c72 0%, #12284f 100%) !important; }
code { color: var(--blue-dark-1) !important; }
.hint-box .data-table { background-color: #ffffff; }
/* Bootstrap-Farben auf den getoenten Kaesten: etwas dunkler fuer 4,5 : 1 */
.fach-mathe main .text-primary { color: var(--blue-medium-2) !important; }
.fach-mathe main .text-success { color: #146c43 !important; }
.fach-mathe main .text-danger { color: #b02a37 !important; }
.hint-box .text-primary:not(:is(.bg-white, .bg-light, .formula-box, .example-box, .card, .alert, .data-table) *) { color: #dce9f8 !important; }
.hint-box .text-success:not(:is(.bg-white, .bg-light, .formula-box, .example-box, .card, .alert, .data-table) *) { color: #bfe8c6 !important; }
.hint-box .text-danger:not(:is(.bg-white, .bg-light, .formula-box, .example-box, .card, .alert, .data-table) *) { color: #ffc9c5 !important; }

/* Abschnittsueberschriften wie in der Chemie (blau mit Linie). Kleine Ueberschriften und solche
   in Karten, Kaesten und dem Kurzkasten behalten ihr Aussehen. */
.content-section h2:where(:not(.h4, .h5, .h6, .accordion-header, :is(.card, .card-header, .accordion, .lf-folie, .lf-show, .lw-kurz, .hint-box, .example-box, .formula-box, .step-box, .solution-box, .intro-box, .guide-box, .alert, .tipps-kasten, .modal) *)),
/* Seiten ohne .content-section (Kreis, binomische Formeln ...); Seiten mit Nummern-Plaketten (lf-nr) bleiben wie sie sind */
.fach-mathe main:not(:has(.lf-nr)) .section > h2:where(:not(.h4, .h5, .h6, :is(.card, .alert, .lw-kurz) *)),
.fach-mathe main:not(:has(.lf-nr)) > .container > h2:where(:not(.h4, .h5, .h6)) {
    color: var(--blue-dark-1);
    font-weight: 600;
    padding-bottom: .6rem;
    border-bottom: 3px solid var(--blue-medium-1);
}
.content-section h3:where(:not(:is(.card-header, .hint-box, .alert, .lw-kurz, .accordion) *)) { color: var(--blue-dark-1); }
.content-section h4:where(:not(:is(.card-header, .hint-box, .alert, .lw-kurz, .accordion) *)) { color: var(--blue-medium-2); }
.fach-mathe main .badge.bg-info { background-color: var(--blue-medium-2) !important; color: #ffffff; }
.fach-mathe main .btn-secondary { background: #dce9f8; border-color: #b9d6f3; color: var(--blue-dark-1); }
.fach-mathe main .btn-secondary:hover { background: #c9def5; color: var(--blue-dark-2); }
.fach-mathe main .badge.bg-light { color: #3d4a5c !important; }
