/* ==========================================================================
   SERVERTAG AUF PL - THEME: "PARLIAMENTARY ELEGANCE" (Deep Blue & Gold)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
    /* Edle Regierungs-Farbpalette (Dark Mode Base) */
    --bg-main: #26375c;        /* Tiefes Blau als Haupt-Hintergrund */
    --bg-surface: #1d2b4b;     /* Etwas dunkler für Cards & Tabellen */
    
    --primary: #121a30;        /* Nachtblau für Header, Tabellenköpfe & Badges */
    --primary-hover: #1b2644;
    
    --accent: #d4af37;         /* Elegantes Gold / Champagner */
    --accent-glow: rgba(212, 175, 55, 0.3);
    
    /* Textfarben */
    --text-main: #e2e8f0;      /* Helles Grauweiß für normalen Text */
    --text-muted: #94a3b8;     /* Etwas dunkleres Grau für Nebeninfos */
    --text-heading: #ffffff;   /* Reines Weiß für Überschriften */
    
    /* Rahmen */
    --border-light: #3f5480;   
    --border-dark: #121a30;
    
    /* Schatten */
    --shadow-base: 4px 4px 0px rgba(10, 15, 28, 0.4);
    --shadow-hover: 6px 6px 0px rgba(10, 15, 28, 0.6);
}

/* ==========================================================================
   STRICT GEOMETRY (Dampfwalze gegen runde Ecken!)
   ========================================================================== */
*, *::before, *::after {
    border-radius: 0 !important;
}

/* Einzige Ausnahme: Die Punkte im Plenarsaal MÜSSEN mathematisch Kreise bleiben */
.seat-dot {
    border-radius: 50% !important;
}


/* ==========================================================================
   DARK MODE OVERRIDES (Vernichtet alle alten weißen & hellgrauen Boxen)
   ========================================================================== */

/* Spürt JEDEN hellen Hintergrund auf (egal ob div, span oder p) und färbt ihn dunkel */
[style*="background-color: #ffffff"], [style*="background-color: white"], [style*="background: #ffffff"], [style*="background: white"], [style*="background-color: #fff"], [style*="background: #fff"],
[style*="background-color: #f8fafc"], [style*="background: #f8fafc"],
[style*="background-color: #f1f5f9"], [style*="background: #f1f5f9"],
[style*="background-color: #e2e8f0"], [style*="background: #e2e8f0"] {
    background-color: var(--primary) !important;
    border: 1px solid var(--border-light) !important;
    border-style: solid !important; /* Macht alte gestrichelte Rahmen hart & solide */
    color: var(--text-main) !important;
}

/* Zwingt alte dunkle Texte (die auf hellem Grund waren) jetzt in lesbares Weiß/Grau */
[style*="color: #0f172a"],
[style*="color: #334155"],
[style*="color: #64748b"],
[style*="color:#0f172a"],
[style*="color:#334155"],
[style*="color:#64748b"] {
    color: var(--text-main) !important;
}

/* Spezifische Korrektur für die Antrags-Inhaltsbox (Verwandelt den blauen Rand links in Gold) */
div[style*="border-left"] {
    border-left-color: var(--accent) !important;
    background-color: var(--bg-surface) !important;
}


/* ==========================================================================
   BASIS & TYPOGRAFIE
   ========================================================================== */
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--text-heading) !important;
    word-wrap: break-word;
}

p {
    color: var(--text-main);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--primary);
    color: white;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover, nav a:focus {
    color: var(--accent);
    outline: none;
}

nav a[style*="color"] {
    background-color: transparent !important;
    color: var(--accent) !important;
    border-bottom: 2px solid var(--accent);
    box-shadow: none;
}

/* --- Content Area --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeIn 0.5s ease-out;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   PLENARSAAL (Sitzgrafik)
   ========================================================================== */
.parliament-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px 20px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-base);
    border: 1px solid var(--border-light);
    border-top: 6px solid var(--accent);
}

.parliament-container {
    position: relative;
    width: 700px;
    height: 350px;
    margin: 0 auto;
}

.seat-dot {
    position: absolute;
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    border: 2px solid var(--bg-surface);
}

.seat-dot:hover, .seat-dot:focus {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 10;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.seat-total {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.seat-total strong {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.seat-total span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(0,0,0,0.15);
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    text-transform: uppercase;
}

.legend-color {
    width: 16px;
    height: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.tooltip {
    position: absolute;
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--accent);
    padding: 15px 20px;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 1000;
    min-width: 200px;
    transform: translateY(0);
    transition: opacity 0.2s, transform 0.2s;
}

.tooltip.hidden {
    display: block; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.tooltip strong {
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

/* ==========================================================================
   TABELLEN (Automatischer Dark Mode)
   ========================================================================== */
div[style*="background: var(--bg-surface)"] {
    background: var(--bg-surface) !important;
    border-color: var(--border-light) !important;
}

table.bt-table, table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-light) !important;
}

table.bt-table thead, table.bt-table thead tr, table thead tr {
    background-color: var(--primary) !important;
}

table.bt-table th, table th, table th[style] {
    padding: 18px 20px;
    text-align: left;
    color: var(--accent) !important;
    font-weight: 700 !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border-light) !important;
}

table.bt-table td, table td {
    padding: 16px 20px;
    text-align: left;
    color: var(--text-main) !important; 
    border: 1px solid var(--border-light) !important;
    background-color: var(--bg-surface) !important;
}

/* Spezielle Ausnahme: Legitimation-Block (Booster/Gewählt) */
table.bt-table td[rowspan] {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Namen in der Tabelle reparieren */
table td a,
table td a[style] {
    color: #ffffff !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
}
table td a:hover {
    color: var(--accent) !important;
}

table.bt-table tr:hover td:not([rowspan]) {
    background-color: #243558 !important;
}

tr[style*="border-bottom"] {
    border-bottom-color: var(--border-light) !important;
}

/* ==========================================================================
   FORMULARE & BUTTONS
   ========================================================================== */
.bt-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    margin-top: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--primary);
    color: #ffffff;
    transition: all 0.2s;
    box-sizing: border-box;
}

.bt-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.bt-button {
    background-color: var(--accent);
    color: #000000 !important;
    padding: 14px 28px;
    border: 2px solid var(--accent);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.bt-button:hover, .bt-button:focus {
    background-color: transparent;
    color: var(--accent) !important;
}

/* ==========================================================================
   SMARTPHONE OPTIMIERUNG
   ========================================================================== */
@media (max-width: 768px) {
    header { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
        padding: 20px 15px; 
    }
    nav ul { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 10px; 
    }
    .container { 
        margin: 20px auto; 
        padding: 0 10px; 
    }
    .parliament-wrapper { 
        padding: 30px 0; 
        overflow: hidden; 
    }
    .parliament-container {
        left: 50%;
        transform: translateX(-50%) scale(0.43); 
        transform-origin: top center;
        height: 150px; 
        margin-bottom: 10px;
    }
    .seat-total strong { 
        font-size: 4rem; 
    }
    div[style*="overflow: hidden"] {
        border: none !important;
    }
    table.bt-table { 
        display: block; 
        width: 100%; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        border: 1px solid var(--border-light) !important;
    }
    table.bt-table th, table.bt-table td {
        white-space: nowrap; 
        padding: 12px 15px;
    }
    div[style*="display: flex; gap: 30px;"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 25px 15px !important;
        gap: 15px !important;
    }
    div[style*="display: flex; gap: 30px;"] img, 
    div[style*="display: flex; gap: 30px;"] div[style*="width: 180px"] {
        margin: 0 auto !important;
    }
    .bt-button {
        width: 100%;
        text-align: center;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}