/* Obstpresse – gemeinsames Stylesheet für Buchung, Storno und Verwaltung */
:root {
  --bg: #f7f3ea;
  --card: #ffffff;
  --ink: #26241f;
  --muted: #6b6559;
  --line: #e4dccb;
  --apple: #a8321f;
  --apple-dark: #85261a;
  --leaf: #46713a;
  --leaf-soft: #e8f0e2;
  --warn: #8a5a00;
  --warn-soft: #fbf0d5;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 4px 16px rgba(60, 45, 20, .06);
  font-size: 17px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* Kopf */
header.site { background: var(--leaf); color: #fff; padding: 22px 0 26px; margin-bottom: 24px; }
header.site .wrap { display: flex; align-items: center; gap: 16px; }
header.site .logo {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-size: 28px;
}
header.site h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.eyebrow { margin: 0 0 2px; font-size: .85rem; opacity: .85; letter-spacing: .02em; }

h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* Schrittanzeige */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: st; }
.steps li {
  flex: 1; counter-increment: st; font-size: .9rem; color: var(--muted);
  border-top: 4px solid var(--line); padding-top: 6px;
}
.steps li::before { content: counter(st) ". "; font-weight: 600; }
.steps li.active { color: var(--ink); border-color: var(--apple); font-weight: 600; }
.steps li.done { border-color: var(--leaf); }

/* Karten */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}

/* Formulare */
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400;
  padding: 10px 12px; border: 1px solid #cfc6b3; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid rgba(70, 113, 58, .35); outline-offset: 1px; border-color: var(--leaf);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; flex: none; transform: scale(1.2); }

.item-row { display: grid; grid-template-columns: 1fr 150px 44px; gap: 10px; align-items: end; margin-bottom: 10px; }
.item-row label { margin: 0; }
.kg-wrap { position: relative; }
.kg-wrap input { padding-right: 38px; }
.kg-wrap span { position: absolute; right: 12px; bottom: 11px; color: var(--muted); }
.icon-btn {
  height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  font-size: 1.3rem; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }
.icon-btn[disabled] { visibility: hidden; }

/* Auswahl (Abfüllung, Mitglied) */
fieldset.choice { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
fieldset.choice legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 8px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
label.opt { margin: 0; font-weight: 600; }
label.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.opt span {
  display: inline-block; min-width: 120px; text-align: center; padding: 10px 18px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
label.opt input:checked + span { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
label.opt input:focus-visible + span { outline: 3px solid rgba(70, 113, 58, .35); outline-offset: 1px; }
label.opt span small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }

.slot small { display: block; font-weight: 400; font-size: .72rem; color: var(--warn); margin-top: 2px; }

.sum {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; padding: 12px 14px;
  background: var(--leaf-soft); border-radius: 10px; font-size: .95rem;
}
.sum strong { font-size: 1.05rem; }

/* Buttons */
button { font: inherit; cursor: pointer; }
.primary, .secondary, .danger {
  border-radius: 999px; padding: 12px 22px; font-weight: 600; border: 2px solid transparent;
}
.primary { background: var(--apple); color: #fff; }
.primary:hover { background: var(--apple-dark); }
.primary[disabled] { opacity: .5; cursor: not-allowed; }
.secondary { background: #fff; border-color: #cfc6b3; color: var(--ink); }
.secondary:hover { border-color: var(--ink); }
.danger { background: var(--danger); color: #fff; }
.link { background: none; border: none; color: var(--leaf); font-weight: 600; padding: 4px 0; }
.link:hover { text-decoration: underline; }
.actions { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin: 8px 0 32px; }
.actions .primary:only-child { margin-left: auto; }

/* Hinweise */
.notice { padding: 12px 14px; border-radius: 10px; margin: 10px 0; font-size: .95rem; }
.notice.info { background: var(--leaf-soft); }
.notice.warn { background: var(--warn-soft); color: #5c3d00; }
.error { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }

/* Vorschläge */
.suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sugg {
  text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sugg:hover { border-color: var(--apple); }
.sugg .d { font-weight: 600; }
.sugg .t { font-size: 1.3rem; font-weight: 700; color: var(--apple); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-top: 4px; align-self: flex-start; }
.tag.ok { background: var(--leaf-soft); color: var(--leaf); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

/* Tagesauswahl + Raster */
.daytabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.daytab {
  flex: none; border: 2px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 14px; text-align: center; line-height: 1.25;
}
.daytab small { display: block; color: var(--muted); font-size: .78rem; }
.daytab.active { border-color: var(--leaf); background: var(--leaf-soft); }
.daytab.none { opacity: .55; }

.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
  border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 8px;
  font-weight: 700; text-align: center;
}
.slot:hover { border-color: var(--apple); color: var(--apple); }

/* Wunschtage */
.daylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.daycard {
  text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.daycard .d { font-weight: 700; font-size: 1.05rem; }
.daycard:hover { border-color: var(--apple); }
.daycard.active { border-color: var(--leaf); background: var(--leaf-soft); }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }

/* Zusammenfassung */
dl.summary { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; margin: 0; }
dl.summary dt { color: var(--muted); }
dl.summary dd { margin: 0; font-weight: 500; }
.big-time { font-size: 1.6rem; font-weight: 700; color: var(--apple); margin: 4px 0 2px; }

.success { text-align: center; padding: 28px 20px; }
.success .check-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--leaf); color: #fff;
  display: grid; place-items: center; font-size: 34px; margin: 0 auto 12px;
}
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { margin: 0; font-size: .85rem; }
.copy-row button { flex: none; }

footer.site { text-align: center; color: var(--muted); font-size: .82rem; padding: 10px 0 30px; }

@media (max-width: 600px) {
  :root { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 120px 44px; }
  dl.summary { grid-template-columns: 1fr; gap: 0; }
  dl.summary dd { margin-bottom: 8px; }
  .steps li { font-size: .8rem; }
  header.site h1 { font-size: 1.25rem; }
}

@media print {
  body { background: #fff; }
  header.site, .steps, .actions, .no-print, footer.site { display: none !important; }
  .card { box-shadow: none; border-color: #999; }
}

/* Konto-Link im Kopf */
header.site .account-link {
  margin-left: auto; color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem;
  border: 2px solid rgba(255,255,255,.6); border-radius: 999px; padding: 7px 16px; white-space: nowrap;
}
header.site .account-link:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-link { display: inline-block; text-decoration: none; text-align: center; }
.hint { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 4px; }
input[readonly] { background: #f3efe6; color: var(--muted); }
label.opt input:disabled + span { cursor: not-allowed; opacity: .75; }
@media (max-width: 600px) {
  header.site .account-link { padding: 6px 12px; font-size: .85rem; }
}

/* Mein Konto */
.btn-sm { padding: 6px 14px; font-size: .88rem; border-radius: 999px; font-weight: 600; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.booking-list { display: grid; gap: 10px; margin-top: 14px; }
.booking { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.booking .b-date { font-weight: 700; }
.booking .b-time { font-size: 1.15rem; font-weight: 700; color: var(--apple); margin: 2px 0 4px; }
.booking.is-cancelled { opacity: .65; }
.booking.is-cancelled .b-time { color: var(--muted); text-decoration: line-through; }
details summary { cursor: pointer; }
.tag { background: #eee8db; color: var(--muted); }
.danger[disabled], .secondary[disabled] { opacity: .45; cursor: not-allowed; }

.success .mail-note { margin: 16px auto 0; padding-top: 14px; border-top: 1px solid var(--line); max-width: 520px; font-size: .95rem; }
.success .mail-note.warn { color: var(--warn); }

/* Button „Verwaltung“ für angemeldete Admins */
header.site .admin-link {
  color: #fff; text-decoration: none; font-weight: 700; font-size: .88rem; white-space: nowrap;
  background: rgba(0,0,0,.22); border-radius: 999px; padding: 7px 14px; margin-left: 8px;
}
header.site .account-link + .admin-link { margin-left: 8px; }
header.site .admin-link:hover { background: rgba(0,0,0,.35); }
header.site .wrap > .admin-link { margin-left: auto; }
header.site .wrap > .account-link + .admin-link { margin-left: 8px; }
[data-admin-link] .admin-link { margin-left: 0; }
