/*
 * Synapsenbrenner - Modul matcher: Erlebnis-Matcher (Nachtbau 17.09.2026, Vertrag A9)
 * Look nach dem Stimmungsentwurf (Hero dunkel, Knopf gelb, Kompaktkarten). Werte in px,
 * weil das Theme 1rem = 10px setzt. Tokens aus bloecke/basis.css, jeweils mit Ersatzwert.
 * Grundklassen sb-basis-sektion, sb-basis-wrap, sb-basis-kicker, sb-basis-knopf aus basis.css.
 */

.sb-matcher [hidden] {
    display: none;
}

.sb-matcher {
    overflow-x: clip;
}
.sb-matcher:first-child > .sb-matcher-wrap {
    padding-top: clamp(40px, 6vw, 72px);
}

/* Kopf */
.sb-matcher-kopf {
    max-width: 780px;
    margin: 0 auto 32px;
    text-align: center;
}
.sb-matcher .sb-matcher-kicker {
    margin-bottom: 14px;
}
.sb-matcher .sb-matcher-h1 {
    margin: 0 0 14px;
    padding: 0;
    font-family: var(--sb-schrift-titel, 'Montserrat', sans-serif);
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: inherit;
}
.sb-matcher .sb-matcher-intro {
    max-width: 56ch;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.55;
    color: var(--sb-text-2, #4b5563);
}
.sb-basis-sektion--dunkel .sb-matcher-intro {
    color: rgba(255, 255, 255, 0.85);
}
.sb-matcher .sb-matcher-ohne-js {
    max-width: 680px;
    margin: 0 auto 24px;
    padding: 14px 18px;
    border-radius: var(--sb-radius-s, 12px);
    background: var(--sb-gelb, #e5de00);
    color: var(--sb-petrol-900, #021c1e);
    font-size: 16px;
    text-align: center;
}
.sb-matcher .sb-matcher-ohne-js a {
    color: inherit;
    font-weight: 700;
}

/* Buehne mit den Fragen */
.sb-matcher-buehne {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 22px;
    background: var(--sb-weiss, #ffffff);
    color: var(--sb-text, #111827);
    box-shadow: 0 22px 60px rgba(2, 28, 30, 0.22);
}
.sb-basis-sektion--hell .sb-matcher-buehne {
    border: 1px solid var(--sb-grau-200, #e5e7eb);
    box-shadow: var(--sb-schatten, 0 12px 34px rgba(2, 28, 30, 0.12));
}
.sb-matcher-leiste {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 10px;
}
.sb-matcher .sb-matcher-stand {
    margin: 0;
    font: 600 14px/1.4 var(--sb-schrift-titel, 'Montserrat', sans-serif);
    letter-spacing: 0.04em;
    color: var(--sb-petrol-700, #004445);
}
.sb-matcher-balken {
    height: 6px;
    margin-bottom: 28px;
    border-radius: 999px;
    background: var(--sb-grau-100, #f2f0eb);
    overflow: hidden;
}
.sb-matcher-balken-fuellung {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--sb-mint, #77c49b);
    transition: width 0.35s ease;
}

.sb-matcher-frage + .sb-matcher-frage {
    margin-top: 40px;
}
.sb-matcher--js .sb-matcher-frage + .sb-matcher-frage {
    margin-top: 0;
}
.sb-matcher .sb-matcher-frage-titel {
    margin: 0;
    padding: 0;
    font-family: var(--sb-schrift-titel, 'Montserrat', sans-serif);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: inherit;
}
.sb-matcher .sb-matcher-frage-titel:focus {
    outline: none;
}
.sb-matcher .sb-matcher-frage-titel:focus-visible {
    outline: 3px solid var(--sb-petrol-700, #004445);
    outline-offset: 4px;
}
.sb-matcher .sb-matcher-hinweis {
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--sb-text-2, #4b5563);
}

.sb-matcher-antworten {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}
.sb-matcher-antworten--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sb-matcher .sb-matcher-antwort {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    min-height: 132px;
    margin: 0;
    padding: 20px 16px;
    border: 2px solid var(--sb-grau-200, #e5e7eb);
    border-radius: 16px;
    background: var(--sb-grau-50, #faf9f6);
    color: var(--sb-text, #111827);
    font: 600 17px/1.3 var(--sb-schrift-titel, 'Montserrat', sans-serif);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.sb-matcher .sb-matcher-antwort:hover {
    border-color: var(--sb-petrol-700, #004445);
    transform: translateY(-2px);
}
.sb-matcher .sb-matcher-antwort:focus-visible {
    outline: 3px solid var(--sb-petrol-700, #004445);
    outline-offset: 2px;
}
.sb-matcher .sb-matcher-antwort[aria-pressed="true"] {
    border-color: var(--sb-petrol-700, #004445);
    background: #e3f3ea;
}
.sb-matcher .sb-matcher-antwort:disabled {
    cursor: default;
    transform: none;
}
.sb-matcher-symbol {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    max-width: none;
    color: var(--sb-petrol-700, #004445);
}
.sb-matcher-antwort-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sb-matcher-nav {
    display: flex;
    justify-content: flex-start;
    margin-top: 18px;
}
.sb-matcher .sb-matcher-textknopf {
    min-height: 44px;
    margin: 0;
    padding: 0 6px;
    border: 0;
    background: none;
    color: var(--sb-petrol-700, #004445);
    font: 600 15px/1.2 var(--sb-schrift-titel, 'Montserrat', sans-serif);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.sb-matcher .sb-matcher-textknopf:hover {
    color: var(--sb-petrol-900, #021c1e);
}
.sb-matcher .sb-matcher-textknopf:focus-visible {
    outline: 3px solid var(--sb-petrol-700, #004445);
    outline-offset: 2px;
}

.sb-matcher-rein {
    animation: sb-matcher-rein 0.32s ease-out both;
}
@keyframes sb-matcher-rein {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Ergebnis */
.sb-matcher-ergebnis-kopf {
    max-width: 760px;
    margin: 0 auto 30px;
    text-align: center;
}
.sb-matcher .sb-matcher-ergebnis-titel,
.sb-matcher .sb-matcher-mehr-titel {
    margin: 0;
    padding: 0;
    font-family: var(--sb-schrift-titel, 'Montserrat', sans-serif);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: inherit;
}
.sb-matcher .sb-matcher-ergebnis-titel:focus {
    outline: none;
}
.sb-matcher .sb-matcher-ergebnis-sub {
    margin: 12px auto 0;
    font-size: 17px;
    color: var(--sb-text-2, #4b5563);
}
.sb-basis-sektion--dunkel .sb-matcher-ergebnis-sub {
    color: rgba(255, 255, 255, 0.82);
}

.sb-matcher-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}
.sb-matcher-top[aria-busy="true"] {
    min-height: 320px;
}
.sb-matcher-treffer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.sb-matcher-treffer > .sb-karten-karte {
    flex: 1;
}
.sb-matcher .sb-matcher-weil {
    position: relative;
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--sb-radius-s, 12px);
    background: var(--sb-gelb, #e5de00);
    color: var(--sb-petrol-900, #021c1e);
    font-size: 16px;
    line-height: 1.45;
}
.sb-matcher .sb-matcher-weil::after {
    content: "";
    position: absolute;
    left: 26px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: inherit;
    transform: rotate(45deg);
}
.sb-matcher .sb-matcher-weil strong {
    font-family: var(--sb-schrift-titel, 'Montserrat', sans-serif);
    font-weight: 700;
}
.sb-matcher-top .sb-karten-karte .sb-karten-titel {
    font-size: 21px;
}

.sb-matcher-mehr {
    margin-top: 56px;
}
.sb-matcher .sb-matcher-mehr-titel {
    margin-bottom: 24px;
    font-size: clamp(24px, 3vw, 34px);
    text-align: center;
}
.sb-matcher-weitere {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.sb-matcher-ersatz {
    display: flex;
    align-items: center;
    min-height: 88px;
    padding: 18px 20px;
    border-radius: var(--sb-radius, 20px);
    background: var(--sb-weiss, #ffffff);
    color: var(--sb-petrol-700, #004445);
    box-shadow: var(--sb-schatten, 0 12px 34px rgba(2, 28, 30, 0.12));
    font: 700 18px/1.3 var(--sb-schrift-titel, 'Montserrat', sans-serif);
}

.sb-matcher-aktionen {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px 22px;
    margin-top: 44px;
}
.sb-matcher-alle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.sb-matcher .sb-matcher-meldung {
    min-height: 1.5em;
    margin: 14px 0 0;
    font-size: 15px;
    text-align: center;
}
.sb-matcher .sb-matcher-fuss {
    margin: 6px 0 0;
    text-align: center;
}
.sb-matcher .sb-matcher-fuss a {
    display: inline-block;
    padding: 12px 4px;
}
.sb-basis-sektion--dunkel .sb-matcher-fuss .sb-basis-sortier-link {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
    .sb-matcher-top {
        grid-template-columns: minmax(0, 1fr);
        max-width: 480px;
        margin: 0 auto;
    }
    .sb-matcher-weitere {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(240px, 72%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 4px 2px 16px;
    }
}

@media (max-width: 640px) {
    .sb-matcher-antworten,
    .sb-matcher-antworten--3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin-top: 18px;
    }
    .sb-matcher .sb-matcher-antwort {
        flex-direction: row;
        justify-content: flex-start;
        min-height: 64px;
        padding: 12px 16px;
        font-size: 16px;
        text-align: left;
    }
    .sb-matcher-symbol {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }
    .sb-matcher-buehne {
        border-radius: 18px;
    }
    .sb-matcher-aktionen .sb-basis-knopf {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-matcher-rein {
        animation: none;
    }
    .sb-matcher .sb-matcher-antwort,
    .sb-matcher-balken-fuellung {
        transition: none;
    }
    .sb-matcher .sb-matcher-antwort:hover {
        transform: none;
    }
}
