/* Praxis-Bestellung – Gestaltung angelehnt an die Praxis-Homepage (Lato, gelbe Pill-Buttons) */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("fonts/lato-latin-900-normal.woff2") format("woff2"); }

:root {
  --gelb: #FBBA00;
  --gelb-hell: #FFF6D6;
  --gelb-text: #5C4300;
  --tinte: #333333;
  --gedaempft: #5C5C5C;
  --linie: #C9C9C9;
  --linie-hell: #ECECEC;
  --flaeche: #F6F6F4;
  --gruen: #1B7F33;
  --ok-bg: #E3F4E6;
  --ok-text: #1D5E2B;
  --fehler: #B42318;
  --fehler-bg: #FDECEA;
  --radius-feld: 10px;
  --radius-karte: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--tinte);
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: #6B4E00; }
a:hover { color: #3F2E00; }

:focus-visible { outline: 3px solid #1F5FBF; outline-offset: 2px; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* Kopf */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--linie-hell);
}
.site-header__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-header__logo { display: block; flex: none; max-height: 44px; max-width: 120px; width: auto; height: auto; object-fit: contain; }
.site-header__name { display: flex; flex-direction: column; min-width: 0; }
.site-header__title { font-weight: 900; font-size: 17px; line-height: 1.25; color: var(--tinte); text-decoration: none; }
.site-header__sub { font-size: 13px; color: var(--gedaempft); }
.call-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--gruen); color: #FFFFFF; text-decoration: none; font-weight: 700; font-size: 15px;
}
.call-btn:hover { color: #FFFFFF; background: #166B2A; }

/* Seite */
.page { max-width: 560px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-direction: column; gap: 28px; }
.page--narrow { max-width: 640px; }

h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 900; }
.lead { margin: 8px 0 0; color: #555555; }
.muted { color: var(--gedaempft); font-size: 14px; }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-karte); background: var(--gelb-hell); }
.notice p { margin: 0; font-size: 15px; color: #3D3D3D; }
.notice svg { flex: none; margin-top: 2px; }
.notice--ok { background: var(--ok-bg); }
.notice--ok p { color: var(--ok-text); }
.notice--error { background: var(--fehler-bg); }
.notice--error p { color: var(--fehler); }

/* Schritte */
.step { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.step__head { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 900; line-height: 1.3; }
.group { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.group legend { padding: 0 0 6px; font-size: 15px; font-weight: 700; }
.step__num {
  display: inline-flex; justify-content: center; align-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 999px; background: var(--gelb);
  font-size: 14px; font-weight: 900; color: #1F1F1F;
}
.step__optional { font-weight: 400; font-size: 15px; color: var(--gedaempft); }

/* Auswahlkarten (echte Radio-Buttons) */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 66px; padding: 12px 16px; border-radius: var(--radius-karte);
  border: 2px solid #DADADA; background: #FFFFFF; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__text { display: flex; flex-direction: column; gap: 2px; }
.choice__title { font-size: 17px; font-weight: 700; }
.choice__sub { font-size: 14px; color: var(--gedaempft); }
.choice__dot { flex: none; width: 24px; height: 24px; border-radius: 999px; border: 2px solid #8A8A8A; background: #FFFFFF; }
.choice:has(input:checked) { border-color: var(--gelb); background: var(--gelb-hell); }
.choice:has(input:checked) .choice__dot { border-color: #1F1F1F; background: var(--gelb); box-shadow: inset 0 0 0 4px var(--gelb-hell); }
.choice:has(input:focus-visible) { outline: 3px solid #1F5FBF; outline-offset: 2px; }

/* Medikamenten-Chips (Checkboxen) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 2px solid #DADADA; background: #FFFFFF; cursor: pointer; font-size: 15px;
}
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip__check { display: none; }
.chip:has(input:checked) { border-color: var(--gelb); background: var(--gelb-hell); }
.chip:has(input:checked) .chip__check { display: inline; }
.chip:has(input:focus-visible) { outline: 3px solid #1F5FBF; outline-offset: 2px; }

/* Felder */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 15px; font-weight: 700; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hint { font-size: 13px; line-height: 1.45; color: var(--gedaempft); }

input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--tinte);
  border: 1px solid var(--linie); border-radius: var(--radius-feld); background: #FFFFFF;
}
input[type="text"], input[type="tel"], input[type="email"], select { height: 48px; padding: 0 14px; }
select { padding: 0 12px; }
textarea { padding: 12px 14px; line-height: 1.45; resize: vertical; min-height: 110px; }
[aria-invalid="true"] { border-color: var(--fehler) !important; border-width: 2px !important; }
.field__error { font-size: 14px; color: var(--fehler); font-weight: 700; }

.divider { height: 1px; background: var(--linie-hell); border: 0; margin: 4px 0; }

.radio-row {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--linie); border-radius: 12px; font-size: 16px; cursor: pointer;
}
.radio-row--plain { border: 0; padding: 0; min-height: 44px; }
.radio-row input, .check-row input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #1F1F1F; }

.counter-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--gedaempft); }
.counter-row span:last-child { flex: none; }

.check-row { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin-top: 1px; }

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

.error-box { padding: 14px 16px; border-radius: var(--radius-karte); background: var(--fehler-bg); color: var(--fehler); }
.error-box p { margin: 0 0 6px; font-weight: 700; }
.error-box ul { margin: 0; padding-left: 20px; }

/* Buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--gelb); color: #1F1F1F; }
.btn--primary:hover { background: #E9AD00; color: #1F1F1F; }
.btn--secondary { background: #FFFFFF; color: var(--tinte); border: 1px solid var(--linie); }
.btn--block { width: 100%; min-height: 60px; font-size: 19px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: #6B4E00; text-decoration: underline; cursor: pointer; }

.submit-area { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.submit-area p { margin: 0; font-size: 13px; color: var(--gedaempft); text-align: center; }

/* Bestätigung / Status */
.done { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding-top: 24px; }
.done__icon { display: flex; justify-content: center; align-items: center; width: 88px; height: 88px; border-radius: 999px; background: var(--gelb-hell); }
.done p { margin: 0; color: #555555; }
.ref-box { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 16px; border-radius: var(--radius-karte); background: var(--flaeche); }
.ref-box__label { font-size: 14px; color: var(--gedaempft); }
.ref-box__value { font-size: 28px; font-weight: 900; letter-spacing: 2px; color: var(--tinte); }
.done__actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.status-form { display: flex; gap: 8px; }
.status-form input { flex: 1 1 auto; text-transform: uppercase; letter-spacing: 1px; }
.status-result { padding: 14px 16px; border-radius: var(--radius-karte); font-weight: 700; }
.status-result--wait { background: var(--gelb-hell); color: var(--gelb-text); }
.status-result--ok { background: var(--ok-bg); color: var(--ok-text); }
.status-result--call { background: #FDEBD8; color: #7A3700; }
.status-result--none { background: var(--flaeche); color: var(--tinte); }

.token { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; padding: 14px; border-radius: var(--radius-feld); background: var(--flaeche); word-break: break-all; }

/* Fuß */
.site-footer { display: flex; justify-content: center; gap: 20px; padding: 18px 20px; border-top: 1px solid var(--linie-hell); font-size: 14px; }

@media (min-width: 640px) {
  .page { padding-top: 40px; }
  h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  .done__icon { animation: pop .35s ease-out; }
  @keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
.stack { display: flex; flex-direction: column; gap: 28px; }

@media (max-width: 420px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .site-header__logo { max-height: 38px; max-width: 72px; }
  .site-header__brand { gap: 10px; }
}

/* Hinweis „Gesundheitskarte nicht vergessen“ */
.card-notice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-karte); background: var(--gelb-hell); text-align: left; }
.card-notice .egk { width: 64px; height: auto; aspect-ratio: 220 / 139; flex: none; }
.card-notice__body { margin: 0; font-size: 14px; line-height: 1.45; color: #3D3D3D; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-notice__title { font-size: 15px; color: #2B2B2B; }
.card-notice--big { padding: 14px 16px; gap: 14px; }
.card-notice--big .egk { width: 92px; }
.card-notice--big .card-notice__title { font-size: 16px; }
@media (max-width: 360px) { .card-notice .egk { width: 52px; } .card-notice--big .egk { width: 72px; } }
