/**
 * MM Content Suite - Frontend Styles v1.2.3
 *
 * Strategie: Höchste Spezifität + !important für ALLE Zellen
 * in unseren Tabellen. Übersteuert garantiert jedes Theme.
 */

/* ====== BOXEN ====== */
body div[style*="background:#f0f7ff"],
body div[style*="background: #f0f7ff"] {
    color: #1a1a1a !important;
}

body div[style*="background:#fff3e0"],
body div[style*="background: #fff3e0"] {
    color: #1a1a1a !important;
}

body div[style*="background:#f5f5f5"],
body div[style*="background: #f5f5f5"] {
    color: #1a1a1a !important;
}

/* Alle Kinder-Elemente der Boxen erben dunkle Schrift */
body div[style*="background:#f0f7ff"] *,
body div[style*="background:#fff3e0"] *,
body div[style*="background:#f5f5f5"] * {
    color: #1a1a1a !important;
}

/* Überschriften in Info-Box behalten Blau */
body div[style*="background:#f0f7ff"] h2,
body div[style*="background:#f0f7ff"] h3 {
    color: #1565c0 !important;
}

/* Links bleiben blau und unterstrichen */
body div[style*="background:#f0f7ff"] a,
body div[style*="background:#fff3e0"] a,
body div[style*="background:#f5f5f5"] a {
    color: #1565c0 !important;
    text-decoration: underline !important;
}

/* ====== TABELLEN - WASSERDICHT ====== */

/* Generelle Tabellenregel: jede Zelle in unseren Tabellen bekommt dunkle Schrift + weisser Fallback-Background */
body table[style*="border-collapse"] td {
    color: #1a1a1a !important;
    background-color: #ffffff;
}

/* Auch verschachtelte Inhalte in Zellen */
body table[style*="border-collapse"] td * {
    color: #1a1a1a !important;
}

/* Tabellen-Header (blaue Reihe) BLEIBT WEISS */
body table[style*="border-collapse"] thead tr th,
body table[style*="border-collapse"] tr[style*="background:#1565c0"] th {
    color: #ffffff !important;
    background-color: #1565c0 !important;
}

body table[style*="border-collapse"] thead tr th *,
body table[style*="border-collapse"] tr[style*="background:#1565c0"] th * {
    color: #ffffff !important;
}

/* Links in Tabellenzellen bleiben blau und unterstrichen */
body table[style*="border-collapse"] td a {
    color: #1565c0 !important;
    text-decoration: underline !important;
}

/* Alternierende Zeilen (graue) - explizit Hintergrund und Schrift erzwingen */
body table[style*="border-collapse"] tr[style*="background:#f9f9f9"] td,
body table[style*="border-collapse"] tr[style*="background: #f9f9f9"] td {
    color: #1a1a1a !important;
    background-color: #f9f9f9 !important;
}

/* Status-Zeilen (grün/gelb/rot) - Hintergrund + Schrift erzwingen */
body table[style*="border-collapse"] tr[style*="background:#e8f5e9"] td {
    color: #1a1a1a !important;
    background-color: #e8f5e9 !important;
}
body table[style*="border-collapse"] tr[style*="background:#fff3e0"] td {
    color: #1a1a1a !important;
    background-color: #fff3e0 !important;
}
body table[style*="border-collapse"] tr[style*="background:#ffebee"] td {
    color: #1a1a1a !important;
    background-color: #ffebee !important;
}

/* Zellen mit eigenem Hintergrund (z.B. Hoffenheim-grün) */
body table[style*="border-collapse"] td[style*="background:#e8f5e9"] {
    color: #1a1a1a !important;
    background-color: #e8f5e9 !important;
}

/* ====== RESPONSIVE TABELLEN ====== */
@media (max-width: 768px) {
    body table[style*="border-collapse"] {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 14px;
        max-width: 100%;
    }
}

/* ====== STRONG/EM IN ALLEN BOXEN UND TABELLEN ====== */
body div[style*="background:#f0f7ff"] strong,
body div[style*="background:#fff3e0"] strong,
body div[style*="background:#f5f5f5"] strong,
body table[style*="border-collapse"] td strong {
    color: #1a1a1a !important;
    font-weight: 700 !important;
}
