/* Alle Farb-, Größen- und Schriftwerte des Widgets (Port von booking_theme.dart, Plan 1.7); Hex steht nur hier. */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/fonts/Figtree-Regular.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/fonts/Figtree-Medium.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/Figtree-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/fonts/Figtree-Bold.woff2") format("woff2"); }

:root {
  color-scheme: light;

  --t-primary: #8555ff;
  --t-primary-text: #faf9f6;
  --t-active: #5e3ebf;
  --t-light-accent: #e4d9ff;
  --t-background: #faf9f6;
  --t-surface: #ffffff;
  --t-border: #e2e3ea;
  --t-text: #212121;
  --t-text-neutral: #9e9e9e;
  --t-text-subtle: #6b6b6b;
  --t-error: #f44336;
  --t-success: #4caf50;
  --t-error-text: #c62828;

  --t-cal-bookable-bg: #dff1e3;
  --t-cal-bookable-fg: #2f7d46;
  --t-cal-bookable-border: #8dc79c;
  --t-cal-limited-bg: #faefcf;
  --t-cal-limited-fg: #8a6410;
  --t-cal-limited-border: #dfbf6a;
  --t-cal-full-bg: #f7e2f2;
  --t-cal-full-fg: #9b2c86;
  --t-cal-full-border: #dba0cd;
  --t-cal-past-bg: #e9ecf1;
  --t-cal-past-fg: #9aa3b1;
  --t-cal-closed-fg: #687181;
  --t-cal-package-bg: #deeff2;
  --t-cal-package-fg: #1f6b78;
  --t-cal-package-border: #8cc2cb;

  --t-gap-xxs: 2px;
  --t-gap-xs: 4px;
  --t-gap-sm: 8px;
  --t-gap-md: 12px;
  --t-gap-lg: 16px;
  --t-gap-xl: 24px;
  --t-gap-xxl: 32px;
  --t-card-padding-xl: 20px;

  --t-card-radius: 8px;
  --t-card-radius-lg: 12px;
  --t-input-radius: 6px;
  --t-button-radius: 8px;
  --t-border-thin: 1px;
  --t-border-thick: 2px;
  --t-button-height: 44px;
  --t-touch-min: 48px;
  --t-back-min-width: 120px;
  --t-service-image-width: 84px;
  --t-service-image-height: 56px;
  --t-shell-max-width: 560px;

  --t-font: "Figtree", system-ui, sans-serif;
}

/* html/body nie height:100%: die Höhenmessung braucht die natürliche Inhaltshöhe (Plan 2.1 Nr. 4). */
html, body { margin: 0; padding: 0; background: var(--t-background); color: var(--t-text); font: 400 16px/1.5 var(--t-font); }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: var(--t-border-thick) solid var(--t-primary); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.yb-shell { max-width: var(--t-shell-max-width); margin: 0 auto; }
.yb-shell-inner { padding: var(--t-card-padding-xl); }
.yb-shell-header { display: flex; align-items: center; justify-content: space-between; gap: var(--t-gap-md); margin-bottom: var(--t-gap-lg); }
.yb-step-counter { font-size: 14px; color: var(--t-text-subtle); margin-left: auto; }

.yb-heading-lg { font-size: 18px; font-weight: 600; line-height: 1.4; }
.yb-heading-md { font-size: 16px; font-weight: 600; line-height: 1.4; }
.yb-heading-sm { font-size: 14px; font-weight: 600; line-height: 1.4; }
.yb-body-lg-medium { font-size: 18px; font-weight: 500; line-height: 1.5; }
.yb-body-sm { font-size: 14px; line-height: 1.5; }
.yb-subtle { color: var(--t-text-subtle); }
.yb-section-header { margin-bottom: var(--t-gap-lg); }

.yb-button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: var(--t-touch-min); min-width: var(--t-back-min-width); padding: var(--t-gap-xs) var(--t-gap-lg);
  border-radius: var(--t-button-radius); border: var(--t-border-thin) solid transparent; cursor: pointer;
  font-weight: 500; background: var(--t-primary); color: var(--t-primary-text);
}
.yb-button-secondary { background: var(--t-surface); color: var(--t-text); border-color: var(--t-border); }
.yb-button-ghost { background: transparent; color: var(--t-primary); }
.yb-button[disabled], .yb-button[aria-disabled="true"] { opacity: 0.5; cursor: default; }

.yb-list { list-style: none; margin: 0; padding: 0; }
.yb-list > li { margin-bottom: var(--t-gap-md); }
.yb-card {
  display: flex; align-items: center; gap: var(--t-gap-lg); width: 100%; text-align: left;
  padding: var(--t-gap-lg); background: var(--t-surface); border: var(--t-border-thin) solid var(--t-border);
  border-radius: var(--t-card-radius); cursor: pointer;
}
.yb-card[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.yb-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--t-gap-xs); }
.yb-card-aside { display: flex; flex-direction: column; align-items: flex-end; }
.yb-card-description {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.yb-service-image {
  flex: none; width: var(--t-service-image-width); height: var(--t-service-image-height);
  border-radius: var(--t-card-radius); object-fit: cover;
}

.yb-loading { padding: var(--t-gap-xxl); text-align: center; }
.yb-unavailable { max-width: 420px; margin: 0 auto; padding: var(--t-gap-xxl); text-align: center; }
.yb-unavailable-icon { width: 56px; height: 56px; color: var(--t-text-neutral); }
.yb-unavailable h1 { margin: var(--t-gap-md) 0 var(--t-gap-sm); }

/* Kalender, Legende, Personenwahl, Terminkarte (U2). Farben nur über die Token oben. */
.yb-cal { margin: var(--t-gap-lg) 0; }
.yb-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--t-gap-sm); }
.yb-cal-nav {
  min-width: var(--t-touch-min); min-height: var(--t-touch-min); background: transparent; border: 0; cursor: pointer;
  font-size: 20px; color: var(--t-primary);
}
.yb-cal-nav[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.yb-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--t-gap-xs); margin-bottom: var(--t-gap-xs); }
.yb-cal-weekday { text-align: center; font-size: 12px; color: var(--t-text-subtle); }
.yb-cal-day {
  min-height: var(--t-touch-min); display: flex; flex-direction: column; align-items: center; gap: var(--t-gap-xxs);
  padding: var(--t-gap-xs); border: var(--t-border-thin) solid transparent; border-radius: var(--t-input-radius);
  background: var(--t-surface); cursor: pointer; font-size: 14px;
}
.yb-cal-day[aria-disabled="true"] { cursor: default; }
.yb-cal-none { background: var(--t-surface); }
.yb-cal-past { background: var(--t-cal-past-bg); color: var(--t-cal-past-fg); }
.yb-cal-bookable { background: var(--t-cal-bookable-bg); color: var(--t-cal-bookable-fg); border-color: var(--t-cal-bookable-border); }
.yb-cal-limited { background: var(--t-cal-limited-bg); color: var(--t-cal-limited-fg); border-color: var(--t-cal-limited-border); }
.yb-cal-full { background: var(--t-cal-full-bg); color: var(--t-cal-full-fg); border-color: var(--t-cal-full-border); }
.yb-cal-package { background: var(--t-cal-package-bg); color: var(--t-cal-package-fg); border: var(--t-border-thin) dashed var(--t-cal-package-border); }
.yb-cal-today { border: var(--t-border-thick) solid var(--t-primary); }
.yb-cal-selected { box-shadow: 0 0 0 var(--t-border-thick) var(--t-active); }
.yb-cal-chips { display: flex; flex-direction: column; align-items: center; font-size: 11px; line-height: 1.2; }
.yb-cal-chip-bookable { color: var(--t-cal-bookable-fg); }
.yb-cal-chip-limited { color: var(--t-cal-limited-fg); }
.yb-cal-chip-full { color: var(--t-cal-full-fg); }
.yb-cal-chip-package { color: var(--t-cal-package-fg); }
.yb-cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--t-gap-sm) var(--t-gap-lg); margin: 0 0 var(--t-gap-lg); padding: 0; font-size: 12px; color: var(--t-text-subtle); }
.yb-cal-legend li { display: flex; align-items: center; gap: var(--t-gap-xs); }
.yb-cal-swatch { width: 14px; height: 14px; border-radius: var(--t-gap-xs); border: var(--t-border-thin) solid var(--t-border); }
.yb-stepper { display: flex; align-items: center; gap: var(--t-gap-md); margin-bottom: var(--t-gap-lg); }
.yb-stepper-label { flex: 1; }
.yb-stepper-button {
  min-width: var(--t-touch-min); min-height: var(--t-touch-min); border: var(--t-border-thin) solid var(--t-border);
  border-radius: var(--t-button-radius); background: var(--t-surface); cursor: pointer; font-size: 20px;
}
.yb-stepper-button[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.yb-stepper-value { min-width: var(--t-touch-min); text-align: center; font-weight: 600; }
.yb-occurrence { display: flex; flex-direction: column; gap: var(--t-gap-xs); padding: var(--t-gap-lg); background: var(--t-surface); border: var(--t-border-thin) solid var(--t-border); border-radius: var(--t-card-radius); }
.yb-occurrence-package { opacity: 0.6; border-style: dashed; background: var(--t-cal-package-bg); }
.yb-occurrence .yb-button { margin-top: var(--t-gap-sm); }
.yb-status-bookable { color: var(--t-cal-bookable-fg); }
.yb-status-full { color: var(--t-cal-full-fg); }
.yb-status-package { color: var(--t-cal-package-fg); }
.yb-hint-box {
  min-height: var(--t-touch-min); text-align: left; padding: var(--t-gap-sm) var(--t-gap-md); cursor: pointer;
  background: var(--t-cal-limited-bg); color: var(--t-cal-limited-fg); border: var(--t-border-thin) solid var(--t-cal-limited-border);
  border-radius: var(--t-input-radius);
}
/* Daten-, Preis- und Extras-Schritt (Karte U3) */
.yb-form { display: flex; flex-direction: column; gap: var(--t-gap-md); }
.yb-field { display: flex; flex-direction: column; gap: var(--t-gap-xxs); }
.yb-field-label { font-size: 14px; font-weight: 500; }
.yb-input {
  width: 100%; min-height: var(--t-touch-min); padding: var(--t-gap-xs) var(--t-gap-md); font: inherit;
  color: var(--t-text); background: var(--t-surface); border: var(--t-border-thin) solid var(--t-border);
  border-radius: var(--t-input-radius);
}
textarea.yb-input { resize: vertical; }
.yb-input[aria-invalid="true"] { border-color: var(--t-error); }
.yb-field-error { font-size: 14px; color: var(--t-error); }
.yb-field-helper { font-size: 14px; color: var(--t-text-subtle); }
.yb-note { padding: var(--t-gap-md); font-size: 14px; background: var(--t-light-accent); color: var(--t-active); border-radius: var(--t-card-radius); }
.yb-summary { padding: var(--t-gap-lg); border: var(--t-border-thin) solid var(--t-border); border-radius: var(--t-card-radius); }
.yb-detail-list { margin: 0; display: flex; flex-direction: column; gap: var(--t-gap-xs); }
.yb-detail-row { display: flex; justify-content: space-between; gap: var(--t-gap-md); font-size: 14px; }
.yb-detail-row dd { margin: 0; text-align: right; }
.yb-price-lines { list-style: none; margin: var(--t-gap-xs) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--t-gap-xs); }
.yb-price-line { display: flex; justify-content: space-between; gap: var(--t-gap-sm); }
.yb-price-total { display: flex; justify-content: space-between; gap: var(--t-gap-sm); padding: var(--t-gap-md) 0 0; }
.yb-participants { display: flex; flex-direction: column; gap: var(--t-gap-md); margin-top: var(--t-gap-xl); }
.yb-participant { display: flex; flex-direction: column; gap: var(--t-gap-md); margin: 0; padding: var(--t-gap-lg); border: var(--t-border-thin) solid var(--t-border); border-radius: var(--t-card-radius); }
.yb-checkbox { display: flex; align-items: center; gap: var(--t-gap-sm); min-height: var(--t-touch-min); }
.yb-checkbox input { width: 20px; height: 20px; accent-color: var(--t-primary); }
.yb-row { display: flex; align-items: center; justify-content: space-between; gap: var(--t-gap-lg); }
.yb-row-body { display: flex; flex-direction: column; gap: var(--t-gap-xxs); min-width: 0; overflow-wrap: anywhere; }
.yb-count { display: flex; align-items: center; gap: var(--t-gap-xs); flex: none; }
.yb-count-input { width: 56px; text-align: center; }
.yb-count-button {
  min-width: var(--t-touch-min); min-height: var(--t-touch-min); font-size: 20px; cursor: pointer;
  background: var(--t-surface); border: var(--t-border-thin) solid var(--t-border); border-radius: var(--t-button-radius);
}
.yb-count-button[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.yb-hold-bar { padding: var(--t-gap-md); background: var(--t-light-accent); color: var(--t-active); border-radius: var(--t-card-radius); }
.yb-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.yb-error { color: var(--t-error-text); }
.yb-summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--t-gap-md); margin-bottom: var(--t-gap-md); }
.yb-payment-card { margin: var(--t-gap-lg) 0; padding: var(--t-gap-lg); background: var(--t-surface); border: var(--t-border-thin) solid var(--t-border); border-radius: var(--t-card-radius); min-height: 120px; }
.yb-stack > * + * { margin-top: var(--t-gap-sm); }
.yb-centered { text-align: center; }
.yb-confirmation-icon { width: 56px; height: 56px; color: var(--t-success); display: block; margin: var(--t-gap-lg) auto; }
.yb-detail-label { color: var(--t-text-subtle); }
.yb-detail-value { text-align: right; overflow-wrap: anywhere; }
.yb-link { background: none; border: 0; padding: var(--t-gap-sm); color: var(--t-primary); text-decoration: underline; cursor: pointer; min-height: var(--t-touch-min); }

/* Reservierung (U2r): Wahl-Chips, Hinweis, Ladebalken und Tagesbereich. */
.yb-picker { margin-bottom: var(--t-gap-lg); }
.yb-chips { display: flex; flex-wrap: wrap; gap: var(--t-gap-sm); margin: var(--t-gap-xs) 0; }
.yb-chip {
  min-height: 44px; padding: 0 var(--t-gap-lg); border-radius: var(--t-input-radius); cursor: pointer;
  border: var(--t-border-thin) solid var(--t-border); background: var(--t-surface); color: inherit; font: inherit;
}
.yb-chip-selected { border-color: var(--t-primary); box-shadow: 0 0 0 var(--t-border-thin) var(--t-primary); font-weight: 600; }
.yb-notice {
  padding: var(--t-gap-lg); border-radius: var(--t-input-radius);
  background: var(--t-cal-limited-bg); color: var(--t-cal-limited-fg); border: var(--t-border-thin) solid var(--t-cal-limited-border);
}
.yb-progress { height: 3px; margin-bottom: var(--t-gap-xs); background: transparent; }
.yb-progress[data-testid] { background: var(--t-primary); animation: yb-progress-pulse 1s ease-in-out infinite alternate; }
@keyframes yb-progress-pulse { from { opacity: 0.3; } to { opacity: 1; } }
.yb-day-panel { display: flex; flex-direction: column; gap: var(--t-gap-lg); margin-top: var(--t-gap-lg); }
.yb-day-state { margin: 0; }
.yb-day-panel-limited .yb-day-state { color: var(--t-cal-limited-fg); }
.yb-day-panel-full .yb-day-state { color: var(--t-cal-full-fg); }
/* Buchungsansicht und Storno (U4b) */
.yb-reasons { border: 0; padding: 0; margin: 0; gap: var(--t-gap-sm); }
.yb-reason { display: flex; align-items: center; gap: var(--t-gap-sm); font-size: 14px; }
.yb-contact { font-style: normal; font-size: 14px; color: var(--t-text-subtle); }
.yb-actions { display: flex; flex-wrap: wrap; gap: var(--t-gap-md); align-items: center; }
.yb-actions > * { flex: 1 1 160px; }
.yb-slider { position: relative; display: flex; align-items: center; min-height: 44px; border: 1px solid var(--t-border); border-radius: var(--t-button-radius); background: var(--t-light-accent); }
.yb-slider-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; pointer-events: none; }
.yb-slider-input { position: relative; width: 100%; margin: 0; background: transparent; accent-color: var(--t-primary); }
.yb-slider-input:disabled { opacity: 0.5; }
