/*
  Ferienradar-Demo: Banner, geführte Tour, Hinweise. Handgeschrieben (kein Tailwind), damit es auf
  den Snapshots der Buchungs-App (eigenes CSS) und den Seiten der Website gleich aussieht.
  Farben/Typo nach docs/design-direction.md.
*/
:root {
  --demo-bar-h: 44px;
  --demo-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --demo-ink: #1d1d1f;
  --demo-body: #424245;
  --demo-ink-2: #6e6e73;
  --demo-hair: #e8e8ed;
  --demo-mist: #f5f5f7;
  --demo-action: #0071e3;
  --demo-action-hover: #0077ed;
  --demo-spring: cubic-bezier(.32, .72, 0, 1);
}

/* ---------------------------------------------------------------- Banner */
.demo-bar {
  position: sticky; top: 0; z-index: 45;
  background: var(--demo-ink); color: #f5f5f7;
  font: 400 13px/1.3 var(--demo-font); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
}
.demo-bar *, .demo-bar *::before, .demo-bar *::after { box-sizing: border-box; }
.demo-bar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 44px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.demo-bar__label { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.demo-bar__tag {
  flex-shrink: 0; display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px;
  border: 1px solid rgb(255 255 255 / .38); border-radius: 6px;
  color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .02em; text-decoration: none;
}
.demo-bar__tag:hover { border-color: rgb(255 255 255 / .7); }
.demo-bar__text { color: rgb(245 245 247 / .84); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar__text--short { display: none; }
.demo-bar__actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.demo-bar__links { display: flex; align-items: center; gap: 18px; margin: 0; padding: 0; list-style: none; }
.demo-bar__links a, .demo-bar__links button {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0;
  border: 0; background: none; color: #f5f5f7; font: inherit; cursor: pointer; text-decoration: none;
}
.demo-bar__links a:hover, .demo-bar__links button:hover { text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__tour {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
  border: 0; border-radius: 8px; background: #fff; color: var(--demo-ink);
  font: 600 13px/1 var(--demo-font); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease;
}
.demo-bar__tour:hover { background: #e8e8ed; }
.demo-bar__tour:active { transform: scale(.97); }
.demo-bar [hidden] { display: none !important; }
.demo-bar a:focus-visible, .demo-bar button:focus-visible, .demo-bar summary:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px;
}

/* Telefon: Menü statt Linkleiste */
.demo-bar__more { display: none; position: relative; }
.demo-bar__more summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  list-style: none; cursor: pointer; color: #f5f5f7;
}
.demo-bar__more summary::-webkit-details-marker { display: none; }
.demo-bar__more summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform .3s var(--demo-spring);
}
.demo-bar__more[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.demo-bar__panel {
  position: absolute; right: -4px; top: 46px; width: min(300px, calc(100vw - 24px));
  padding: 14px 16px 8px; border-radius: 14px; background: #fff; color: var(--demo-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 16px 40px rgb(0 0 0 / .18);
  font-size: 15px; line-height: 1.4;
}
.demo-bar__panel p { margin: 0 0 6px; color: var(--demo-ink-2); font-size: 13px; }
.demo-bar__panel ul { margin: 0; padding: 0; list-style: none; }
.demo-bar__panel li + li { border-top: 1px solid var(--demo-hair); }
.demo-bar__panel a, .demo-bar__panel button {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--demo-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.demo-bar__panel a:focus-visible, .demo-bar__panel button:focus-visible { outline: 2px solid var(--demo-action); outline-offset: 2px; }

.demo-bar__short { display: none; }
@media (max-width: 479px) {
  .demo-bar__tour .demo-bar__long { display: none; }
  .demo-bar__tour .demo-bar__short { display: inline; }
}
@media (max-width: 899px) {
  .demo-bar__links, .demo-bar__text--long { display: none; }
  .demo-bar__text--short { display: inline; }
  .demo-bar__more { display: block; }
  .demo-bar__actions { gap: 14px; }
}
@media (max-width: 359px) {
  .demo-bar__text--short { display: none; }
}

/* Bereiche der App, die oben kleben, unter das Banner schieben */
body:has(.demo-bar) aside.fixed.inset-y-0 { top: var(--demo-bar-h); }
body:has(.demo-bar) header.sticky.top-0 { top: var(--demo-bar-h); }
body:has(.demo-bar) .toolbar { top: var(--demo-bar-h); }
html:has(.demo-bar) { scroll-padding-top: calc(var(--demo-bar-h) + 64px); }

/* ---------------------------------------------------------------- Hinweise */
.demo-toast {
  position: fixed; z-index: 2147483001; left: 50%; top: calc(var(--demo-bar-h) + 12px);
  display: flex; align-items: flex-start; gap: 8px;
  width: min(440px, calc(100vw - 24px)); padding: 12px 8px 12px 16px;
  transform: translateX(-50%);
  border-radius: 14px; background: #fff; color: var(--demo-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 12px 32px rgb(0 0 0 / .16); outline: 1px solid rgb(0 0 0 / .06);
  font: 400 15px/1.4 var(--demo-font);
}
.demo-toast[hidden] { display: none; }
.demo-toast.is-in { animation: demo-drop .42s var(--demo-spring); }
.demo-toast__text { flex: 1; margin: 2px 0; }
.demo-toast__close {
  display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0;
  border: 0; border-radius: 8px; background: none; color: var(--demo-ink-2); cursor: pointer;
}
.demo-toast__close:hover { background: var(--demo-mist); color: var(--demo-ink); }
@keyframes demo-drop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.demo-inline-note {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--demo-mist);
  color: var(--demo-body); font: 400 14px/1.45 var(--demo-font);
}
.demo-inline-note strong { margin-right: 4px; color: var(--demo-ink); font-weight: 600; }
.demo-empty { margin: 16px 0 0; padding: 24px 0; border-block: 1px solid var(--demo-hair); color: var(--demo-ink-2); }

/* ---------------------------------------------------------------- Startseite der Demo */
.demo-choice { color: inherit; text-decoration: none; outline-offset: 4px; }
.demo-choice:focus-visible { outline: 2px solid var(--demo-action); }
.demo-choice__device { transition: transform .6s var(--demo-spring); }
@media (hover: hover) {
  .demo-choice:hover .demo-choice__device { transform: translateY(-6px); }
  .demo-choice:hover .link-more .chev { transform: translateX(3px); }
}

/* ---------------------------------------------------------------- Geführte Tour */
.demo-spot {
  position: fixed; z-index: 2147482999; pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--demo-action), 0 0 0 200vmax rgb(0 0 0 / .26);
  transition: top .45s var(--demo-spring), left .45s var(--demo-spring), width .45s var(--demo-spring), height .45s var(--demo-spring);
}
.demo-spot[hidden] { display: none; }

.demo-tour {
  position: fixed; z-index: 2147483000; top: 0; left: 0;
  width: min(372px, calc(100vw - 24px)); box-sizing: border-box;
  padding: 18px 20px 16px; border-radius: 16px; background: #fff; color: var(--demo-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 20px 50px rgb(0 0 0 / .24);
  font: 400 15px/1.47 var(--demo-font); letter-spacing: -0.01em; text-align: left;
  -webkit-font-smoothing: antialiased;
  animation: demo-pop .38s var(--demo-spring);
}
.demo-tour[hidden] { display: none; }
.demo-tour *, .demo-tour *::before, .demo-tour *::after { box-sizing: border-box; }
.demo-tour__head { display: flex; align-items: center; gap: 12px; }
.demo-tour__count { margin: 0; flex-shrink: 0; color: var(--demo-ink-2); font-size: 12px; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.demo-tour__track { flex: 1; height: 3px; border-radius: 3px; background: var(--demo-hair); overflow: hidden; }
.demo-tour__track span { display: block; height: 100%; border-radius: 3px; background: var(--demo-ink); transition: width .45s var(--demo-spring); }
.demo-tour__title {
  margin: 10px 0 6px; font: 600 19px/1.25 var(--demo-font); letter-spacing: -0.016em; color: var(--demo-ink);
  outline: none;
}
/* Die Überschrift bekommt den Fokus nur per Skript (tabindex=-1), wie nach einem Seitenwechsel – ohne Rahmen */
.demo-tour__body { margin: 0; color: var(--demo-body); }
.demo-tour__links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; padding: 0; list-style: none; }
.demo-tour__link { display: inline-flex; align-items: center; min-height: 32px; color: #0066cc; text-decoration: none; }
.demo-tour__link::after { content: "›"; margin-left: 5px; font-size: 1.15em; line-height: 1; }
.demo-tour__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.demo-tour__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.demo-tour__nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.demo-tour__end {
  min-height: 36px; padding: 0 2px; border: 0; background: none;
  color: var(--demo-ink-2); font: 400 14px/1 var(--demo-font); cursor: pointer;
}
.demo-tour__end:hover { color: var(--demo-ink); text-decoration: underline; text-underline-offset: 3px; }
.demo-tour__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px;
  border: 0; border-radius: 10px; font: 500 15px/1 var(--demo-font); letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, transform .08s ease-out;
}
.demo-tour__btn:active { transform: scale(.97); }
.demo-tour__btn--primary { background: var(--demo-action); color: #fff; }
.demo-tour__btn--primary:hover { background: var(--demo-action-hover); }
.demo-tour__btn--secondary { background: var(--demo-mist); color: var(--demo-ink); }
.demo-tour__btn--secondary:hover { background: #e8e8ed; }
.demo-tour [hidden] { display: none !important; }
/* Letzter Schritt: Erstgespräch als breiter Knopf, darunter „Demo weiter erkunden“ */
.demo-tour.is-final { width: min(400px, calc(100vw - 24px)); }
.demo-tour.is-final .demo-tour__actions { flex-wrap: wrap; row-gap: 6px; }
.demo-tour.is-final .demo-tour__nav { flex-basis: 100%; margin-left: 0; }
.demo-tour.is-final [data-cta] { flex: 1; min-height: 44px; }
.demo-tour.is-final .demo-tour__end { order: 2; white-space: nowrap; }
.demo-tour button:focus-visible, .demo-tour a:focus-visible { outline: 2px solid var(--demo-action); outline-offset: 2px; }
@keyframes demo-pop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

/* Telefon: als Blatt am unteren (bzw. oberen) Rand */
.demo-tour.is-sheet {
  top: auto !important; left: 0 !important; right: 0; bottom: 0; width: 100%;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -1px 0 rgb(0 0 0 / .06), 0 -12px 40px rgb(0 0 0 / .22);
  animation-name: demo-sheet;
}
.demo-tour.is-sheet.is-top { bottom: auto; border-radius: 0 0 18px 18px; padding-bottom: 16px; animation-name: demo-sheet-top; }
.demo-tour.is-sheet .demo-tour__title { font-size: 18px; margin-top: 8px; }
.demo-tour.is-sheet .demo-tour__btn { min-height: 44px; }
.demo-tour.is-sheet .demo-tour__end { min-height: 44px; }
@keyframes demo-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes demo-sheet-top { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

.demo-live {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .demo-tour, .demo-tour.is-sheet, .demo-toast.is-in { animation: none; }
  .demo-spot, .demo-tour__track span, .demo-choice__device, .demo-bar__more summary::after { transition: none; }
}
@media (prefers-contrast: more) {
  .demo-tour { outline: 2px solid var(--demo-ink); }
}
@media print {
  .demo-bar, .demo-tour, .demo-spot, .demo-toast, .demo-live, .demo-inline-note { display: none !important; }
}
