/* ==========================================================================
   Sprinx Terminservice – Stylesheet
   CI aus sprinx-ses.de: Petrol #087E9D, Limette #BFC90B, Akzent #D44B01,
   Schriften Ubuntu (Überschriften) + Roboto (Text) – lokal eingebunden (DSGVO).
   Mobile first, keine externen Abhängigkeiten.
   ========================================================================== */

/* ---------- Schriften (lokal) ---------- */
@font-face { font-family: "Ubuntu"; font-weight: 400; font-display: swap; src: url("../fonts/ubuntu-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 500; font-display: swap; src: url("../fonts/ubuntu-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 700; font-display: swap; src: url("../fonts/ubuntu-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 300; font-display: swap; src: url("../fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }

/* ---------- Design-Tokens ---------- */
:root {
  --petrol: #087E9D;
  --petrol-dark: #05637c;
  --petrol-deep: #054a5d;
  --petrol-soft: #e6f3f6;
  --lime: #BFC90B;
  --lime-bright: #D3E736;
  --lime-soft: #f5f7d9;
  --orange: #D44B01;
  --orange-soft: #fcebe1;
  --text: #2f3436;
  --text-muted: #5A5A5A;
  --bg: #F9F6F3;
  --surface: #ffffff;
  --line: #e4dfd9;
  --red: #b42318;
  --red-soft: #fdecea;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(5, 74, 93, .06), 0 8px 24px rgba(5, 74, 93, .08);
  --shadow-lg: 0 2px 4px rgba(5, 74, 93, .06), 0 18px 40px rgba(5, 74, 93, .12);
  --font-head: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-underline-offset: 2px; }
a:hover { color: var(--petrol-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: var(--petrol-deep); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-head); font-weight: 500; letter-spacing: .08em; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* ---------- Icons ---------- */
.icon { width: 22px; height: 22px; flex: none; vertical-align: -5px; }
.icon--sm { width: 18px; height: 18px; vertical-align: -4px; }
.icon--lg { width: 34px; height: 34px; }
.icon--xl { width: 56px; height: 56px; }

/* ---------- Kopfzeile ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding-top: 10px; padding-bottom: 10px; }
.brand img { width: 128px; }
.client { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
.client__label { font: 500 11px/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.client__logo { height: 34px; width: auto; max-width: 150px; object-fit: contain; }
.client__name { font-family: var(--font-head); color: var(--petrol-deep); font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--petrol) 0%, var(--petrol-dark) 60%, var(--petrol-deep) 100%);
  padding: 34px 0 78px;
}
.hero__leaf { position: absolute; right: -90px; bottom: -90px; width: 280px; opacity: .45; pointer-events: none; }
.hero__inner { position: relative; }
.hero h1 { color: #fff; font-size: clamp(26px, 6vw, 40px); font-weight: 700; max-width: 18ch; }
.hero__lead { font-weight: 300; font-size: 17px; max-width: 56ch; color: rgba(255,255,255,.92); margin: 0; }
.eyebrow {
  display: inline-block; font: 500 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  color: var(--petrol-deep); background: var(--lime-bright); padding: 6px 10px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Inhalt ---------- */
.main { position: relative; z-index: 1; margin-top: -52px; padding-bottom: 48px; }
.grid { display: grid; gap: 20px; }
.stack { display: grid; gap: 20px; align-content: start; }
.narrow { max-width: 560px; margin: 20px auto 0; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.card--raised { box-shadow: var(--shadow-lg); border-color: transparent; }
.card--soft { background: #fffdfb; }
.card--compact { padding: 18px 20px; }
.card--compact p { margin: 0; font-size: 15px; }
.card__title { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.card__title .icon { color: var(--petrol); }
.card__title--sm { font-size: 16px; }

/* ---------- Terminkarte ---------- */
.appt {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--lime);
}
.appt__date {
  flex: none; width: 76px; text-align: center; border-radius: 12px; overflow: hidden;
  background: var(--petrol-soft); color: var(--petrol-deep); font-family: var(--font-head);
}
.appt__wd { display: block; background: var(--petrol); color: #fff; font: 500 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em; padding: 7px 0; }
.appt__day { display: block; font-size: 34px; font-weight: 700; line-height: 1.1; padding-top: 6px; }
.appt__mon { display: block; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 8px; }
.appt__list { margin: 0; flex: 1; min-width: 0; display: grid; gap: 8px; }
.appt__row { display: grid; grid-template-columns: 1fr; gap: 0; }
.appt__row dt { font: 500 12px/1.4 var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.appt__row dt .icon { color: var(--petrol); width: 15px; height: 15px; }
.appt__row dd { margin: 0; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.appt__row--main dd { font: 700 18px/1.3 var(--font-head); color: var(--petrol-deep); }

/* ---------- Hinweise ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px; box-shadow: var(--shadow); background: var(--surface); border-left: 5px solid var(--petrol); }
.notice p { margin: 0; }
.notice .icon { margin-top: 2px; color: var(--petrol); }
.notice--info { border-left-color: var(--petrol); background: var(--petrol-soft); }
.notice--warn { border-left-color: var(--orange); background: var(--orange-soft); }
.notice--warn .icon { color: var(--orange); }
.notice--error { border-left-color: var(--red); background: var(--red-soft); }
.notice--error .icon { color: var(--red); }

/* ---------- Formular ---------- */
.form { display: grid; gap: 20px; }
.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.legend { font: 700 18px/1.3 var(--font-head); color: var(--petrol-deep); margin-bottom: 12px; padding: 0; }
.legend--sm { font-size: 15px; margin-bottom: 8px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.label { font: 500 15px/1.3 var(--font-head); color: var(--text); }
.label--sm { font-size: 13px; color: var(--text-muted); }
.req { color: var(--orange); }
.optional { font: 400 12px/1 var(--font-text); color: var(--text-muted); background: var(--bg); border-radius: 999px; padding: 3px 8px; margin-left: 4px; vertical-align: 2px; }
.hint { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.row2 { display: grid; gap: 14px; }

.input {
  width: 100%; font: 400 16px/1.4 var(--font-text); color: var(--text);
  background: #fff; border: 1.5px solid #cfd8db; border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px; transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23087E9D' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px;
}
textarea.input { resize: vertical; min-height: 110px; }
.input:hover { border-color: #9fb6bd; }
.input:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 4px rgba(8, 126, 157, .15); }
.input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(180, 35, 24, .08); }
.field-error { color: var(--red); font-size: 14px; margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.counter { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: -2px; }

/* Code-Eingabe */
.codeform { display: grid; gap: 10px; }
.input--code {
  font: 700 28px/1 var(--font-head); letter-spacing: .3em; text-transform: uppercase; text-align: center;
  padding: 16px 12px; min-height: 64px; border-width: 2px;
}
.input--code::placeholder { letter-spacing: .12em; font-weight: 400; font-size: 18px; color: #a9b3b6; }
.letter { width: 100%; max-width: 300px; margin: 4px auto 16px; }

/* Auswahlkarten verschieben/absagen */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice__item { position: relative; cursor: pointer; }
.choice__item input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 14px; background: #fff;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}
.choice__box .icon { color: var(--petrol); }
.choice__title { font: 700 16px/1.25 var(--font-head); color: var(--petrol-deep); }
.choice__text { font-size: 13.5px; color: var(--text-muted); line-height: 1.4; }
.choice__item:hover .choice__box { border-color: #a9cdd7; }
.choice__item input:checked + .choice__box { border-color: var(--petrol); background: var(--petrol-soft); box-shadow: inset 0 0 0 1px var(--petrol); }
.choice__item input:focus-visible + .choice__box { outline: 3px solid var(--lime); outline-offset: 2px; }
.choice__item input[value="absagen"]:checked + .choice__box { border-color: var(--orange); background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange); }
.choice__item input[value="absagen"] + .choice__box .icon { color: var(--orange); }
.choice__item:active .choice__box { transform: scale(.985); }

/* Wunschzeitraum nur bei "verschieben" (ohne JS über :has) */
.wunsch { background: var(--bg); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.form:has(#aktion-absagen:checked) .wunsch { display: none; }

/* Tageszeit-Pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid #cfd8db; background: #fff; font-size: 14px; transition: all .15s; }
.pill input:checked + span { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }

/* Checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--petrol); flex: none; }
.check.is-invalid span { color: var(--red); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 16px/1 var(--font-head); text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 14px 24px; min-height: 48px; border: 2px solid transparent;
  transition: background .15s, transform .1s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--petrol); color: #fff; box-shadow: 0 6px 16px rgba(8, 126, 157, .28); }
.btn--primary:hover { background: var(--petrol-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--petrol); border-color: #b9d6de; }
.btn--ghost:hover { background: var(--petrol-soft); }
.btn--small { padding: 9px 16px; min-height: 38px; font-size: 14px; background: var(--lime-bright); color: var(--petrol-deep); }
.btn--small:hover { background: var(--lime); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Button-Text je nach Auswahl */
.when-cancel { display: none; }
.form:has(#aktion-absagen:checked) .when-cancel { display: inline; }
.form:has(#aktion-absagen:checked) .when-move { display: none; }
.form:has(#aktion-absagen:checked) .btn--primary { background: var(--orange); box-shadow: 0 6px 16px rgba(212, 75, 1, .25); }
.form:has(#aktion-absagen:checked) .btn--primary:hover { background: #b33f00; }

/* ---------- Erfolg / Meldungen ---------- */
.success, .message { text-align: center; }
.success__icon, .message__icon {
  width: 88px; height: 88px; margin: 4px auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime-soft); color: #7f8600;
}
.message--warn .message__icon { background: var(--orange-soft); color: var(--orange); }
.message--info .message__icon { background: var(--petrol-soft); color: var(--petrol); }
.success__title, .message__title { font-size: 24px; }
.message { max-width: 560px; margin: 0 auto; }
.message__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

.steps { list-style: none; padding: 0; margin: 22px 0; text-align: left; display: grid; gap: 0; }
.steps__item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.steps__item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.steps__dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px/1 var(--font-head); background: var(--bg); color: var(--text-muted); border: 2px solid var(--line);
}
.steps__item.is-done .steps__dot { background: var(--lime); border-color: var(--lime); color: #fff; }
.steps__item.is-done::before { background: var(--lime) !important; }

/* ---------- Fließtext (Datenschutz) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 18px; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

/* ---------- Footer ---------- */
.footer { background: var(--petrol-deep); color: rgba(255,255,255,.82); font-size: 14.5px; padding-top: 36px; padding-bottom: 140px; /* Platz für Datenschutzhinweis */ }
.privacy-ok .footer { padding-bottom: 0; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--lime-bright); text-decoration: underline; }
.footer__grid { display: grid; gap: 22px; }
.footer__logo { width: 120px; background: #fff; border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; box-sizing: content-box; }
.footer__h { color: var(--lime-bright); font: 500 12px/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px; padding-bottom: 20px; font-size: 13px; color: rgba(255,255,255,.6); }

/* ---------- Datenschutzhinweis ---------- */
.privacy {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
  background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(5, 74, 93, .25);
  border: 1px solid var(--line); animation: slideUp .35s ease-out;
}
.privacy[hidden] { display: none; }
.privacy__inner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; flex-wrap: wrap; }
.privacy__inner p { margin: 0; font-size: 13.5px; line-height: 1.5; flex: 1 1 220px; }
.privacy__icon { color: var(--lime); width: 28px; height: 28px; }
.privacy .btn { margin-left: auto; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Ab Tablet
   ========================================================================== */
@media (min-width: 640px) {
  .brand img { width: 160px; }
  .client__logo { height: 42px; }
  .card { padding: 30px; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .appt__row { grid-template-columns: 130px 1fr; align-items: baseline; gap: 10px; }
  .appt { padding: 24px; }
  .appt__date { width: 88px; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .privacy { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); bottom: 18px; }
  .privacy__inner { flex-wrap: nowrap; align-items: center; }
  @keyframes slideUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
  .hero__leaf { width: 420px; right: -40px; bottom: -110px; opacity: .9; }
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 960px) {
  .hero { padding: 48px 0 96px; }
  .main { margin-top: -64px; }
  .grid--entry { grid-template-columns: 1.1fr .9fr; align-items: start; }
  .grid--appt { grid-template-columns: 380px 1fr; align-items: start; }
  .grid--appt > .stack:first-child { position: sticky; top: 20px; }
  .appt { flex-direction: column; }
  .appt__date { width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 0 0 0; }
  .appt__wd { display: none; }
  .appt__day { font-size: 40px; padding: 10px 0; }
  .appt__mon { font-size: 16px; padding: 0; }
  .appt__row { grid-template-columns: 1fr; gap: 0; }
}

/* Druckansicht: nur Inhalt */
@media print {
  .privacy, .footer, .hero__leaf, .btn, .form { display: none !important; }
  .hero { background: none; color: #000; padding: 0; }
  .hero h1 { color: #000; }
  .main { margin: 0; }
}
