/* Persönlicher Ansprechpartner auf Kategorieseiten – Entwurf B2 „Name mit Status-Plakette“ (Lukas, 11.11.2026).
   Vorlage component/kaelte-ansprechpartner/kategorie.html.twig, geladen nur auf Seiten mit Person (base.html.twig).
   Hell wie die Karte der Produktseite (kpdp-apkarte): Foto, „Persönliche Beratung“, Name mit grüner Plakette
   „Jetzt erreichbar“ (grau außerhalb der Zeiten, kaelte-ansprechpartner.js), Satz, Zeiten; Telefon und E-Mail;
   rechts zwei Hilfe-Wege. Am Handy am Ende der Liste, untereinander. */

.kap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 26px;
    margin: 0 0 16px;
    padding: 22px 24px;
    border-radius: 5px;
    background: #EAF6FD;
    color: #454444;
    font-size: 14px;
    line-height: 1.4;
}

.kap__foto {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
}

.kap__foto.kpdp-ap-foto--leer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b757d;
    font-size: 40px;
}

.kap__text {
    flex: 1 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kap__eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: #1A8AB8;
}

.kap__kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.kap__name {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: #2e2e2e;
}

.kap__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #E1E7EB;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: #4a545c;
}

.kap__live[hidden] {
    display: none;
}

.kap__live::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa4ab;
}

.kap__live.is-offen {
    background: #D3EFDD;
    color: #1A6E34;
}

.kap__live.is-offen::before {
    background: #2EAD5B;
}

.kap__satz {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: #2e2e2e;
    text-wrap: pretty;
}

.kap__zeiten {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5b6670;
}

.kap__knoepfe {
    flex: 0 1 230px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kap__btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.kap__btn--primaer {
    background: #69C8F3;
    color: #000;
}

.kap__btn--primaer:hover,
.kap__btn--primaer:focus-visible {
    background: #3AACDE;
    color: #000;
}

.kap__btn--rand {
    border: 1px solid #69C8F3;
    background: #fff;
    color: #2e2e2e;
}

.kap__btn--rand:hover,
.kap__btn--rand:focus-visible {
    border-color: #3AACDE;
    color: #2e2e2e;
}

.kap__wege {
    flex: 0 1 290px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 24px;
    border-left: 1px solid #c8e3f2;
}

.kap__weg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 5px;
    background: #fff;
    color: #2e2e2e;
    text-decoration: none;
}

.kap__weg:hover,
.kap__weg:focus-visible {
    color: #2e2e2e;
    box-shadow: 0 0 0 1px #69C8F3;
}

.kap__weg > .bi:first-child {
    flex: none;
    font-size: 18px;
    color: #1A8AB8;
}

.kap__weg > span {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kap__weg b {
    font-weight: 600;
}

.kap__weg small {
    font-size: 13px;
    color: #5b6670;
}

.kap__pfeil {
    flex: none;
    color: #1A8AB8;
}

/* Den Kasten des Plugins gibt es dann nicht mehr (kaelte-ansprechpartner.js nimmt ihn auch heraus) */
body:has(.kap) .cms-element-product-listing > h4:has(+ .card-body .cogi-contact-person-img-container),
body:has(.kap) .cms-element-product-listing > .card-body:has(.cogi-contact-person-img-container),
body:has(.kap) .kfp-ap {
    display: none !important;
}

/* Mittlere Breiten: Hilfe-Wege als Zeile unter Person und Knöpfen */
@media (max-width: 1199.98px) {
    .kap__wege {
        flex: 1 1 100%;
        flex-direction: row;
        padding: 16px 0 0;
        border-left: 0;
        border-top: 1px solid #c8e3f2;
    }

    .kap__weg {
        flex: 1 1 0;
    }
}

/* Handy: am Ende der Liste (die Liste ist dort eine Flex-Spalte, die Hilfe unter der Liste hat order 1),
   Foto links neben Überschrift und Name, alles andere darunter in voller Breite. */
@media (max-width: 767.98px) {
    .kap {
        order: 2;
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 10px;
        align-items: center;
        margin: 24px 0 0;
        padding: 18px 16px;
    }

    .kap__foto {
        grid-row: 1 / span 2;
        width: 72px;
        height: 72px;
        box-shadow: 0 0 0 3px #fff;
    }

    .kap__foto.kpdp-ap-foto--leer {
        font-size: 30px;
    }

    .kap__text {
        display: contents;
    }

    .kap__eyebrow {
        grid-column: 2;
        align-self: end;
        font-size: 12px;
    }

    .kap__kopf {
        grid-column: 2;
        align-self: start;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .kap__name {
        font-size: 19px;
    }

    .kap__live {
        padding: 3px 9px;
        font-size: 12px;
    }

    .kap__satz,
    .kap__zeiten,
    .kap__knoepfe,
    .kap__wege {
        grid-column: 1 / -1;
    }

    .kap__satz {
        margin: 0;
    }

    .kap__zeiten {
        font-size: 12px;
    }

    .kap__wege {
        flex-direction: column;
        padding: 12px 0 0;
    }

    /* Wo die Hilfe unter der Liste schon „Ersatzteil anfragen“ anbietet, fallen die Wege weg (wie bisher) */
    .cms-element-product-listing:has(.kvl-hilfe) > .kap .kap__wege {
        display: none;
    }
}
