/* Buchungsportal – Basis- und Public-Styles
   Farben/Abstände nur über die Tokens in :root ändern. Keine externen Fonts (Datenschutz). */

:root {
  --c-primary: #0f6b58;        /* Apothekengrün, ruhig */
  --c-primary-600: #0b5848;
  --c-primary-50: #e8f4f0;
  --c-accent: #c8102e;         /* Apotheken-Rot, sparsam */
  --c-text: #1d2a27;
  --c-muted: #5b6b67;
  --c-line: #d9e2df;
  --c-bg: #f5f8f7;
  --c-surface: #ffffff;
  --c-ok-bg: #e6f4ea;   --c-ok: #1e6b34;
  --c-err-bg: #fdecec;  --c-err: #a1191f;
  --c-info-bg: #eaf2fb; --c-info: #1f4f86;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 40, 34, .06), 0 4px 16px rgba(16, 40, 34, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gap: 16px;
  --maxw: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55;
  color: var(--c-text); background: var(--c-bg);
}
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-600); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.h2, h2 { font-size: 1.3rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--c-muted); font-size: .92em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-primary) 55%, white); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Kopf */
.site-head { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-text); }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px;
  background: var(--c-accent); color: #fff; font-weight: 800; font-size: 1.35rem; font-family: Georgia, serif;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--c-muted); font-size: .8rem; }
.head-phone { text-decoration: none; font-weight: 600; white-space: nowrap; }

.main { padding-top: 28px; padding-bottom: 40px; }
.is-embed .main { padding-top: 12px; }

/* Fortschritt */
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 24px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--c-muted); font-size: .92rem; padding-right: 8px; }
.steps li span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--c-line); font-weight: 700; font-size: .85rem; background: var(--c-surface);
}
.steps li.current { color: var(--c-text); font-weight: 600; }
.steps li.current span { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.steps li.done span { border-color: var(--c-primary); color: var(--c-primary); }
.steps li + li::before { content: ""; width: 20px; height: 2px; background: var(--c-line); margin-right: 4px; }

/* Bausteine */
.intro { margin-bottom: 24px; }
.lead { font-size: 1.08rem; color: var(--c-muted); max-width: 62ch; }
.section-title { font-size: 1.15rem; margin: 8px 0 12px; }
.card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); margin-bottom: 20px;
}

.choice-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.choice {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; text-decoration: none; color: var(--c-text);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.choice:hover, .choice:focus-visible { border-color: var(--c-primary); transform: translateY(-2px); color: var(--c-text); }
.choice-title { font-size: 1.15rem; font-weight: 700; }
.choice-text { color: var(--c-muted); font-size: .95rem; }
.choice-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.choice-meta span { background: var(--c-primary-50); color: var(--c-primary-600); border-radius: 999px; padding: 2px 10px; font-size: .82rem; }
.choice-cta { color: var(--c-primary); font-weight: 600; }

.summary-bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--gap); flex-wrap: wrap;
  background: var(--c-primary-50); border: 1px solid color-mix(in srgb, var(--c-primary) 20%, white);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px;
}
.summary-bar > div { display: flex; flex-direction: column; }
.summary-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }

/* Tage */
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.days-break { flex-basis: 100%; height: 0; }
.day {
  display: flex; flex-direction: column; align-items: center; width: 74px; padding: 8px 4px;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm); text-decoration: none; color: var(--c-text);
  background: var(--c-surface); line-height: 1.2;
}
a.day:hover { border-color: var(--c-primary); }
.day-wd { font-size: .78rem; color: var(--c-muted); }
.day-d { font-weight: 700; }
.day-free { font-size: .75rem; color: var(--c-primary); margin-top: 2px; }
.day.selected { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.day.selected .day-wd, .day.selected .day-free { color: #fff; }
.day.disabled { opacity: .45; background: transparent; }
.day.disabled .day-free { color: var(--c-muted); }

.slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.slot {
  display: block; text-align: center; padding: 10px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-primary); color: var(--c-primary); font-weight: 600; text-decoration: none; background: var(--c-surface);
}
.slot:hover, .slot:focus-visible { background: var(--c-primary); color: #fff; }

/* Formulare */
.form .field, .field { margin-bottom: 16px; }
.row-2 { display: grid; gap: 0 var(--gap); grid-template-columns: 1fr 1fr; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
input:not([type]), input[type=text], input[type=search], input[type=url], input[type=tel], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: #fff;
  border: 1px solid #b9c7c3; border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); outline: 3px solid var(--c-primary-50); }
[aria-invalid=true] { border-color: var(--c-err) !important; background: #fffafa; }
.field-error { color: var(--c-err); font-size: .88rem; margin: 4px 0 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio, .check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio input, .check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--c-primary); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hint { background: #fff8e6; border-left: 4px solid #e0a100; padding: 10px 14px; border-radius: 6px; margin: 12px 0 18px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.wrap-actions { flex-wrap: wrap; margin: 18px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-600); color: #fff; }
.btn-ghost { background: var(--c-surface); border-color: var(--c-line); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-danger { background: var(--c-err); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .9rem; background: var(--c-primary-50); color: var(--c-primary-600); }
.btn[disabled] { opacity: .6; cursor: wait; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.alert-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.alert-error { background: var(--c-err-bg); color: var(--c-err); }
.alert-info { background: var(--c-info-bg); color: var(--c-info); }

/* Bestätigung */
.success { text-align: left; }
.success-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--c-ok-bg); color: var(--c-ok);
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; margin-bottom: 12px;
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; }
.facts dt { color: var(--c-muted); }
.facts dd { margin: 0; }
.note-box { border-top: 1px solid var(--c-line); padding-top: 16px; margin-top: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-size: .85rem; }

/* Fuß */
.site-foot { border-top: 1px solid var(--c-line); background: var(--c-surface); padding: 20px 0; font-size: .9rem; color: var(--c-muted); }
.site-foot.slim { background: transparent; border: 0; padding: 0 0 12px; }
.foot-links { display: flex; gap: 16px; margin: 0; }

@media (max-width: 600px) {
  .row-2 { grid-template-columns: 1fr; }
  .head-phone { font-size: .9rem; }
  .brand-text small { display: none; }
  .steps { gap: 14px; flex-wrap: nowrap; }
  .steps li { font-size: .85rem; padding-right: 0; gap: 6px; }
  .steps li + li::before { display: none; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .day { width: calc(25% - 6px); }
}

@media print {
  .site-head, .site-foot, .steps, .actions, .copy-row button { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
