/* WK Booking Custom-Overrides oberhalb von Tailwind */

/* Blazor's Standard-Error-UI per Default ausblenden. Wird per JS sichtbar gemacht wenn eine unbehandelte Exception auftritt. */
#blazor-error-ui {
    background: #fef3c7;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 14px;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

:root {
  --wk-red: #e1011b;
  --wk-red-dark: #c0011a;
  --wk-slate: #17344a;
}

html, body {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #4c4c4c;
  background: #f7f9fb;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--wk-red);
  outline-offset: 2px;
}

/* Blazor's <FocusOnNavigate> setzt nach jeder Navigation den Fokus auf die H1.
   Für Screenreader-Nutzer ist das gut, visuell stört das Outline-Rechteck.
   Wir blenden es aus — Fokus bleibt programmatisch gesetzt. */
h1:focus, h1:focus-visible {
  outline: none;
}

/* Tailwind v4 entfernt im Preflight den klassischen cursor:pointer für Buttons.
   Wir holen ihn zurück, damit klickbare Elemente weiterhin als klickbar erkennbar sind. */
button:not(:disabled),
[role="button"]:not(:disabled),
summary,
label[for] {
  cursor: pointer;
}
button:disabled,
[role="button"]:disabled {
  cursor: not-allowed;
}

/* Default-Pfeil vom <details><summary> entfernen (für unser Burger-Menü) */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Nav-Active-Indikator auf Mobile etwas kleiner */
@media (max-width: 767px) {
  .nav-active::after { bottom: -10px; }
}

.nav-active {
  color: var(--wk-red);
  font-weight: 600;
  position: relative;
}
.nav-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -14px;
  height: 2px; background: var(--wk-red);
  border-radius: 2px;
}

/* Kalender-Tag Status-Farben */
.cal-day { aspect-ratio: 1 / 1; }
.cal-free      { background: #ffffff; border: 1px solid #e6e6e6; }
.cal-free:hover{ background: #fff7f8; border-color: var(--wk-red); cursor: pointer; }
.cal-mine      { background: #e1011b; color: #fff; border: 1px solid var(--wk-red-dark); }
.cal-taken     { background: #efefef; color: #9ca3af; border: 1px solid #e6e6e6; cursor: not-allowed; }
.cal-partial   { background: linear-gradient(135deg, #fff 0% 50%, #efefef 50% 100%); border: 1px solid #e6e6e6; cursor: pointer; }
.cal-other     { background: #f7f9fb; color: #b9b9b9; border: 1px solid transparent; }

/* Strip-Cards */
.day-card { transition: all .15s ease; scroll-snap-align: start; }
.day-card.selected { background: var(--wk-red); color: #fff; border-color: var(--wk-red-dark); }
.day-card.selected .day-num { color: #fff; }
.day-card.selected .day-wday, .day-card.selected .day-status { color: rgba(255,255,255,0.9); }

/* Mini-Monatskalender (Outlook-Stil) */
.mini-day {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  font-size: 13px; font-weight: 500;
  color: #4c4c4c;
  position: relative;
  margin: 0 auto;
}
.mini-day:hover { background: #f7f9fb; color: var(--wk-red); }
.mini-day.outside { color: #cbd2d8; cursor: default; }
.mini-day.outside:hover { background: transparent; color: #cbd2d8; }
.mini-day.today { box-shadow: inset 0 0 0 1.5px var(--wk-slate); }
.mini-day.selected { background: var(--wk-red); color: #fff; font-weight: 600; }
.mini-day.selected:hover { background: var(--wk-red-dark); color: #fff; }
.mini-day.selected.today { box-shadow: none; }
.mini-dot { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; }
.mini-day.selected .mini-dot { background: rgba(255,255,255,0.85) !important; }

.strip-scroll { scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip-scroll::-webkit-scrollbar { height: 6px; }
.strip-scroll::-webkit-scrollbar-thumb { background: #cbd2d8; border-radius: 3px; }

.view-tab { padding: 6px 14px; font-size: 13px; font-weight: 600; color: #4c4c4c; border-radius: 6px; transition: all .15s ease; }
.view-tab.active { background: #fff; color: var(--wk-slate); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* WK-Buttons.
   - `display: inline-flex` mit `align-items/justify-content: center` zentriert
     Icon+Text-Kombinationen sauber.
   - `text-align: center` greift zusätzlich, wenn der Text auf Mobile umbricht
     (Flex zentriert nur die *Zeilen* als Block, nicht den Text innerhalb).
   - `min-width: 0` verhindert, dass langer Text das Layout sprengt. */
.wk-btn-primary,
.wk-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  min-width: 0;
  font-weight: 600;
  border-radius: 0.375rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wk-btn-primary {
  background: var(--wk-red);
  color: #fff;
  padding: 0.75rem 1rem;
  border: 1px solid var(--wk-red-dark);
}
.wk-btn-primary:hover { background: var(--wk-red-dark); }
.wk-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.wk-btn-secondary {
  background: #fff;
  color: var(--wk-slate);
  border: 1px solid #e6e6e6;
  padding: 0.6rem 1rem;
}
.wk-btn-secondary:hover { border-color: var(--wk-red); color: var(--wk-red); }

/* `w-full` (Tailwind) auf einer inline-flex-Pille verhält sich auf manchen
   Mobile-Browsern unzuverlässig — explizit auf flex umstellen, damit Text
   und Icon zuverlässig in der Mitte landen. */
.wk-btn-primary.w-full,
.wk-btn-secondary.w-full {
  display: flex;
  width: 100%;
}

/* ─────────────────────────────────────────────────────────────────
   Sanfter Übergang beim Seitenwechsel (Blazor Enhanced Navigation).
   Statt zweimaliger Flacker zeigen wir oben eine dezente Progress-
   Leiste und lassen den Hauptinhalt mit einem 120 ms Fade rein.
   ───────────────────────────────────────────────────────────────── */
main {
  animation: wk-page-in 0.12s ease-out both;
}
@keyframes wk-page-in {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* Während der Navigation: dünne Progress-Leiste oben */
#wk-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--wk-red);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: width 0.25s ease, opacity 0.15s ease;
}
#wk-nav-progress.wk-nav-progress-active {
  opacity: 1;
  width: 80%;
  transition: width 5s cubic-bezier(0.05, 0.8, 0.1, 1);
}
#wk-nav-progress.wk-nav-progress-done {
  opacity: 0;
  width: 100%;
  transition: width 0.15s ease, opacity 0.25s ease 0.1s;
}

/* Native Cross-Document View Transitions (Browser-Support vorausgesetzt) */
@view-transition { navigation: auto; }
