/*
 * Terminbuchung — die öffentliche Buchungsseite (01.11.2026, T3).
 *
 * Bewusst schlank und ohne die Admin-Stile: die Seite steht später auch eingebettet auf fremden Websites (T5). Farben NUR
 * aus Systemfarben (Canvas/CanvasText folgen dem Hell/Dunkel des Geräts) und der Firmenfarbe des Betriebs
 * (--jumpx-marke aus jumpx_brand_head_vars()) — keine festen Farben (css-farben-ratsche-test.php).
 */
@font-face {
    font-family: "Geist";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../plugins/geist/Geist-Variable.woff2?v=1.8.2") format("woff2");
}

:root {
    color-scheme: light dark;
    --t-grund: Canvas;
    --t-text: CanvasText;
    --t-leise: color-mix(in srgb, CanvasText 62%, Canvas);
    --t-rand: color-mix(in srgb, CanvasText 15%, Canvas);
    --t-flaeche: color-mix(in srgb, CanvasText 4%, Canvas);
    --t-marke: var(--jumpx-marke);
    --t-marke-text: var(--jumpx-marke-kontrast);
    --t-marke-zart: color-mix(in srgb, var(--jumpx-marke) 13%, Canvas);
    /* Schrift in Firmenfarbe: mit der Textfarbe gemischt — hell dunkler, nachts heller, in beiden Fällen gut lesbar */
    --t-marke-schrift: color-mix(in srgb, var(--jumpx-marke) 72%, CanvasText);
    --t-fehler: color-mix(in srgb, CanvasText 30%, red);
    --t-radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.jx-termin {
    font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--t-text);
    background: var(--t-flaeche);
    -webkit-font-smoothing: antialiased;
}
.jx-termin a { color: var(--t-marke-schrift); }
.jx-termin-huelle { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; }
.jx-termin-karte {
    background: var(--t-grund);
    border: 1px solid var(--t-rand);
    border-radius: var(--t-radius);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}
@media (min-width: 768px) {
    .jx-termin-karte { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
    .jx-termin-karte.jx-termin-einspaltig { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
    .jx-termin-info { border-right: 1px solid var(--t-rand); }
}
.jx-termin-info, .jx-termin-wahl { padding: 24px; }
.jx-termin-info { border-bottom: 1px solid var(--t-rand); }
@media (min-width: 768px) { .jx-termin-info { border-bottom: 0; } }
.jx-termin-logo { max-height: 48px; max-width: 200px; display: block; margin-bottom: 16px; }
.jx-termin-firma { color: var(--t-leise); font-size: 14px; margin: 0 0 4px; }
.jx-termin h1 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; font-weight: 650; }
.jx-termin h2 { font-size: 18px; margin: 0 0 16px; font-weight: 600; }
.jx-termin-fakten { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; color: var(--t-leise); }
.jx-termin-fakten li { display: flex; gap: 10px; align-items: flex-start; }
.jx-termin-fakten i { width: 18px; text-align: center; margin-top: 4px; }
.jx-termin-text { white-space: pre-line; margin: 0; }

/* Monat + Uhrzeiten: nebeneinander, wenn Platz ist (Container der Wahl-Spalte) */
.jx-termin-wahl { container-type: inline-size; container-name: jx-termin-wahl; }
.jx-termin-schritt[hidden] { display: none; }
.jx-termin-tagwahl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@container jx-termin-wahl (min-width: 560px) {
    .jx-termin-tagwahl { grid-template-columns: minmax(0, 1fr) 190px; }
}
.jx-termin-monat-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jx-termin-monat-kopf strong { font-size: 16px; font-weight: 600; }
.jx-termin-pfeil {
    border: 1px solid var(--t-rand); background: var(--t-grund); color: var(--t-text); width: 40px; height: 40px;
    border-radius: 999px; cursor: pointer; font-size: 15px;
}
.jx-termin-pfeil:disabled { opacity: .35; cursor: default; }
.jx-termin-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.jx-termin-wtag { font-size: 12px; color: var(--t-leise); padding: 4px 0; }
.jx-termin-tag {
    aspect-ratio: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--t-leise);
    font: inherit; font-size: 15px; cursor: default;
}
.jx-termin-tag.frei { background: var(--t-marke-zart); color: var(--t-marke-schrift); font-weight: 600; cursor: pointer; }
.jx-termin-tag.gewaehlt { background: var(--t-marke); color: var(--t-marke-text); }
.jx-termin-tag.heute { text-decoration: underline; text-underline-offset: 4px; }
.jx-termin-zeiten-titel { font-weight: 600; margin: 4px 0 12px; }
.jx-termin-zeiten { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.jx-termin-zeit {
    border: 1px solid var(--t-marke); color: var(--t-marke-schrift); background: var(--t-grund); border-radius: 8px;
    min-height: 44px; font: inherit; font-weight: 600; cursor: pointer;
}
.jx-termin-zeit:hover, .jx-termin-zeit:focus-visible { background: var(--t-marke); color: var(--t-marke-text); }
.jx-termin-zone { font-size: 13px; color: var(--t-leise); margin-top: 12px; }
.jx-termin-leer { color: var(--t-leise); }

/* Angaben */
.jx-termin-gewaehlt {
    display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
    background: var(--t-marke-zart); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
}
.jx-termin-gewaehlt strong { color: var(--t-marke-schrift); }
.jx-termin-link { background: none; border: 0; color: var(--t-marke-schrift); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.jx-termin-feld { margin-bottom: 16px; }
.jx-termin-feld label { display: block; font-weight: 600; margin-bottom: 6px; }
.jx-termin-feld .pflicht { color: var(--t-fehler); }
.jx-termin input[type="text"], .jx-termin input[type="email"], .jx-termin input[type="tel"], .jx-termin select, .jx-termin textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--t-text);
    background: var(--t-grund); border: 1px solid color-mix(in srgb, CanvasText 35%, Canvas); border-radius: 8px;
}
.jx-termin textarea { min-height: 96px; resize: vertical; }
.jx-termin input:focus, .jx-termin select:focus, .jx-termin textarea:focus { outline: 2px solid var(--t-marke); outline-offset: 1px; }
.jx-termin-haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.jx-termin-haken input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--t-marke); }
.jx-termin-knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
    background: var(--t-marke); color: var(--t-marke-text); border: 0; border-radius: 8px; font: inherit; font-weight: 600;
    cursor: pointer; width: 100%;
}
@media (min-width: 768px) { .jx-termin-knopf { width: auto; } }
.jx-termin-knopf[disabled] { opacity: .6; cursor: wait; }
.jx-termin-hinweis { font-size: 13px; color: var(--t-leise); margin: 16px 0 0; }
.jx-termin-fehler { color: var(--t-fehler); font-weight: 600; margin: 0 0 16px; }
.jx-termin-fehler[hidden] { display: none; }
.jx-termin-fuss { text-align: center; font-size: 12px; color: var(--t-leise); margin-top: 16px; }
.jx-termin-fuss a { color: var(--t-leise); }

/* Liste der Terminarten und Danke-Seite */
.jx-termin-liste { display: grid; gap: 12px; }
.jx-termin-eintrag {
    display: block; padding: 20px 24px; background: var(--t-grund); border: 1px solid var(--t-rand); border-radius: var(--t-radius);
    text-decoration: none; color: var(--t-text) !important;
}
.jx-termin-eintrag:hover, .jx-termin-eintrag:focus-visible { border-color: var(--t-marke); }
.jx-termin-eintrag strong { display: block; font-size: 18px; color: var(--t-marke-schrift); }
.jx-termin-eintrag span { color: var(--t-leise); }
.jx-termin-danke { padding: 32px 24px; text-align: center; }
.jx-termin-danke .jx-termin-haken-gross {
    width: 56px; height: 56px; border-radius: 999px; background: var(--t-marke-zart); color: var(--t-marke);
    display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; color: var(--t-marke-schrift);
}
.jx-termin-danke .jx-termin-fakten { justify-items: center; }

/* Termin verwalten (T4): Verschieben und Absagen als aufklappbare Abschnitte */
.jx-termin-aktion { border: 1px solid var(--t-rand); border-radius: 8px; margin-bottom: 12px; }
.jx-termin-aktion > summary {
    list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; min-height: 48px;
}
.jx-termin-aktion > summary::-webkit-details-marker { display: none; }
.jx-termin-aktion[open] > summary { border-bottom: 1px solid var(--t-rand); }
.jx-termin-aktion-inhalt { padding: 16px; }
.jx-termin-knopf-leise { background: var(--t-grund); color: var(--t-text); border: 1px solid color-mix(in srgb, CanvasText 35%, Canvas); }

/* Gruppentermine (T5): die nächsten Termine als Liste — Tag, Uhrzeit, freie Plätze */
.jx-termin-gruppe-wahl { grid-template-columns: minmax(0, 1fr) !important; }
.jx-termin-termine { display: grid; gap: 8px; }
.jx-termin-termin {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; text-align: left;
    border: 1px solid var(--t-marke); background: var(--t-grund); color: var(--t-text); border-radius: 8px;
    min-height: 56px; padding: 10px 14px; font: inherit; cursor: pointer;
}
.jx-termin-termin strong { color: var(--t-marke-schrift); font-weight: 600; }
.jx-termin-termin > span:nth-child(2) { grid-column: 1; color: var(--t-leise); font-size: 15px; }
.jx-termin-termin-frei { grid-column: 2; grid-row: 1 / span 2; font-size: 14px; font-weight: 600; color: var(--t-marke-schrift); white-space: nowrap; }
.jx-termin-termin:hover:not(:disabled), .jx-termin-termin:focus-visible { background: var(--t-marke-zart); }
.jx-termin-termin.voll { border-color: var(--t-rand); cursor: default; }
.jx-termin-termin.voll strong, .jx-termin-termin.voll .jx-termin-termin-frei { color: var(--t-leise); }

/* Eingebettet auf einer fremden Website (?einbetten=1, T5): kein Seitenhintergrund, kaum Rand — die Website gibt den Rahmen.
   Keine Höhe aus dem Fenster (100vh): der Rahmen wächst mit dem Inhalt, eine Höhe aus dem Fenster wüchse mit ihm um die Wette. */
body.jx-termin-eingebettet { background: transparent; }
.jx-termin-eingebettet .jx-termin-huelle { padding: 2px 2px 8px; max-width: none; }
.jx-termin-eingebettet .jx-termin-fuss { margin-top: 8px; }

/* Hinweis „Terminbuchung mit JumpX OS“ (T6, E6): klein unter dem Fuß */
.jx-termin-marke { margin-top: 4px; font-size: 11px; }
.jx-termin-marke a { text-decoration: none; }
