@charset "UTF-8";
/* =====================================================================
   Terminbuchung – Assistent, Kalender, Slotauswahl, Terminverwaltung
   Setzt auf site.css auf und nutzt dieselben Variablen.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Fortschrittsanzeige
   --------------------------------------------------------------------- */
.wizard-steps {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  list-style: none; margin: 0 0 var(--sp-6); padding: 0;
  counter-reset: wstep;
}
.wizard-steps li {
  counter-increment: wstep;
  display: flex; align-items: center; gap: .6rem;
  font-size: .85rem; font-weight: 600;
  color: var(--steel-dim);
}
.wizard-steps li::before {
  content: counter(wstep);
  display: grid; place-items: center;
  width: 1.7rem; height: 1.7rem;
  border: 1px solid var(--line); border-radius: 50%;
  font-family: var(--font-mono); font-size: .8rem;
  background: var(--raise);
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              color .3s var(--ease);
}
.wizard-steps li[data-state='current'] { color: var(--enamel); }
.wizard-steps li[data-state='current']::before {
  background: var(--chrome); border-color: var(--chrome); color: var(--on-chrome);
  /* Der aktuelle Schritt atmet leicht – man verliert ihn nicht aus dem Blick */
  animation: step-pulse 2.6s var(--ease) infinite;
}
@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(223, 228, 234, .40); }
  55%      { box-shadow: 0 0 0 7px rgba(223, 228, 234, 0); }
}
.wizard-steps li[data-state='done'] { color: var(--steel); }
.wizard-steps li[data-state='done']::before {
  content: '✓';
  background: var(--ok-wash); border-color: var(--ok); color: var(--ok);
  animation: none;
}

/* ---------------------------------------------------------------------
   Schritt 1 – Leistung wählen
   --------------------------------------------------------------------- */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--sp-3);
}

.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick__body {
  height: 100%;
  display: flex; flex-direction: column;
  padding: var(--sp-4) var(--sp-5);
  background: var(--raise);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background-color .2s var(--ease),
              box-shadow .2s var(--ease), transform .2s var(--ease);
}
.pick:hover .pick__body {
  border-color: var(--chrome-edge); border-left-color: var(--chrome);
  background: var(--raise-2);
  transform: translateY(-2px);
}
.pick input:checked + .pick__body {
  border-color: var(--chrome);
  border-left-color: var(--chrome);
  background: var(--raise-2);
  box-shadow: var(--shadow-card);
}
.pick input:focus-visible + .pick__body { box-shadow: var(--ring); }

.pick__name { font-weight: 700; font-size: 1.02rem; margin-bottom: .2rem; }
.pick__text { font-size: .87rem; color: var(--steel); line-height: 1.55; margin: 0 0 var(--sp-3); }
.pick__meta {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: .3rem var(--sp-3);
  font-family: var(--font-mono); font-size: .78rem; color: var(--steel);
}

/* ---------------------------------------------------------------------
   Schritt 2 – Kalender und Uhrzeiten
   --------------------------------------------------------------------- */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 54rem) { .booking-layout { grid-template-columns: 1fr; } }

.calendar {
  /* Ohne Deckel würde der Kalender im einspaltigen Layout auf volle
     Seitenbreite wachsen und die Tagesfelder absurd groß werden. */
  max-width: 23rem;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.calendar__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.calendar__month {
  font-weight: 700; font-size: 1.02rem;
}
.calendar__nav {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  background: var(--raise-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font: inherit; color: var(--enamel);
  transition: background-color .15s var(--ease), color .15s var(--ease),
              border-color .15s var(--ease);
}
.calendar__nav:hover:not([disabled]) {
  background: var(--chrome); color: var(--on-chrome); border-color: var(--chrome);
}
.calendar__nav[disabled] { opacity: .3; cursor: not-allowed; }

.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar__dow {
  padding-bottom: .4rem;
  text-align: center;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--steel-dim);
}

.day {
  position: relative;
  min-height: 2.6rem;
  padding-bottom: .45rem;   /* Platz für den Verfügbarkeitspunkt */
  display: grid; place-items: center;
  border: 1px solid transparent; border-radius: var(--radius);
  background: none;
  font: inherit; font-family: var(--font-mono); font-size: .9rem;
  color: var(--enamel);
  cursor: pointer;
  transition: background-color .13s var(--ease), border-color .13s var(--ease),
              color .13s var(--ease);
}
.day[data-free='0'], .day[disabled] {
  color: var(--steel-dim); opacity: .5; cursor: not-allowed;
}
.day[data-free='0']:not([disabled]) { opacity: .65; }
.day:not([disabled]):hover { background: var(--raise-2); border-color: var(--line); }

/* Punkt zeigt an, dass an diesem Tag etwas frei ist */
.day[data-free]:not([data-free='0'])::after {
  content: '';
  position: absolute; bottom: .3rem; left: 50%; translate: -50% 0;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--chrome);
  transition: scale .2s var(--ease);
}
.day:not([disabled]):hover::after { scale: 1.5; }
.day[aria-pressed='true'] {
  background: var(--chrome); border-color: var(--chrome);
  color: var(--on-chrome); font-weight: 600;
}
.day[aria-pressed='true']::after { background: var(--on-chrome); }
.day--today { box-shadow: inset 0 0 0 1px var(--chrome-edge); }
.day--pad { visibility: hidden; }

.calendar__legend {
  display: flex; gap: var(--sp-4);
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: .76rem; color: var(--steel);
}
.calendar__legend span { display: flex; align-items: center; gap: .4rem; }
.calendar__legend i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--chrome);
  display: block; font-style: normal;
}
.calendar__legend i.is-none { background: var(--steel-dim); }

/* --- Uhrzeiten -------------------------------------------------------- */
.slots__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.slots__date { font-size: 1.15rem; font-weight: 700; }

.slot-groups { display: grid; gap: var(--sp-5); }
.slot-group__label {
  margin-bottom: var(--sp-3);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--steel-dim);
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: var(--sp-2);
}

.slot {
  padding: .7rem .5rem;
  background: var(--raise);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-family: var(--font-mono); font-size: .95rem;
  color: var(--enamel);
  cursor: pointer;
  transition: background-color .13s var(--ease), border-color .13s var(--ease),
              color .13s var(--ease), transform .13s var(--ease);
  /* Die Zeiten erscheinen gestaffelt, wie ausgelegte Karten */
  animation: slot-in .34s var(--ease) both;
  animation-delay: calc(var(--n, 0) * 22ms);
}
@keyframes slot-in {
  from { opacity: 0; translate: 0 7px; }
  to   { opacity: 1; translate: 0 0; }
}
.slot:hover {
  border-color: var(--chrome); background: var(--chrome-wash);
  transform: translateY(-2px);
}
.slot[aria-pressed='true'] {
  background: var(--chrome); border-color: var(--chrome);
  color: var(--on-chrome); font-weight: 600;
}

.slots__empty {
  padding: var(--sp-6);
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  text-align: center; color: var(--steel);
  background: var(--raise);
}
.slots__empty p { margin: 0 0 var(--sp-4); }
.slots__empty strong { color: var(--enamel); }

.slots__loading {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-6);
  color: var(--steel); font-size: .92rem;
}
.spinner {
  width: 1.1rem; height: 1.1rem; flex: none;
  border: 2px solid var(--line); border-top-color: var(--chrome);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Die Zusammenfassungskarte (.summary) stand früher hier. Sie steht
   inzwischen auch auf Inhaltsseiten, die booking.css gar nicht laden –
   deshalb liegt sie jetzt im site.css. */

/* ---------------------------------------------------------------------
   Terminverwaltung durch den Kunden
   --------------------------------------------------------------------- */
.ticket {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ticket__head {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--graphite);
  overflow: hidden;
}
.ticket__head::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg,
    rgba(230, 233, 237, .03) 0 2px, transparent 2px 10px);
  pointer-events: none;
}
.ticket__head > * { position: relative; }
.ticket__ref {
  font-family: var(--font-mono); font-size: .85rem;
  color: var(--chrome-lit); letter-spacing: .04em;
}
.ticket__when { font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; }
.ticket__body { padding: var(--sp-5); }
.ticket__foot {
  padding: var(--sp-5);
  border-top: 1px solid var(--line);
  background: var(--sunk);
}

.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .7rem var(--sp-5); }
.kv dt { font-size: .88rem; color: var(--steel); }
.kv dd { margin: 0; font-size: .95rem; font-weight: 600; }

/* Statusgetönte Kopfleiste */
.ticket--cancelled .ticket__head { background: #2e1c18; }
.ticket--done .ticket__head { background: #1c2823; }

/* ---------------------------------------------------------------------
   Wartelisten-Angebot
   --------------------------------------------------------------------- */
.offer-clock {
  display: inline-flex; align-items: baseline; gap: .4rem;
  padding: .35rem .8rem;
  background: var(--chrome-wash);
  border: 1px solid var(--chrome-edge);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: .85rem; font-weight: 600;
  color: var(--chrome-lit);
}

/* ---------------------------------------------------------------------
   Abschlussbild
   --------------------------------------------------------------------- */
.done-mark {
  width: 3.4rem; height: 3.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ok-wash); color: var(--ok);
  border: 1px solid var(--ok);
  font-size: 1.5rem;
  margin-bottom: var(--sp-5);
  animation: done-seat .6s var(--ease-mech) both;
}
/* Setzt sich wie ein Stempel – einmal, dann Ruhe */
@keyframes done-seat {
  0%   { opacity: 0; scale: .5; }
  60%  { opacity: 1; scale: 1.08; }
  100% { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .slot, .done-mark { animation: none; }
  .wizard-steps li[data-state='current']::before { animation: none; }
}
