/* Neuer Termin (#102): das Blatt aus /booking/neuer-termin.js.  Material, Farben, Schrift und Radien aus
   @gurkendevteam/design; hier nur Struktur im 4-px-Raster. */
.nt-sheet .booking-sheet-body { display: grid; gap: 24px; padding-bottom: 8px; }
/* Ein Feld im Fokus rollt über den klebenden Fuß, nicht darunter. */
.nt-sheet { scroll-padding-bottom: 144px; }
.nt-section { display: grid; gap: 12px; margin: 0; }
.nt-section[hidden], .nt-empty[hidden], .nt-custom[hidden], .nt-times[hidden], .nt-warn[hidden], .nt-hint[hidden], .nt-foot[hidden], .nt-text-button[hidden], .nt-next[hidden] { display: none; }
.nt-heading { margin: 0; color: var(--muted-foreground); font-size: var(--type-label); line-height: var(--type-label-leading); font-weight: var(--weight-strong); }
.nt-heading:focus { outline: none; }
.nt-heading:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nt-value, .nt-summary { margin: 0; font-size: var(--type-lead); line-height: var(--type-lead-leading); font-weight: var(--weight-medium); }
.nt-hint { margin: 0; color: var(--muted-foreground); font-size: var(--type-caption); line-height: var(--type-caption-leading); }

/* Auswahl als Chips (Leistung, Mit, Uhrzeit): 44 px Ziel, gewählt mit Wald-Rand aus senjara-choice. */
.nt-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-form .nt-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; color: var(--forest); font: inherit; font-size: var(--type-body); font-weight: var(--weight-medium); }
.nt-choice small { color: var(--muted-foreground); font-size: var(--type-caption); font-weight: 400; font-variant-numeric: tabular-nums; }

/* Tag: sieben Tage ab heute als Streifen wie im Kalender (#145), Monat und Pfeile darüber. */
.nt-week { display: flex; align-items: center; gap: 4px; }
.nt-month { flex: 1; font-size: var(--type-body); font-weight: var(--weight-medium); }
.booking-form .nt-arrow, .booking-form .nt-step { width: 44px; padding: 0; }
.nt-arrow svg, .nt-step svg { width: 20px; height: 20px; }
.nt-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.booking-form .nt-day { display: grid; justify-items: center; gap: 4px; min-width: 0; min-height: 64px; padding: 4px 0; border: 0; border-radius: var(--radius-small); background: transparent; color: var(--forest); font: inherit; cursor: pointer; }
.nt-day:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nt-day-weekday { color: var(--muted-foreground); font-size: var(--type-caption); }
.nt-day-number { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; font-size: var(--type-lead); font-variant-numeric: tabular-nums; transition: background-color var(--motion-fast) var(--ease-out); }
.nt-day[aria-current="date"] :is(.nt-day-number, .nt-day-weekday) { color: var(--forest); font-weight: var(--weight-strong); }
.nt-day[aria-pressed="true"] .nt-day-number { background: var(--forest); color: var(--paper); }
/* Tage mit freier Zeit (#122); ohne bleibt der Platz, damit der Streifen beim Laden nicht springt. */
.nt-day-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--forest); }
.nt-day-dot[data-free="false"] { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
  .nt-day:hover .nt-day-number { background: var(--hover); }
  .nt-day[aria-pressed="true"]:hover .nt-day-number { background: var(--forest); }
}

/* Uhrzeiten als Raster wie in der Kundenansicht. */
.nt-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.booking-form .nt-time { min-height: 44px; padding: 0 8px; color: var(--forest); font: inherit; font-size: var(--type-body); font-weight: var(--weight-medium); text-align: center; font-variant-numeric: tabular-nums; }
.nt-warn { margin: 0; padding: 8px 12px; border-radius: var(--radius-small); background: var(--warning-surface); color: var(--warning); font-size: var(--type-body); line-height: var(--type-body-leading); }
.booking-form .nt-text-button { justify-self: start; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--forest); font-weight: var(--weight-medium); text-decoration: underline; text-underline-offset: 3px; }
.nt-custom { display: grid; gap: 8px; }
/* Nichts frei (#145): der nächste freie Tag als Knopf, der eine Weg nach vorn. */
.booking-form .nt-next { justify-self: start; min-height: 44px; }

/* Kunde: Felder untereinander, Fehler warm-rot direkt am Feld. */
.nt-fields { display: grid; gap: 16px; }
.booking-form .nt-field { display: grid; gap: 4px; font-size: var(--type-label); font-weight: var(--weight-medium); }
.booking-form .nt-field input, .booking-form .nt-field select { border-radius: var(--radius-small); background: var(--card); }
.booking-form .nt-field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.nt-customer-fields { display: grid; gap: 16px; }

/* Zusätze und Personen: Mengen-Stepper mit 44-px-Knöpfen. */
.nt-upsells { display: grid; gap: 8px; }
.nt-upsell, .nt-persons { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.nt-upsell-copy { display: grid; gap: 4px; font-size: var(--type-body); font-weight: var(--weight-medium); }
.nt-upsell-copy small { color: var(--muted-foreground); font-size: var(--type-caption); font-weight: 400; font-variant-numeric: tabular-nums; }
.nt-upsell[data-sold-out="true"] .nt-upsell-copy { opacity: .6; }
.nt-persons > span { font-size: var(--type-body); font-weight: var(--weight-medium); }
.nt-stepper { display: inline-flex; align-items: center; gap: 4px; }
.nt-count { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }

/* Preis: Summe groß, Aufschlüsselung als Definitionsliste aus pricing.js. */
.nt-price-body { display: grid; gap: 4px; }
.nt-total { font-size: var(--type-section); line-height: var(--type-section-leading); font-weight: var(--weight-strong); font-variant-numeric: tabular-nums; }
.nt-price-note { margin: 0; color: var(--muted-foreground); font-size: var(--type-caption); line-height: var(--type-caption-leading); }
.nt-price[aria-busy="true"] .nt-total { opacity: .5; }
.nt-price .price-breakdown { margin-top: 8px; }

/* Ohne Leistung: ein Satz und genau ein Schritt. */
.nt-empty { display: grid; justify-items: start; gap: 12px; padding: 24px 0; }
.nt-empty p { margin: 0; font-size: var(--type-lead); line-height: var(--type-lead-leading); }

/* Fuß: klebt unten im Blatt, auch wenn mobil die Tastatur offen ist (das Blatt rückt dann über sie, JS). */
.nt-foot { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom, 0px)); z-index: 1; display: grid; gap: 8px; margin: 0 -16px calc(-16px - env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--popover); -webkit-backdrop-filter: blur(20px) saturate(1.08); backdrop-filter: blur(20px) saturate(1.08); }
.nt-foot .dialog-actions { padding-top: 0; }
.nt-mail { margin: 0; color: var(--muted-foreground); font-size: var(--type-caption); line-height: var(--type-caption-leading); text-align: end; }
@media (min-width: 768px) {
  .nt-foot { bottom: -24px; margin: 0 -24px -24px; padding: 12px 24px 24px; }
  /* Seitenleiste: der Fuß steht unten, auch wenn der Inhalt kurz ist (Umbuchen). */
  .nt-sheet[data-placement="side"] .booking-sheet-form { display: flex; min-height: 100%; flex-direction: column; }
  .nt-sheet[data-placement="side"] .nt-foot { margin-top: auto; }
}
@media (max-width: 767px) {
  .nt-foot .dialog-actions { display: grid; grid-template-columns: 1fr 2fr; }
  .nt-foot .dialog-actions .button { width: 100%; }
  .nt-mail { text-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .nt-day-number { transition: none; }
}

/* Neben dem Kalender (#124): ohne Scrim (show()) rückt die App zur Seite, damit Raster, Datumsleiste und Detail frei
   bleiben und man daneben weiterklicken kann.  Breite und Abstand wie das seitliche Blatt des Packages (420 + 12 px). */
@media (min-width: 1100px) {
  body:has(> dialog.nt-sheet[open]:not(:modal)) .app { padding-inline-end: calc(420px + 24px); }
}
