* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.site-footer {
    width: 100%;
    text-align: center;
    padding: 6px 0;
    font-size: 0.78rem;
    color: #888;
    flex-shrink: 0;
    background: transparent;
}

.site-footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.15s;
}

.site-footer a:hover {
    color: #dc2626;
    text-decoration: underline;
}

.site-footer-sep {
    margin: 0 8px;
    color: #ccc;
}

.top-bar {
    width: 100%;
    background: #dc2626;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    /* Seit den drei Knoepfen unter der Tagline stapelt die Leiste: Marke oben,
       Navigation darunter - deshalb column statt der frueheren Zeile. */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* .gew-logo-wrap / .gew-logo sind am 18.08.2026 entfallen. Sie hielten das
   GEW-Zeichen rechts in der Kopfleiste - zuletzt nur noch in impressum.php und
   datenschutz.php, wo es den falschen Betreiber nannte. Auf der Karte war es
   schon am 16.08. weg (traegerneutral). Das Verbandslogo lebt weiter als
   .traeger-logo in der Auswahl, wo es zu genau einem Angebot gehoert. */

.top-bar-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    color: inherit;
    text-decoration: none;
}

.top-bar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.top-bar-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.top-bar-btn:hover,
.top-bar-btn:focus {
    background: #fff;
    color: #dc2626;
}

.top-bar-tagline {
    color: #fff;
    font-weight: 400;
}

.top-bar-logo {
    height: 40px;
    width: auto;
    display: block;
}

.top-bar-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.map-container {
    width: 100%;
    max-width: 550px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    margin: 10px auto;
}

/* Die Bundesland-Liste unter der Karte gibt es NUR auf dem Handy - am Desktop
   ist die Karte selbst das Bedienelement. Ausgeblendet per default, sichtbar
   erst in der 768px-Regel weiter unten. */
.land-select-wrap {
    display: none;
}

.map-container svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* ── Verzweigungs-Seite (wahl.php: Karte → Träger → Instanz) ─────────────────
   Bewusst trägerneutral: weder GEW-Rot noch KEG-Gelb, damit die Auswahl keinen
   Anbieter optisch bevorzugt. Die Verbandsfarbe beginnt erst hinter dem Klick,
   in der Instanz selbst. */

.wahl-body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
}

.wahl-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px;
}

.wahl-karte {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
    padding: 26px 26px 20px;
    width: 100%;
    max-width: 440px;
}

.wahl-titel {
    font-size: 1.4rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.wahl-frage {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 18px;
}

.wahl-zurueck {
    display: inline-block;
    margin-top: 18px;
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.wahl-zurueck:hover {
    color: #333;
    text-decoration: underline;
}

.traeger-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.traeger-knopf {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    transition: border-color 0.15s, background 0.15s;
}

a.traeger-knopf:hover,
a.traeger-knopf:focus-visible {
    border-color: #888;
    background: #fafafa;
    outline: none;
}

.traeger-eintrag-inaktiv .traeger-knopf {
    color: #999;
    background: #f7f7f7;
    border-style: dashed;
    cursor: not-allowed;
}

.traeger-eintrag-inaktiv .traeger-logo {
    filter: grayscale(1);
    opacity: 0.45;
}

.traeger-logo {
    height: 34px;
    width: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.traeger-texte {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.traeger-texte strong {
    font-size: 1rem;
    font-weight: 600;
}

.traeger-texte small {
    font-size: 0.8rem;
    color: #777;
}

/* Hier stand bis 17.08.2026 das Theme fuer tippy.js. tippy wurde nie
   aufgerufen - die Mouseover-Blase ist .tooltip weiter unten in dieser Datei,
   gebaut von assets/script.js. Die Bibliothek ist samt popper.js aus
   index.php entfernt. */

.map-container svg path.bundesland {
    fill: #d6d2d2 !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    cursor: pointer;
    transition: fill 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.map-container svg path.bundesland:nth-child(2) { fill: #cbc6c6 !important; }
.map-container svg path.bundesland:nth-child(3) { fill: #d1cbcb !important; }
.map-container svg path.bundesland:nth-child(4) { fill: #c8c2c2 !important; }
.map-container svg path.bundesland:nth-child(5) { fill: #d9d4d4 !important; }
.map-container svg path.bundesland:nth-child(6) { fill: #c5bfbf !important; }
.map-container svg path.bundesland:nth-child(7) { fill: #d3cdcd !important; }
.map-container svg path.bundesland:nth-child(8) { fill: #ccc7c7 !important; }
.map-container svg path.bundesland:nth-child(9) { fill: #d0caca !important; }
.map-container svg path.bundesland:nth-child(10) { fill: #c9c3c3 !important; }
.map-container svg path.bundesland:nth-child(11) { fill: #d4cece !important; }
.map-container svg path.bundesland:nth-child(12) { fill: #cac4c4 !important; }
.map-container svg path.bundesland:nth-child(13) { fill: #d2cccc !important; }
.map-container svg path.bundesland:nth-child(14) { fill: #c7c1c1 !important; }
.map-container svg path.bundesland:nth-child(15) { fill: #d5cfcf !important; }
.map-container svg path.bundesland:nth-child(16) { fill: #cdc8c8 !important; }

/* Der frühere rote Dauer-Rand markierte "hier gibt es die App schon". Seit alle
   Bundesländer anklickbar sind (16.08.2026) unterscheidet er nichts mehr - auf
   allen 16 Ländern wäre er nur noch Lärm. Die Hervorhebung bleibt beim Hover. */

.map-container svg path.bundesland[data-active="1"].active {
    fill: #dc2626 !important;
    cursor: pointer;
}

@media (hover: hover) {
    .map-container svg path.bundesland[data-active="1"]:hover {
        fill: #dc2626 !important;
        cursor: pointer;
    }
}

.map-container svg .bundesland-label {
    font-size: 14px;
    font-weight: 600;
    fill: #333;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
}

.map-container svg path.bundesland[data-active="0"] {
    cursor: not-allowed;
}

@media (hover: hover) {
    .map-container svg path.bundesland[data-active="0"]:hover {
        fill: #c4b8b8 !important;
    }
}

.tooltip {
    position: absolute;
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    z-index: 100;
    transform: translate(-50%, -100%);
    margin-top: -12px;
}

.tooltip.visible {
    opacity: 1;
}

.tooltip-note {
    font-weight: normal;
    font-size: 0.8rem;
}

.map-intro {
    margin: 14px auto 0;
    text-align: center;
    font-size: 1.05rem;
    color: #333;
    flex-shrink: 0;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(40, 40, 40, 0.95);
}

@media (max-width: 1024px) {
    .map-container {
        max-width: 60vw;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    .map-container {
        max-width: 70vw;
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    .map-container {
        max-width: 45vw;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 14px;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .top-bar-logo {
        height: 32px;
    }

    .top-bar-title {
        font-size: 0.95rem;
    }

    /* order stammt aus der Zeit, als rechts noch das GEW-Logo hing. Mit der
       Navigation in der Leiste zog die order:1 die Marke HINTER die Knoepfe -
       die standen auf dem Handy also ueber der Tagline. Beide Kinder bekommen
       jetzt eine explizite Reihenfolge: Marke oben, Knoepfe darunter. */
    .top-bar-brand {
        order: 1;
        margin: 0;
    }

    .top-bar-nav {
        order: 2;
    }

    .top-bar-btn {
        padding: 5px 12px;
        font-size: 0.82rem;
    }

    .map-container {
        max-width: 95vw;
    }

    .land-select-wrap {
        display: block;
        width: 90vw;
        max-width: 420px;
        margin: 4px auto 16px;
        text-align: center;
    }

    .land-select-label {
        display: block;
        margin-bottom: 6px;
        font-size: 0.9rem;
        color: #444;
    }

    .land-select {
        width: 100%;
        padding: 12px 14px;
        font-size: 1rem;
        font-family: inherit;
        color: #222;
        background: #fff;
        border: 1px solid #bbb;
        border-radius: 8px;
    }

    .tooltip {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* ===================================================================
   DIE LIZENZFRAGE auf der Auswahlseite (select.php + assets/lizenzfrage.js)

   "Hast Du schon eine Lizenz?" - Ja fuehrt zur Anmeldung, Nein auf das
   Bestellformular des Bundeslandes. Sie erscheint nur bei Angeboten mit einer
   'bestell'-Adresse in der config.php.

   TRAEGERNEUTRAL wie die ganze Seite: kein GEW-Rot, keine Verbandsfarbe. Das
   Rot der Kopfleiste bleibt der Marke vorbehalten und faerbt hier nicht die
   Antwort ein - beide Wege sind gleich richtig, je nachdem, wer davorsteht.
   =================================================================== */

.lizenz-frage {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* [hidden] muss gewinnen: .lizenz-frage setzt display:flex, und das schlaegt
   die Voreinstellung des Browsers fuer verborgene Elemente. */
.lizenz-frage[hidden] {
    display: none;
}

.lizenz-schleier {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.lizenz-fenster {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    padding: 24px 24px 18px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.lizenz-titel {
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.lizenz-angebot {
    font-size: 0.88rem;
    color: #777;
    margin-bottom: 18px;
}

.lizenz-wege {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lizenz-weg {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    transition: border-color 0.15s, background 0.15s;
}

.lizenz-weg:hover,
.lizenz-weg:focus-visible {
    border-color: #888;
    background: #fafafa;
    outline: none;
}

/* Die haeufigere Antwort ist sichtbar die erste - die meisten, die hier
   klicken, haben ihre Lizenz schon. Ein voller Farbknopf waere zu viel: Wer
   noch keine hat, soll nicht das Gefuehl haben, die falsche Tuer zu nehmen. */
.lizenz-weg-ja {
    border-color: #b9b9b9;
    background: #fafafa;
}

.lizenz-weg strong {
    font-size: 1rem;
    font-weight: 600;
}

.lizenz-weg small {
    font-size: 0.8rem;
    color: #777;
}

.lizenz-abbruch {
    margin-top: 16px;
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
}

.lizenz-abbruch:hover,
.lizenz-abbruch:focus-visible {
    color: #333;
    text-decoration: underline;
}

/* Die Seite darf hinter dem Fenster nicht mitscrollen: .wahl-body hat
   overflow-y:auto, sonst wandert die Liste unter dem Dialog davon. */
body.lizenz-offen {
    overflow: hidden;
}
