/* Gemeinsames Reservierungspopup: einmal im CMS-Seitenlayout einbinden. */
[data-lemp-module="reservation"] .modal-dialog { max-width: 520px; }
[data-lemp-module="reservation"] .modal-content { background: #faf6ef; border: 1px solid #e8ddcc; border-radius: 12px; }
[data-lemp-module="reservation"] .modal-header { align-items: flex-start; padding: 20px 22px 16px; border-color: #e4d8c7; }
[data-lemp-module="reservation"] .reservation__eyebrow { margin: 0 0 3px; color: var(--lemp-red); font-family: var(--lemp-font-heading); font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
[data-lemp-module="reservation"] .modal-title { font-family: var(--lemp-font-hand); color: var(--lemp-red); font-size: 36px; line-height: 1; }
[data-lemp-module="reservation"] .btn-close { margin-top: 0; padding: 12px; flex-shrink: 0; }
[data-lemp-module="reservation"] .modal-body { padding: 12px; background: white; }
[data-lemp-module="reservation"] .reservation__widget { max-height: 70vh; max-height: 70svh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
[data-lemp-module="reservation"] .reservation__status { margin: 8px; font-size: 15px; }
[data-lemp-module="reservation"] .modal-footer { padding: 8px 12px; gap: 10px; flex-wrap: wrap; justify-content: flex-end; border-color: #e4d8c7; font-size: 14px; }
[data-lemp-module="reservation"] .modal-footer a { color: var(--lemp-red); text-underline-offset: 3px; }
@media (max-width: 575.98px) {
 [data-lemp-module="reservation"] .modal-dialog { margin: 10px; }
 [data-lemp-module="reservation"] .modal-header { padding: 16px; }
 [data-lemp-module="reservation"] .modal-title { font-size: 32px; }
 [data-lemp-module="reservation"] .modal-body { padding: 8px; }
}


/* Die Hauptaktion des Formulars sitzt in der Fusszeile, nicht im Body.
   Der Body scrollt, die Fusszeile bleibt stehen; so ist "Weiter" auf dem
   Handy immer erreichbar. Geschlossen wird ueber das X im Kopf. */
[data-lemp-module="reservation"] .reservation__actions { flex: 1 1 14rem; min-width: 0; }
[data-lemp-module="reservation"] .reservation__actions:empty { display: none; }
[data-lemp-module="reservation"] .reservation__actions .rw__actions { margin-top: 0; flex-direction: row; }
[data-lemp-module="reservation"] .reservation__actions .rw__btn { width: auto; }
[data-lemp-module="reservation"] .reservation__actions .rw__btn--ghost { flex: 0 0 auto; }
[data-lemp-module="reservation"] .reservation__actions .rw__btn--wide { flex: 1 1 auto; }

/* Kontext einer über die Eventübersicht gestarteten Reservierung. */
[data-lemp-module="reservation"] .reservation__event { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e4d8c7; }
[data-lemp-module="reservation"] .reservation__event-name { margin: 0 0 4px; color: var(--lemp-red); font-family: var(--lemp-font-heading); font-size: 24px; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
[data-lemp-module="reservation"] .reservation__event-dates { margin: 0; color: var(--lemp-ink); font-size: 16px; line-height: 1.35; }

/* Eventkopf kompakt: Reservierungszweck, Veranstaltungsname und Zeitraum. */
[data-lemp-module="reservation"][data-reservation-context="event"] .modal-header { padding: 10px 16px; }
[data-lemp-module="reservation"][data-reservation-context="event"] .reservation__eyebrow { display: none; }
[data-lemp-module="reservation"][data-reservation-context="event"] .modal-title { font-size: 22px; line-height: 1.05; margin: 0; }
[data-lemp-module="reservation"][data-reservation-context="event"] .reservation__event { margin-top: 5px; padding-top: 0; border: 0; }
[data-lemp-module="reservation"][data-reservation-context="event"] .reservation__event-name { font-size: 22px; line-height: 1.1; margin-bottom: 2px; }
[data-lemp-module="reservation"][data-reservation-context="event"] .reservation__event-dates { font-size: 14px; line-height: 1.3; }
[data-lemp-module="reservation"] .modal-header > div { min-width: 0; }
[data-lemp-module="reservation"] .modal-footer > * { margin: 0; }
[data-lemp-module="reservation"] .reservation__phone { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--lemp-red); border-radius: 4px; background: transparent; color: var(--lemp-red); text-decoration: none; }
[data-lemp-module="reservation"] .reservation__phone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[data-lemp-module="reservation"] .reservation__phone { transition: background .16s, color .16s, border-color .16s; }
[data-lemp-module="reservation"] .reservation__phone:hover { background: var(--lemp-red); border-color: var(--lemp-red); color: #fff; }
[data-lemp-module="reservation"] .reservation__phone:focus-visible { outline: 3px solid #156d96; outline-offset: 3px; }

/* Zeichen an der allgemeinen Reservieren-Schaltflaeche: Warnung bei einer
   begonnenen, Haken nach einer abgeschickten Reservierung. Der Text erscheint
   beim Zeigen und bei Tastaturfokus und gehoert zum Namen der Schaltflaeche. */
.has-reserve-status { position: relative; }
.reserve-status {
  position: absolute;
  top: -9px;
  right: -7px;
  z-index: 2;
  display: block;
  width: 24px;
  height: 24px;
  line-height: 0;
  filter: drop-shadow(0 1px 2px rgba(41, 38, 34, .35));
}
.reserve-status svg { display: block; }
.reserve-status__tip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 3;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--lemp-ink, #292622);
  color: #fff;
  font-family: var(--lemp-font-body, "Source Sans 3", Arial, sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.has-reserve-status:is(:hover, :focus-visible) .reserve-status__tip { visibility: visible; opacity: 1; }

/* ------------------------------------------------------------------
   Reservierungsformular (.rw)

   Eigenes Formular auf der resmio-API, seit 14.11.2026 anstelle des
   eingebetteten iframes. Markup erzeugt js/modules/resmio-widget.js.

   Ablauf: Personen, Datum, Uhrzeit, Daten, Fertig. Alle fuenf sind Seiten
   einer Wendekarte.
   ------------------------------------------------------------------ */

.rw,
[data-lemp-module="reservation"] .modal-footer {
  /* Farben. Fallbacks nur, falls base.css nicht geladen ist. */
  --rw-bg:          #ffffff;
  --rw-surface:     #faf6ef;
  --rw-surface-2:   #f4eddf;
  --rw-ink:         var(--lemp-ink, #292622);
  --rw-ink-muted:   #6b645c;
  --rw-line:        #e4d8c7;

  --rw-accent:       var(--lemp-red, #a5242d);
  --rw-accent-hover: var(--lemp-red-hover, #8f1f27);
  --rw-accent-ink:   #ffffff;
  --rw-accent-soft:  rgba(165, 36, 45, .08);

  --rw-ok:          #2f6b45;
  --rw-error:       #a5242d;
  --rw-error-soft:  rgba(165, 36, 45, .08);

  /* Typografie. Fließtext Source Sans 3, Labels Barlow Condensed. */
  --rw-font:         var(--lemp-font-body, "Source Sans 3", Arial, sans-serif);
  --rw-font-display: var(--lemp-font-heading, "Barlow Condensed", "Arial Narrow", sans-serif);
  --rw-fs-xs:        .75rem;
  --rw-fs-sm:        .875rem;
  --rw-fs-base:      16px;
  --rw-fs-lg:        1.25rem;
  --rw-tracking:     .04em;

  --rw-radius:    4px;
  --rw-radius-lg: 10px;
  --rw-gap:       1rem;
  --rw-pad:       1.25rem;
  --rw-dur:       160ms;
  --rw-flip:      700ms;
}

.rw {
  font-family: var(--rw-font);
  font-size: var(--rw-fs-base);
  color: var(--rw-ink);
  background: var(--rw-bg);
  box-sizing: border-box;
  line-height: 1.5;
}
.rw *, .rw *::before, .rw *::after { box-sizing: inherit; }

/* Etwas Luft an den Seiten: beim Umdrehen ragt die Karte perspektivisch
   leicht ueber ihre Ruhebreite hinaus. */
.rw__shell { padding: 6px 10px 4px; }

.rw__title {
  font-family: var(--lemp-font-hand, "Caveat", cursive);
  color: var(--rw-accent);
  font-size: 36px;
  line-height: 1;
  margin: 0 0 .25rem;
  font-weight: 400;
}
.rw__sub { font-size: var(--rw-fs-sm); color: var(--rw-ink-muted); margin: 0 0 var(--rw-pad); }

.rw__hint { font-size: var(--rw-fs-xs); color: var(--rw-ink-muted); font-weight: 400; }
.rw__hint--block { margin: 0 0 var(--rw-gap); font-size: var(--rw-fs-sm); }
.rw__hint a { color: var(--rw-accent); text-underline-offset: 3px; }

/* ------------------------------------------------------------------ Pfad */

.rw__steps { margin: 2px 0 18px; }
.rw__steps-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rw-step;
}
.rw__step {
  position: relative;
  counter-increment: rw-step;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  /* Platz fuer die Zeile mit der Wahl von Anfang an freihalten, damit der
     Dialog nicht waechst, sobald der erste Schritt erledigt ist. */
  min-height: 72px;
  color: var(--rw-ink-muted);
}
/* Verbindungslinie zum vorherigen Schritt, hinter den Punkten. */
.rw__step + .rw__step::after {
  content: "";
  position: absolute;
  top: 13px;
  right: calc(50% + 17px);
  width: calc(100% - 34px);
  height: 2px;
  border-radius: 1px;
  background: var(--rw-line);
}
.rw__step.is-done + .rw__step::after { background: var(--rw-accent); }

/* Der Punkt: Nummer, beim erledigten Schritt ein Haken. Ein Schritt weiter
   vorn, dessen Angaben schon stehen, behaelt seine Nummer in Rot. */
.rw__step::before,
.rw__step-check,
.rw__step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--rw-font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
.rw__step::before {
  content: counter(rw-step);
  border: 2px solid var(--rw-line);
  background: var(--rw-bg);
  color: var(--rw-ink-muted);
}
.rw__step.is-current::before {
  border-color: var(--rw-accent);
  background: var(--rw-accent);
  color: var(--rw-accent-ink);
  box-shadow: 0 0 0 4px var(--rw-accent-soft);
}
.rw__step.is-done::before,
.rw__step.is-ahead::before { content: none; }
.rw__step-check,
.rw__step-dot {
  border: 2px solid var(--rw-accent);
  background: var(--rw-bg);
  color: var(--rw-accent);
  transition: background var(--rw-dur), color var(--rw-dur);
}
.rw__step-check::before {
  content: "";
  width: 11px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.rw__step-label {
  margin-top: 6px;
  font-family: var(--rw-font-display);
  font-size: 15px;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  line-height: 1.1;
}
.rw__step.is-current .rw__step-label { color: var(--rw-ink); font-weight: 600; }
.rw__step-value {
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
  color: var(--rw-ink);
  font-weight: 600;
}

.rw__step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--rw-radius);
  background: none;
  color: var(--rw-ink);
  font: inherit;
  cursor: pointer;
}
.rw__step-btn:hover .rw__step-check,
.rw__step-btn:hover .rw__step-dot { background: var(--rw-accent); color: var(--rw-accent-ink); }
.rw__step-btn:hover .rw__step-label { color: var(--rw-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ Wendekarte
   Alle drei Seiten liegen im selben Rasterfeld. Die Karte ist so hoch wie
   Personen- und Datumsseite; die Uhrzeitseite fuellt genau diese Flaeche
   und scrollt notfalls in sich. Der Dialog aendert seine Groesse nie. */

.rw__card {
  position: relative;
  display: grid;
  perspective: 1400px;
}
.rw__card > .rw__view {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--rw-line);
  border-radius: var(--rw-radius-lg);
  background: var(--rw-bg);
  box-shadow: 0 1px 2px rgba(41, 38, 34, .05), 0 10px 26px rgba(41, 38, 34, .07);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  visibility: hidden;
}
.rw__card > .rw__view[data-rw-view="time"] { position: absolute; inset: 0; }
.rw__card > .rw__view.is-active,
.rw__card > .rw__view.is-leaving { visibility: visible; }
/* Kinder mit eigener Sichtbarkeit duerfen von abgewandten Seiten nicht durchscheinen. */
.rw__card > .rw__view:not(.is-active):not(.is-leaving) .rw__note { display: none; }

/* Die Drehung. Beide Seiten drehen um dieselbe Achse, jede zeigt nur ihre
   Vorderseite: zusammen ist das eine Karte, die umgedreht wird. In der
   Mitte der Drehung tritt sie etwas zurueck, wie von der Hand gehoben. */
.rw__card.is-flipping > .rw__view { box-shadow: 0 18px 40px rgba(41, 38, 34, .18); }
.rw__card.is-flipping > .rw__view.is-leaving  { animation: rw-flip-out var(--rw-flip) cubic-bezier(.45, .05, .25, 1) both; }
.rw__card.is-flipping > .rw__view.is-entering { animation: rw-flip-in  var(--rw-flip) cubic-bezier(.45, .05, .25, 1) both; }
.rw__card.is-flipping[data-rw-dir="back"] > .rw__view.is-leaving  { animation-name: rw-flip-out-back; }
.rw__card.is-flipping[data-rw-dir="back"] > .rw__view.is-entering { animation-name: rw-flip-in-back; }

@keyframes rw-flip-out {
  0%   { transform: rotateY(0) scale(1); }
  50%  { transform: rotateY(-90deg) scale(.93); }
  100% { transform: rotateY(-180deg) scale(1); }
}
@keyframes rw-flip-in {
  0%   { transform: rotateY(180deg) scale(1); }
  50%  { transform: rotateY(90deg) scale(.93); }
  100% { transform: rotateY(0) scale(1); }
}
@keyframes rw-flip-out-back {
  0%   { transform: rotateY(0) scale(1); }
  50%  { transform: rotateY(90deg) scale(.93); }
  100% { transform: rotateY(180deg) scale(1); }
}
@keyframes rw-flip-in-back {
  0%   { transform: rotateY(-180deg) scale(1); }
  50%  { transform: rotateY(-90deg) scale(.93); }
  100% { transform: rotateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rw *, .rw *::before, .rw *::after { transition: none !important; animation: none !important; }
}

.rw__view-title {
  margin: 0 0 12px;
  font-family: var(--rw-font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
  color: var(--rw-ink);
}
.rw__view-title:focus { outline: none; }
.rw__view-foot { margin: auto 0 0; padding-top: 12px; font-size: var(--rw-fs-sm); }

/* ------------------------------------------------------------------ Personen */

.rw__party {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.rw__chip {
  min-height: 52px;
  padding: 0;
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  background: var(--rw-surface);
  color: var(--rw-ink);
  font-family: var(--rw-font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background var(--rw-dur), border-color var(--rw-dur), color var(--rw-dur), transform var(--rw-dur);
}
.rw__chip:hover { border-color: var(--rw-accent); color: var(--rw-accent); background: var(--rw-bg); transform: translateY(-1px); }
.rw__chip[aria-pressed="true"] {
  background: var(--rw-accent);
  border-color: var(--rw-accent);
  color: var(--rw-accent-ink);
}

/* ------------------------------------------------------------------ Kalender */

.rw__cal { position: relative; }

.rw__cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rw__cal-month {
  flex: 1;
  text-align: center;
  font-family: var(--rw-font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
}
.rw__nav {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--rw-line);
  border-radius: 50%;
  background: var(--rw-bg);
  color: var(--rw-accent);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--rw-dur), border-color var(--rw-dur);
}
.rw__nav:hover:not(:disabled) { background: var(--rw-accent-soft); border-color: var(--rw-accent); }
.rw__nav:disabled { opacity: .35; cursor: not-allowed; color: var(--rw-ink-muted); }

/* Der Heute-Sprung. Immer sichtbar, nicht hinter einem Icon versteckt. */
.rw__today {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--rw-accent);
  border-radius: 20px;
  background: var(--rw-bg);
  color: var(--rw-accent);
  font-family: var(--rw-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--rw-dur), color var(--rw-dur);
}
.rw__today:hover:not(:disabled) { background: var(--rw-accent); color: var(--rw-accent-ink); }
.rw__today:disabled { opacity: .4; cursor: not-allowed; border-color: var(--rw-line); color: var(--rw-ink-muted); }

.rw__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.rw__dow {
  padding: 4px 0 6px;
  text-align: center;
  font-family: var(--rw-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  color: var(--rw-ink-muted);
}
.rw__day {
  position: relative;
  min-height: 44px;
  padding: 0;
  /* Waehlbare Tage tragen Flaeche, Rahmen und kraeftige Zahl, damit sie
     sich klar von vergangenen und geschlossenen Tagen abheben. */
  border: 1px solid #dccfb9;
  border-radius: 8px;
  background: var(--rw-surface-2);
  color: var(--rw-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--rw-dur), color var(--rw-dur), border-color var(--rw-dur);
}
.rw__day:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--rw-accent); background: var(--rw-bg); color: var(--rw-accent); opacity: 1; }

/* Tage der Nachbarmonate fuellen die erste und letzte Woche: blass wie
   vergangene Tage, aber waehlbar. Sie machen den Monatswechsel sichtbar. */
.rw__day--other { background: none; border-color: transparent; color: var(--rw-ink-muted); font-size: 16px; font-weight: 400; opacity: .55; }

/* Vorgeschlagener Tag nach dem Sprung in einen Nachbarmonat: markiert, aber
   noch nicht bestaetigt. */
.rw__day.rw__day--proposed[aria-pressed="true"] { background: var(--rw-accent-soft); border: 2px solid var(--rw-accent); color: var(--rw-accent); }
.rw__day.rw__day--proposed.rw__day--today[aria-pressed="true"]::after { background: var(--rw-accent); }

/* Vergangene und geschlossene Tage sind nicht waehlbar. Vergangene treten
   grau zurueck, Ruhetage und andere Schliesstage stehen in Rot. */
.rw__day:disabled { background: none; border-color: transparent; color: var(--rw-ink-muted); font-size: 16px; font-weight: 400; opacity: .42; cursor: not-allowed; }
.rw__day--closed:disabled { color: var(--rw-accent); opacity: .8; }

.rw__day[aria-pressed="true"] { background: var(--rw-accent); border-color: var(--rw-accent); color: var(--rw-accent-ink); }

/* Heute bleibt erkennbar, auch wenn ein anderer Tag gewaehlt ist. */
.rw__day--today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 14px;
  height: 2px;
  margin-left: -7px;
  border-radius: 1px;
  background: var(--rw-accent);
}
.rw__day--today[aria-pressed="true"]::after { background: var(--rw-accent-ink); }

/* Online nicht reservierbar: ein feines rotes Kreuz in der Ecke. Der Tag
   bleibt waehlbar, weil der Hinweis dann die Telefonnummer nennt. */
.rw__day--full { background: none; border-color: var(--rw-line); }
.rw__day--full .rw__day-num { color: var(--rw-ink-muted); font-weight: 400; }
.rw__day-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.rw__day-x::before,
.rw__day-x::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  margin-top: -.75px;
  border-radius: 1px;
  background: var(--rw-accent);
}
.rw__day-x::before { transform: rotate(45deg); }
.rw__day-x::after  { transform: rotate(-45deg); }
.rw__day--full[aria-pressed="true"] { background: var(--rw-accent-soft); border-color: var(--rw-accent); color: var(--rw-ink); }

/* Der gewaehlte Tag, waehrend seine Uhrzeiten geladen werden. */
.rw__day--busy .rw__day-num { opacity: .35; }
.rw__day--busy::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: rw-spin .7s linear infinite;
}
@keyframes rw-spin { to { transform: rotate(360deg); } }

.rw__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--rw-ink-muted);
}
.rw__legend-item { display: inline-flex; align-items: center; gap: 7px; }
/* Muster-Tag im Aussehen des Kalenders. */
.rw__legend-day {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border: 1px solid #dccfb9;
  border-radius: 5px;
  background: var(--rw-surface-2);
  color: var(--rw-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.rw__legend-day--full { background: none; border-color: var(--rw-line); color: var(--rw-ink-muted); font-weight: 400; }
.rw__legend-day--full .rw__day-x { top: 2px; right: 2px; width: 6px; height: 6px; }
.rw__legend-day--closed { background: none; border-color: transparent; width: auto; color: var(--rw-accent); font-size: 13px; font-weight: 400; opacity: .8; }
.rw__legend--hint { display: block; min-height: 22px; line-height: 22px; color: var(--rw-ink); }
.rw__legend--hint strong { color: var(--rw-accent); font-weight: 600; }

/* ---- Hinweis am gewaehlten Tag ----
   Liegt ueber dem Kalender und zeigt mit einem Pfeil auf den Tag. Das
   Kreuz oben rechts schliesst ihn, damit die verdeckten Tage erreichbar
   werden. */
.rw__note {
  position: absolute;
  z-index: 3;
  visibility: hidden;                 /* bis positioniert */
  width: min(19rem, calc(100% - 1rem));
  padding: 12px 44px 12px 14px;
  background: var(--rw-accent);
  color: var(--rw-accent-ink);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(41, 38, 34, .3);
  text-align: left;
}
.rw__note-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--rw-dur), color var(--rw-dur);
}
.rw__note-close:hover { background: #fff; color: var(--rw-accent); }
.rw__note-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rw__note-title {
  margin: 0 0 3px;
  font-family: var(--rw-font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  line-height: 1.15;
}
.rw__note-text { margin: 0; font-size: var(--rw-fs-sm); line-height: 1.4; }
.rw__note-call {
  display: inline-block;
  margin-top: 9px;
  padding: 6px 12px;
  border-radius: var(--rw-radius);
  background: #fff;
  color: var(--rw-accent);
  font-size: var(--rw-fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.rw__note-call:hover { background: var(--rw-surface-2); color: var(--rw-accent-hover); }
.rw__note-call:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Pfeil zum Tag. --rw-note-arrow setzt das Skript auf die Tagesmitte. */
.rw__note-arrow {
  position: absolute;
  left: var(--rw-note-arrow, 50%);
  width: 0;
  height: 0;
  margin-left: -8px;
  border: 8px solid transparent;
}
.rw__note[data-rw-placement="oben"] .rw__note-arrow { top: 100%; border-top-color: var(--rw-accent); border-bottom: 0; }
.rw__note[data-rw-placement="unten"] .rw__note-arrow { bottom: 100%; border-bottom-color: var(--rw-accent); border-top: 0; }

/* ------------------------------------------------------------------ Uhrzeit */

/* Links die Frage, rechts der gewaehlte Tag. */
.rw__timehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rw-line);
}
.rw__timehead .rw__view-title { margin: 0; min-width: 0; }
.rw__timehead-date { flex: none; }

.rw__timehead-date { margin: 0; min-width: 0; text-align: right; line-height: 1.05; }
.rw__timehead-weekday {
  display: block;
  font-family: var(--rw-font-display);
  font-size: 14px;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  color: var(--rw-ink-muted);
}
.rw__timehead-date strong {
  display: block;
  font-family: var(--rw-font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--rw-accent);
  white-space: nowrap;
}

.rw__slots {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 8px;
  align-content: start;
  margin: 0 -4px;
  padding: 2px 4px 4px;
  overflow-y: auto;
}
.rw__slot {
  min-height: 48px;
  padding: 0 4px;
  border: 1px solid var(--rw-line);
  border-radius: 8px;
  background: var(--rw-surface);
  color: var(--rw-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background var(--rw-dur), border-color var(--rw-dur), color var(--rw-dur), transform var(--rw-dur);
}
.rw__slot:hover:not([aria-pressed="true"]) { border-color: var(--rw-accent); color: var(--rw-accent); background: var(--rw-bg); transform: translateY(-1px); }
.rw__slot[aria-pressed="true"] { background: var(--rw-accent); border-color: var(--rw-accent); color: var(--rw-accent-ink); }
.rw__slot small { display: block; font-size: var(--rw-fs-xs); font-weight: 400; opacity: .75; }

/* Nicht verfuegbar: sichtbar, aber erkennbar gesperrt. Mehrere Zeiten in
   Folge stehen als ein Block ueber zwei Spalten. */
.rw__slot--off {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(41, 38, 34, .045) 6px 12px);
  color: var(--rw-ink-muted);
  font-weight: 400;
  cursor: not-allowed;
}
.rw__slot--off .rw__slot-time { text-decoration: line-through; text-decoration-color: rgba(107, 100, 92, .6); }
.rw__slot--off:hover:not([aria-pressed="true"]) { border-color: var(--rw-line); color: var(--rw-ink-muted); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(41, 38, 34, .045) 6px 12px); transform: none; }
.rw__slot--block { grid-column: span 2; padding: 4px 8px; line-height: 1.2; }
.rw__slot--block .rw__slot-time { text-decoration: none; }
.rw__slot--block small { opacity: 1; }

/* ------------------------------------------------------------------ Kontaktdaten */

/* E-Mail bekommt mehr Breite als Telefon: Adressen sind oft lang. Laengere
   Eingaben laufen im Feld weiter, eine Laengengrenze gibt es nicht. */
.rw__fields { display: grid; grid-template-columns: 3fr 2fr; gap: 12px 14px; margin-bottom: 12px; }
.rw__field { grid-column: 1 / -1; min-width: 0; }
.rw__field--half { grid-column: auto; }
.rw__fields + .rw__field { margin-bottom: 10px; }
.rw__label {
  display: block;
  margin-bottom: .375rem;
  font-family: var(--rw-font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: var(--rw-tracking);
  text-transform: uppercase;
  color: var(--rw-ink);
}
.rw__label .rw__hint { text-transform: none; letter-spacing: 0; font-family: var(--rw-font); }

.rw__input,
.rw__textarea {
  width: 100%;
  min-height: 46px;
  padding: .625rem .75rem;
  border: 1px solid var(--rw-line);
  border-radius: var(--rw-radius);
  background: var(--rw-bg);
  color: inherit;
  font: inherit;
  transition: border-color var(--rw-dur);
}
.rw__textarea { min-height: 4rem; resize: vertical; display: block; }
.rw__input:hover, .rw__textarea:hover { border-color: #cdbfa9; }
.rw__input[aria-invalid="true"] { border-color: var(--rw-error); }
.rw__error { margin: .25rem 0 0; font-size: var(--rw-fs-sm); color: var(--rw-error); }

/* Honeypot. Nicht display:none, das erkennen manche Bots. */
.rw__trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rw__check { display: flex; gap: .625rem; align-items: flex-start; font-size: var(--rw-fs-sm); }
.rw__check input { margin-top: .2rem; flex: none; accent-color: var(--rw-accent); }

.rw__summary {
  margin-bottom: var(--rw-pad);
  padding: 12px 14px;
  border-left: 3px solid var(--rw-accent);
  border-radius: 0 8px 8px 0;
  background: var(--rw-surface);
  font-size: 15px;
}
.rw__summary dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; }
.rw__summary dt { color: var(--rw-ink-muted); font-weight: 400; }
.rw__summary dd { margin: 0; font-weight: 600; }

.rw__alert {
  margin-bottom: var(--rw-gap);
  padding: .75rem 1rem;
  border-left: 3px solid var(--rw-error);
  border-radius: 0 var(--rw-radius) var(--rw-radius) 0;
  background: var(--rw-error-soft);
  font-size: var(--rw-fs-sm);
}

/* ------------------------------------------------------------------ Ergebnis */

.rw__result { padding: .5rem 0 0; text-align: center; }
.rw__result h3 {
  margin: 0 0 .5rem;
  font-family: var(--rw-font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
.rw__result h3:focus { outline: none; }
.rw__result .rw__summary { text-align: left; }
.rw__result-mark {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto .9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(47, 107, 69, .12);
  color: var(--rw-ok);
  font-size: 1.5rem;
}

/* ------------------------------------------------------------------ Buttons */

.rw__actions { display: flex; gap: .75rem; margin-top: var(--rw-pad); }

/* Hauptaktion wie .header-order in css/modules/header.css: rote Schrift auf
   hellem Grund, erst beim Zeigen gefuellt mit weisser Schrift. Bewusst
   nicht die Typografie des Pinselstrich-Buttons; die ist der primaeren
   Reservierungsaktion in Header und Hero vorbehalten. */
.rw__btn {
  min-height: 44px;
  padding: .5rem 1.125rem;
  border: 2px solid var(--rw-accent);
  border-radius: var(--rw-radius);
  background: transparent;
  color: var(--rw-accent);
  font-family: var(--rw-font);
  font-size: var(--rw-fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--rw-dur), color var(--rw-dur), border-color var(--rw-dur);
}
.rw__btn:hover:not(:disabled) { background: var(--rw-accent); color: var(--rw-accent-ink); }
.rw__btn:disabled { opacity: .4; cursor: not-allowed; }
.rw__btn--wide { flex: 1; }

/* Zweitrangig, etwa "Zurueck": zurueckhaltend, damit die Hauptaktion fuehrt. */
.rw__btn--ghost { border: 1px solid var(--rw-line); color: var(--rw-ink); }
.rw__btn--ghost:hover:not(:disabled) { background: var(--rw-accent-soft); border-color: var(--rw-accent); color: var(--rw-accent); }

/* Fokusfarbe des Projekts, nicht die Akzentfarbe. */
.rw__input:focus-visible,
.rw__textarea:focus-visible,
.rw__btn:focus-visible,
.rw__day:focus-visible,
.rw__slot:focus-visible,
.rw__chip:focus-visible,
.rw__nav:focus-visible,
.rw__today:focus-visible,
.rw__step-btn:focus-visible {
  outline: 3px solid #156d96;
  outline-offset: 3px;
}

/* Eventkontext: Kopfzeile wie im bestehenden Popup. */
.rw__event {
  margin: 0 0 1rem;
  padding: .65rem .8rem;
  border-inline-start: 3px solid var(--rw-accent);
  background: var(--rw-accent-soft);
  border-radius: 0 .35rem .35rem 0;
}
.rw__event-name {
  margin: 0 0 2px;
  color: var(--rw-accent);
  font-family: var(--rw-font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.rw__event-dates { margin: 0; font-size: 14px; line-height: 1.3; color: var(--rw-ink); }

@media (max-width: 30rem) {
  .rw__shell { padding: 4px 4px 2px; }
  .rw__card > .rw__view { padding: 12px 10px 10px; }
  .rw__timehead .rw__view-title { font-size: 21px; }
  .rw__timehead-date strong { font-size: 18px; }
  .rw__timehead-weekday { font-size: 12px; }
  .rw__fields { grid-template-columns: 1fr; }
  .rw__field--half { grid-column: 1 / -1; }
  .rw__step-label { font-size: 13px; letter-spacing: .02em; }
  .rw__step-value { font-size: 12px; }
  .rw__day-x { top: 4px; right: 4px; width: 9px; height: 9px; }
  .rw__chip { min-height: 48px; font-size: 22px; }
  .rw__today { padding: 0 10px; }
  .rw__cal-head { gap: 6px; }
  .rw__cal-month { font-size: 17px; white-space: nowrap; letter-spacing: .02em; }
  .rw__nav { width: 36px; height: 36px; }
  .rw__actions { flex-direction: column-reverse; }
  .rw__btn { width: 100%; }
}
