/* Datums- und Uhrzeitauswahl (public/js/atav-datetime.js), seit 13.11.2026.
   .dt-trigger ueber dem verdeckten Feld .dt-native; .dt-pop als Popover am Feld oder als Blatt
   von unten (.is-sheet, unter 640 px Breite oder 500 px Hoehe). Grundaussehen der Schaltflaeche
   mit :where() ohne Gewicht, damit die Feldklasse der Seite (vp-input, sh-form-input) gewinnt.
   Ebene ueber dem Cookie-Hinweis (z-index 99999), sonst verdeckt er das Blatt. */
.dt{ position:relative; min-width:0 }
.dt-native{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; pointer-events:none }
.dt-sr{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }

:where(.dt-trigger){
  width:100%; min-height:48px; box-sizing:border-box; margin:0; padding:10px 12px;
  border:1px solid #c9ced8; border-radius:var(--rund-s, 8px); background:#fff; color:#222;
  font:inherit; font-size:var(--schrift-m, 1rem); line-height:1.3;
}
:where(.dt-trigger):focus-visible{ outline:2px solid #1e2a40; outline-offset:1px }
.dt > .dt-trigger{
  display:flex; align-items:center; position:relative; height:auto; min-height:48px;
  padding-inline-end:44px; text-align:start; cursor:pointer; -webkit-appearance:none; appearance:none;
}
.dt-trigger__text{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.dt-trigger.is-empty .dt-trigger__text{ color:#6b7280 }
.dt-trigger__icon{ position:absolute; inset-inline-end:12px; top:50%; width:20px; height:20px; margin-top:-10px; color:#D60000; pointer-events:none }
.dt > .dt-trigger--tight{ padding-inline-end:8px }
.dt-trigger--tight .dt-trigger__icon{ display:none }
.dt > .dt-trigger[aria-expanded="true"]{ border-color:#1e2a40 }
.dt > .dt-trigger[aria-invalid="true"]{ border-color:#D60000 }
.dt > .dt-trigger:disabled{ opacity:.6; cursor:default }

.dt-backdrop{ position:fixed; inset:0; z-index:100001; background:rgba(15,23,42,.45) }
.dt-backdrop[hidden],.dt-pop[hidden]{ display:none }
.dt-pop{
  position:absolute; z-index:100002; box-sizing:border-box; width:342px; max-width:calc(100vw - 16px);
  padding:12px 16px 16px; background:#fff; color:#1e2a40; border:1px solid #d5d9e0; border-radius:12px;
  box-shadow:0 12px 40px rgba(15,23,42,.22); font-family:inherit; font-size:16px; line-height:1.4; text-align:start;
  animation:dt-in .15s ease-out;
}
/* Blatt von unten: volle Breite, Felder 48 px */
.dt-pop.is-sheet{
  position:fixed; left:0; right:0; bottom:0; top:auto; width:auto; max-width:none; max-height:88vh; max-height:88svh;
  overflow:auto; overscroll-behavior:contain; border-width:1px 0 0; border-radius:16px 16px 0 0;
  padding:12px clamp(6px, calc((100vw - 308px) / 2), 16px) calc(16px + env(safe-area-inset-bottom));
  animation:dt-up .2s ease-out;
}
.dt-pop.is-sheet .dt-pop__box{ max-width:30rem; margin-inline:auto }   /* Handy quer: nicht ueber die ganze Breite */
@keyframes dt-in{ from{ opacity:0; transform:translateY(-4px) } }
@keyframes dt-up{ from{ transform:translateY(100%) } }
@media (prefers-reduced-motion: reduce){ .dt-pop,.dt-pop.is-sheet{ animation:none } }
body.dt-open{ overflow:hidden }

.dt-pop button{ font:inherit; color:inherit; background:none; border:0; margin:0; padding:0; cursor:pointer; -webkit-appearance:none; appearance:none; text-transform:none; letter-spacing:normal; box-shadow:none }
.dt-pop p{ margin:0 }
.dt-pop .dt-ic{ display:block; width:20px; height:20px }
.dt-pop :focus-visible{ outline:2px solid #1e2a40; outline-offset:2px }
.dt-pop__head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px }
.dt-pop__title{ font-weight:700; font-size:17px }
.dt-pop .dt-pop__close{ display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; height:44px; margin-inline-end:-10px; border-radius:8px; color:#4b5563 }
.dt-pop.is-sheet .dt-pop__close{ margin-inline-end:0 }
.dt-cal__nav{ display:flex; align-items:center; gap:8px; margin-bottom:8px }
.dt-cal__month{ flex:1; text-align:center; font-weight:700 }
.dt-pop .dt-cal__nav button{ display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid #c9ced8; border-radius:8px; color:#D60000 }
.dt-pop .dt-cal__nav button:disabled{ opacity:.35; cursor:default }
/* Pfeil zeigt nach rechts; zurueck gespiegelt, rechts-nach-links umgekehrt */
.dt-cal__prev .dt-ic,.dt-time__back .dt-ic,[dir="rtl"] .dt-cal__next .dt-ic{ transform:scaleX(-1) }
[dir="rtl"] .dt-cal__prev .dt-ic,[dir="rtl"] .dt-time__back .dt-ic{ transform:none }
.dt-pop .dt-cal__grid{ width:100%; margin:0; table-layout:fixed; border-collapse:separate; border-spacing:0; text-align:center; font-variant-numeric:tabular-nums; background:none }
.dt-cal__grid th,.dt-cal__grid td{ border:0; padding:0; background:none; text-align:center; vertical-align:middle }
.dt-cal__grid th{ padding-bottom:4px; font-size:13px; font-weight:600; color:#4b5563; overflow:hidden; white-space:nowrap }
.dt-cal__grid .dt-day{ height:44px; border-radius:8px; cursor:pointer; color:#1e2a40 }
.dt-cal__grid .dt-day[aria-current="date"]{ box-shadow:inset 0 0 0 1px #1e2a40; font-weight:700 }
.dt-pop .dt-day[aria-selected="true"],.dt-pop .dt-slot[aria-pressed="true"]{ background:#D60000; border-color:#D60000; color:#fff; font-weight:700 }
.dt-pop .dt-day[aria-disabled="true"],.dt-pop .dt-slot:disabled{ color:#9aa1ad; opacity:.55; background:none; cursor:default; box-shadow:none }
.dt-quick{ display:flex; gap:8px; margin-top:12px }
.dt-quick:empty{ display:none }
.dt-pop .dt-chip,.dt-pop .dt-slot{ min-height:44px; border:1px solid #c9ced8; border-radius:8px; font-weight:600; color:#1e2a40 }
.dt-pop .dt-chip{ flex:1; padding:0 12px }
.dt-time__grid{ display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:8px }
.dt-slot{ font-variant-numeric:tabular-nums }
.dt-pop .dt-time__back{ display:inline-flex; align-items:center; gap:4px; min-height:44px; margin:-8px 0 8px; color:#D60000; font-weight:600 }
.dt-pop .dt-time__back .dt-ic{ width:18px; height:18px }
.dt-pop__hint{ margin-top:12px; font-size:14px; line-height:1.45; color:#4b5563 }
.dt-pop.is-sheet .dt-day,.dt-pop.is-sheet .dt-slot,.dt-pop.is-sheet .dt-chip{ min-height:48px; height:48px }
/* Hover nur mit Maus */
@media (hover: hover){
  .dt-pop .dt-pop__close:hover{ background:#f1f3f7; color:#1e2a40 }
  .dt-cal__grid .dt-day:hover:not([aria-disabled]):not([aria-selected]){ background:#f1f3f7 }
  .dt-pop .dt-cal__nav button:hover:not(:disabled),
  .dt-pop .dt-chip:hover,.dt-pop .dt-slot:hover:not(:disabled):not([aria-pressed]){ border-color:#1e2a40; background:#f1f3f7 }
}
/* Windows-Kontrastmodus */
@media (forced-colors: active){
  .dt-cal__grid .dt-day[aria-current="date"]{ text-decoration:underline 2px; text-underline-offset:4px }
  .dt-pop .dt-day[aria-selected="true"],.dt-pop .dt-slot[aria-pressed="true"]{ forced-color-adjust:none; background:Highlight; color:HighlightText; outline-color:CanvasText }
}
