/* Ergänzungen nur für das WordPress-Theme (nicht im Prototyp). */

/* E-Mail-Reveal im Team: Button sieht aus wie der bisherige „Mail“-Link */
.tgf-reveal { display: block; }
.tgf-reveal-btn {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--navy-alt);
    text-transform: uppercase;
    cursor: pointer;
}
.tgf-reveal-btn:hover { color: var(--navy); }
.tgf-reveal-btn:disabled { opacity: 0.55; cursor: default; }
.tgf-reveal .tgf-reveal-link {
    text-transform: none;
    font-size: 15px;
    overflow-wrap: anywhere;
}
.tgf-reveal-error { display: block; font-size: 13px; color: #8f3927; }
.tgf-reveal [hidden] { display: none; }

/* Honeypot-Feld der Formulare: für Menschen unsichtbar, Bots füllen es aus */
.tgf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Kontakt: Anfahrt (Text links, Karte rechts) */
.kt-anfahrt { background: var(--white); padding: 70px 0; }
.kt-anfahrt-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 50px;
    align-items: stretch;
}
.kt-anfahrt-text p { font-size: 18px; line-height: 1.6; color: var(--navy-alt); margin-bottom: 16px; }
.kt-anfahrt-text a { text-decoration: underline; }
.kt-anfahrt-text .btn { text-decoration: none; }
.kt-karte { position: relative; min-height: 360px; background: var(--cream-card); }
.kt-karte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kt-karte-load {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 20px;
    background: transparent;
    font: inherit;
    color: var(--navy-alt);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}
.kt-karte-btn {
    background: var(--navy);
    color: var(--white);
    padding: 12px 28px;
    text-transform: uppercase;
    transition: background 0.2s;
}
.kt-karte-load:hover .kt-karte-btn { background: var(--navy-dark); }
.kt-karte-load small { font-size: 14px; color: var(--text-muted); }
@media (max-width: 860px) {
    .kt-anfahrt { padding: 50px 0; }
    .kt-anfahrt-split { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .kt-karte { min-height: 300px; }
}

/* Cookie-Banner: unten rechts (Desktop), unten über die ganze Breite (mobil) */
.consent {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    width: min(440px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--white);
    color: var(--navy-alt);
    padding: 24px 24px 20px;
    box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.22);
    border-top: 4px solid var(--navy);
}
.consent[hidden] { display: none; }
.consent__title { font-size: 20px; font-weight: var(--fw-bold); text-transform: uppercase; margin: 0 0 10px; }
.consent__text { font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.consent__text a { text-decoration: underline; }
.consent__details { margin: 0 0 16px; border-top: 1px solid var(--border-muted); }
.consent__row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border-muted); cursor: pointer; }
.consent__row input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--navy); }
.consent__row strong { display: block; font-weight: var(--fw-bold); }
.consent__row small { display: block; font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.consent__buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.consent__btn {
    flex: 1 1 140px;
    padding: 12px 16px;
    font: inherit;
    font-size: 15px;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--navy);
    transition: background 0.2s, color 0.2s;
}
.consent__btn:hover { background: var(--cream-card); }
.consent__btn--primary, .consent__btn--save { background: var(--navy); color: var(--white); }
.consent__btn--primary:hover, .consent__btn--save:hover { background: var(--navy-dark); }
.consent__btn[hidden], .consent__link[hidden] { display: none; }
.consent__link { flex-basis: 100%; background: none; border: 0; padding: 4px 0 0; font: inherit; font-size: 14px; color: var(--navy-alt); text-decoration: underline; cursor: pointer; text-align: left; }
.consent-pending .nl-promo { display: none; }
@media (max-width: 600px) {
    .consent { left: 0; right: 0; bottom: 0; width: auto; max-height: 85vh; padding: 20px 16px 16px; }
}

/* Footer: Cookie-Symbol mit Tooltip (neben den Social-Icons) */
.footer-consent {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    color: var(--white);
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.footer-consent:hover, .footer-consent:focus-visible { opacity: 1; }
.footer-consent::after {
    content: attr(data-tip);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    background: var(--white);
    color: var(--navy-alt);
    box-shadow: 0 4px 14px rgba(var(--black-rgb), 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.footer-consent:hover::after, .footer-consent:focus-visible::after { opacity: 1; transform: none; }
.consent-open-btn { cursor: pointer; }

/* Nach-oben-Pfeil: gleicher Abstand zum Rand wie das Newsletter-Fenster (24 px, mobil 12 px) */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 95;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: var(--navy);
    box-shadow: 0 12px 26px rgba(var(--black-rgb), 0.26);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--navy-dark); }
.consent-pending .to-top,
html.nl-open .to-top { display: none; }
@media (max-width: 600px) {
    .to-top { right: 12px; bottom: 12px; width: 44px; height: 44px; }
}

/* Terminformular: Checkboxen als Auswahl-Kacheln, Marken-/Zeit-Reihen, Pflicht-Auswahl */
.form-choice input[type="checkbox"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-choice input[type="checkbox"]:checked + .model-option { border-color: var(--navy); background: var(--white); }
.form-choice input[type="checkbox"]:focus-visible + .model-option,
.form-choice input[type="radio"]:focus-visible + .model-option { border-color: var(--steel); }
/* Kurze Auswahlen (Art, Kunde, Marke, Tageszeit): Kacheln wachsen mit dem Text und brechen um, statt ihn abzuschneiden */
.model-options.form-brands,
.model-options.form-times { display: flex; flex-wrap: wrap; gap: 10px; }
.form-brands > .model-option,
.form-times > .model-option { flex: 1 1 150px; text-align: center; white-space: nowrap; }
.form-times > .model-option { flex-basis: 120px; }
/* Längere Auswahllisten (z. B. Anliegen): Text darf umbrechen, nie abgeschnitten werden */
.model-option { overflow-wrap: anywhere; }

.form-row--spaced { margin-top: 18px; }
.form-block.is-invalid .form-block-title { color: #c8553d; }
.form-block.is-invalid .model-option { border-color: #c8553d; }

/* Suche: Feld unter der Navigation, Ergebnisseite */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.nav-search { cursor: pointer; }
.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 55;
    background: var(--navy-nav);
    color: var(--white);
    padding: 22px 0 20px;
    box-shadow: 0 12px 26px rgba(var(--black-rgb), 0.25);
}
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: 12px; align-items: stretch; position: relative; }
.search-form .form-input { flex: 1 1 auto; min-width: 0; font-size: 18px; }
.search-panel .search-form { padding-right: 52px; }
.search-close {
    position: absolute;
    right: 0; top: 0;
    width: 46px; height: 100%;
    min-height: 46px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.search-close::before, .search-close::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 20px; height: 2px;
    background: var(--white);
    transform: translate(-50%, -50%) rotate(45deg);
}
.search-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.search-panel .search-quick { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.search-panel .search-quick a { color: var(--white); text-decoration: underline; opacity: 0.85; }
.search-panel .search-quick a:hover { opacity: 1; }

.search-results .search-form { margin-bottom: 28px; max-width: 760px; }
.search-count { color: var(--text-muted); margin-bottom: 14px; }
.search-list { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.search-item { border-bottom: 1px solid var(--border-muted); }
.search-item a { display: block; padding: 20px 0; color: inherit; text-decoration: none; }
.search-item a:hover .search-title { color: var(--navy-dark); text-decoration: underline; }
.search-type {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 10px;
    font-size: 12px;
    text-transform: uppercase;
    background: var(--cream-card);
    color: var(--navy-alt);
}
.search-title { display: block; font-size: 24px; font-weight: var(--fw-bold); color: var(--navy-alt); line-height: 1.2; margin-bottom: 6px; }
.search-snippet { display: block; font-size: 17px; line-height: 1.5; color: var(--text); }
.search-snippet mark { background: #f6e3a1; color: inherit; padding: 0 1px; }
.search-empty { font-size: 18px; margin-bottom: 18px; }
.search-results .search-quick { display: flex; flex-wrap: wrap; gap: 12px; }
.search-pagination { margin-top: 30px; }
.search-pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.search-pagination a, .search-pagination span {
    display: inline-block; min-width: 40px; padding: 8px 12px; text-align: center;
    border: 1px solid var(--border-muted); color: var(--navy-alt);
}
.search-pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }
@media (max-width: 860px) {
    .search-panel { padding: 16px 0; }
    .search-form { flex-wrap: wrap; }
    .search-panel .search-form { padding-right: 46px; }
    .search-panel .search-form .btn { display: none; } /* Enter / Tastatur-Taste „Suchen" genügt */
    .search-title { font-size: 20px; }
}

/* ==========================================================================
   Fenster (Anfrage / Konfigurator) und Sicherheitscheck-Anmeldung:
   kein Scrollen im Fenster. Abstände und Schriften richten sich nach der
   Höhe des Bildschirms; bei sehr wenig Platz entfallen Nebensächlichkeiten
   (Einleitung, Hinweise). Nur im äussersten Notfall scrollt der Hintergrund –
   nie das Fenster selbst.
   ========================================================================== */
.modal { align-items: flex-start; overflow-y: auto; padding: clamp(8px, 2.4vh, 24px); }
.modal-box {
    margin: auto;
    max-height: none;
    overflow: visible;
    padding: clamp(14px, 4.4vh, 44px) clamp(18px, 4.4vw, 44px) clamp(14px, 3.8vh, 38px);
}
.modal-pretitle { margin-bottom: clamp(2px, 0.6vh, 6px); }
.modal-title { margin-bottom: clamp(6px, 1.4vh, 12px); font-size: clamp(22px, 3.9vh, 30px); }
.modal-text { margin-bottom: clamp(10px, 2.4vh, 22px); font-size: clamp(14px, 2.2vh, 17px); line-height: 1.4; }
.modal-phone { margin-bottom: clamp(10px, 2.6vh, 26px); padding: clamp(8px, 1.8vh, 16px) 20px; }
.modal-phone a { font-size: clamp(18px, 3vh, 24px); }
.modal-secondary { margin-top: clamp(10px, 2.6vh, 26px); padding-top: clamp(10px, 2.2vh, 22px); }
.modal-secondary p { margin-bottom: clamp(6px, 1.4vh, 12px); }
/* Formularfelder im Fenster: kompakt, Vor- und Nachname immer nebeneinander */
.modal-form .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.modal-form .form-group { margin-bottom: clamp(7px, 1.5vh, 16px); }
.modal-form .form-label { margin-bottom: clamp(2px, 0.6vh, 6px); font-size: clamp(11px, 1.6vh, 13px); }
.modal-form .form-input,
.modal-form .form-select { padding: clamp(8px, 1.5vh, 13px) 14px; }
.modal-form .form-textarea { min-height: clamp(54px, 9vh, 120px); height: clamp(54px, 9vh, 120px); }
.modal-form .form-error { margin: 0 0 8px; }
.modal-form .form-submit { padding: clamp(10px, 1.9vh, 16px) 16px; }

/* Wenig Höhe: Einleitung und Zusatzzeilen entfallen */
@media (max-height: 700px) {
    .modal-text { display: none; }
    .modal-phone span { display: none; }
}
@media (max-height: 560px) {
    .modal-pretitle { display: none; }
    .modal-secondary { display: none; }
    .modal-form .form-optional { display: none; }
}

/* Sicherheitscheck-Anmeldung: dasselbe Prinzip */
.nl-promo__panel { padding-top: clamp(50px, 8vh, 60px); padding-bottom: clamp(14px, 3vh, 24px); }
.nl-promo__title { font-size: clamp(18px, 3.2vh, 21px); }
.nl-promo__text { margin-bottom: clamp(8px, 1.8vh, 14px); }
.nl-promo__details { margin-bottom: clamp(10px, 2.2vh, 18px); }
.nl-promo__input { margin-bottom: clamp(8px, 1.5vh, 12px); padding-top: clamp(8px, 1.5vh, 12px); padding-bottom: clamp(8px, 1.5vh, 12px); }
@media (max-height: 640px) {
    .nl-promo__details { display: none; }
}
@media (max-height: 520px) {
    .nl-promo__text, .nl-promo__note { display: none; }
}

/* Querformat am Handy (sehr niedrig): Felder paarweise nebeneinander */
@media (max-height: 480px) {
    .modal-box { padding: 10px 18px 12px; }
    .modal-title { margin: 0 44px 6px 0; font-size: 20px; }
    .modal-close { top: 8px; right: 8px; width: 32px; height: 32px; }
    .modal-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
    .modal-form .form-row,
    .modal-form .form-group:has(textarea),
    .modal-form .form-error,
    .modal-form .form-submit,
    .modal-form .tgf-hp { grid-column: 1 / -1; }
    .modal-form .form-group { margin-bottom: 6px; }
    .modal-form .form-label { margin-bottom: 1px; font-size: 10px; }
    .modal-form .form-input,
    .modal-form .form-select { padding: 6px 12px; font-size: 15px; }
    .modal-form .form-textarea { min-height: 34px; height: 34px; padding-top: 6px; padding-bottom: 6px; }
    .modal-form .form-submit { padding: 9px 16px; }
    .modal-phone { margin-bottom: 8px; padding: 6px 14px; }
    .nl-promo__panel { padding-top: 46px; }
}

/* Telefon-Symbol im Konfigurator-Fenster: Vektor statt kleinem Bild (scharf bei jeder Grösse) */
.modal-phone-icon { flex-shrink: 0; width: 28px; height: 28px; color: var(--navy-alt); }
