/*
 * Zeitfinder 6.9.77 — interactive live demo on the landing page (views/partials/live-demo.ejs,
 * public/zf-live-demo.js). Loaded only on "/". The group heatmap reuses public/zf-group.css,
 * so it looks exactly like a real group page; everything else is scoped to .zf-ld.
 */
.zf-ld { position: relative; }
.zf-ld [hidden] { display: none !important; }
.zf-ld-heading { margin-bottom: 26px; }

/* ---------- choice: Einzeltermine or Gruppentermine ---------- */
.zf-ld-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 860px; margin: 0 0 24px; }
.zf-ld-switch button {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 18px; border: 1.5px solid var(--zf-line); border-radius: 18px; background: var(--zf-surface);
  font: inherit; color: var(--zf-ink); text-align: left; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
.zf-ld-switch button:hover { transform: translateY(-2px); box-shadow: var(--zf-shadow-soft); }
.zf-ld-switch button:focus-visible { outline: none; box-shadow: var(--zf-shadow-focus); }
.zf-ld-switch button.is-active { border-color: var(--zf-palette-olive); background: var(--zf-yellow-soft); box-shadow: 0 0 0 4px rgba(124, 181, 24, .16), var(--zf-shadow-float); transform: none; }
.zf-ld-switch i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--zf-surface-muted); color: var(--zf-green-ink); font-style: normal; font-size: 20px; transition: background-color .2s ease, color .2s ease; }
.zf-ld-switch button.is-active i { background: var(--zf-mark-4); color: var(--zf-palette-lime); }
.zf-ld-switch strong { display: block; font-size: 1.02rem; }
.zf-ld-switch small { display: block; margin-top: 4px; color: var(--zf-muted); font-size: .84rem; line-height: 1.45; }

/* ---------- browser window ---------- */
.zf-ld-stage { position: relative; }
.zf-ld-stage > .zf-mascot-demo { position: absolute; z-index: 3; right: 30px; top: -118px; width: 112px; height: auto; pointer-events: none; animation: zfMascotBob 4.2s ease-in-out infinite; }
.zf-ld-window { position: relative; overflow: hidden; border: 1px solid var(--zf-line-strong); border-radius: 24px; background: var(--zf-canvas); box-shadow: 0 30px 70px rgba(38, 53, 10, .12); scroll-margin-top: 96px; }
.zf-ld-windowbar { display: grid; grid-template-columns: repeat(3, 10px) minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 10px 16px; border-bottom: 1px solid var(--zf-line); background: var(--zf-surface); }
.zf-ld-windowbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--zf-line-strong); }
.zf-ld-windowbar span { justify-self: center; max-width: 100%; padding: 5px 16px; border-radius: 999px; background: var(--zf-surface-muted); color: var(--zf-muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zf-ld-windowbar em { padding: 3px 9px; border-radius: 999px; background: var(--zf-coral-soft); color: var(--zf-coral-ink); font-style: normal; font-size: .7rem; font-weight: 700; }
.zf-ld-panel { display: grid; gap: 16px; min-width: 0; padding: clamp(14px, 2.6vw, 30px); }

/* ---------- shared pieces ---------- */
.zf-ld-intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 20px 24px; border: 1px solid var(--zf-line); border-radius: 20px; background: var(--zf-surface); }
.zf-ld-intro .eyebrow { display: block; color: var(--zf-muted); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.zf-ld-intro h3 { margin: 4px 0 6px; color: var(--zf-ink); font-family: var(--zf-font-ink); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -.01em; line-height: 1.05; }
.zf-ld-intro p { margin: 0; color: var(--zf-muted); font-size: .92rem; line-height: 1.5; }
.zf-ld-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.zf-ld-meta span { padding: 5px 10px; border-radius: 10px; background: var(--zf-surface-muted); color: var(--zf-ink-soft); font-size: .76rem; font-weight: 600; }
.zf-ld-card { display: grid; gap: 16px; min-width: 0; padding: clamp(14px, 2.4vw, 24px); border: 1px solid var(--zf-line); border-radius: 20px; background: var(--zf-surface); scroll-margin-top: 96px; }
.zf-ld-card-head { display: flex; align-items: flex-start; gap: 12px; }
.zf-ld-card-head .step { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: 0; border-radius: 8px; background: var(--zf-ink-900); color: var(--zf-cta-ink); font-size: .78rem; font-weight: 700; }
.zf-ld-card-head h4 { margin: 2px 0; color: var(--zf-ink); font-size: 1.02rem; }
.zf-ld-card-head p { margin: 0; color: var(--zf-muted); font-size: .82rem; line-height: 1.45; }
.zf-ld-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--zf-line-strong); border-radius: 12px; background: var(--zf-success-soft); color: var(--zf-mark-4); font-size: .88rem; line-height: 1.45; scroll-margin-top: 96px; }
.zf-ld-note strong { font-weight: 700; }
.zf-ld-note i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--zf-palette-olive); color: var(--zf-cta-ink); font-style: normal; font-size: .72rem; }
.zf-ld-note.is-info { border-color: var(--zf-amber-soft); background: var(--zf-amber-soft); color: var(--zf-amber-ink); }
.zf-ld-note.is-info i { background: var(--zf-amber-ink); }
.zf-ld-note.is-tip { background: var(--zf-yellow-soft); }
.zf-ld-note.is-tip i { background: var(--zf-palette-orange); }
.zf-ld-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ---------- Einzeltermine: progress ---------- */
.zf-ld-progress { position: relative; display: grid; grid-template-columns: repeat(3, 34px); justify-content: space-between; width: min(380px, 100%); margin: 0 auto; padding: 0; list-style: none; }
.zf-ld-progress::before,
.zf-ld-progress::after { content: ""; position: absolute; left: 17px; right: 17px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--zf-line-strong); }
.zf-ld-progress::after { background: var(--zf-coral-ink); transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.zf-ld-panel[data-step="2"] .zf-ld-progress::after { transform: scaleX(.5); }
.zf-ld-panel[data-step="3"] .zf-ld-progress::after { transform: scaleX(1); }
.zf-ld-progress b { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--zf-line-strong); border-radius: 50%; background: var(--zf-surface-muted); color: var(--zf-muted); font-size: .8rem; transition: background-color .3s ease, color .3s ease, transform .3s ease; }
.zf-ld-progress li.is-active b,
.zf-ld-progress li.is-done b { border-color: var(--zf-palette-olive); background: var(--zf-palette-olive); color: var(--zf-cta-ink); }
.zf-ld-progress li.is-active b { transform: scale(1.08); box-shadow: 0 0 0 5px rgba(124, 181, 24, .18); }

/* ---------- Einzeltermine: calendar and start times ---------- */
.zf-ld-booking { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr); gap: 18px; align-items: start; }
.zf-ld-month { min-width: 0; padding: 16px; border: 1px solid var(--zf-line); border-radius: 16px; background: var(--zf-surface-subtle); }
.zf-ld-month-bar { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 8px; margin-bottom: 12px; }
.zf-ld-month-bar strong { text-align: center; text-transform: capitalize; font-size: 1rem; }
.zf-ld-month-bar button { width: 36px; height: 36px; border: 1px solid var(--zf-line); border-radius: 10px; background: var(--zf-surface); color: var(--zf-ink); font: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.zf-ld-month-bar button:disabled { opacity: .3; cursor: default; }
.zf-ld-weekdays,
.zf-ld-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.zf-ld-weekdays span { padding: 0 0 4px; color: var(--zf-muted); font-size: .68rem; font-weight: 700; text-align: center; text-transform: capitalize; }
.zf-ld-day { position: relative; display: flex; align-items: flex-start; justify-content: flex-end; min-height: 56px; padding: 7px 8px; border: 1px solid transparent; border-radius: 11px; background: var(--zf-surface-muted); color: var(--zf-muted-light); font: inherit; cursor: default; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.zf-ld-day.is-outside { background: transparent; color: var(--zf-line-strong); }
.zf-ld-day.is-available { border-color: var(--zf-line-strong); background: var(--zf-surface); color: var(--zf-ink); cursor: pointer; }
.zf-ld-day.is-available:hover { border-color: var(--zf-palette-leaf); transform: translateY(-1px); }
.zf-ld-day.is-available:focus-visible { outline: none; box-shadow: var(--zf-shadow-focus); }
.zf-ld-day.is-selected { border-color: var(--zf-accent); background: var(--zf-accent); color: var(--zf-cta-ink); }
.zf-ld-day.is-today .zf-ld-day-number { text-decoration: underline; text-underline-offset: 3px; }
.zf-ld-day-number { font-size: .86rem; font-weight: 700; }
.zf-ld-day-dot { position: absolute; left: 7px; bottom: 7px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--zf-blue-soft); color: var(--zf-green-ink); font-size: .7rem; font-weight: 800; }
.zf-ld-day.is-selected .zf-ld-day-dot { background: var(--zf-surface); color: var(--zf-accent); }
.zf-ld-day-full { position: absolute; left: 9px; bottom: 6px; color: var(--zf-coral-ink); font-weight: 700; }
.zf-ld-times { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--zf-line); border-radius: 16px; background: var(--zf-surface); }
.zf-ld-times-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--zf-line); }
.zf-ld-times-head small { display: block; color: var(--zf-muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.zf-ld-times-head strong { font-size: .95rem; }
.zf-ld-times-head span { color: var(--zf-muted); font-size: .74rem; white-space: nowrap; }
.zf-ld-timeline { display: grid; gap: 8px; max-height: 340px; overflow: auto; overscroll-behavior: contain; }
.zf-ld-trow { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; }
.zf-ld-thour { color: var(--zf-muted); font-size: .74rem; font-weight: 700; text-align: right; }
.zf-ld-slot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--zf-line-strong); border-left: 3px solid var(--zf-palette-leaf); border-radius: 10px; background: var(--zf-success-soft); color: var(--zf-ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.zf-ld-slot strong { font-size: .88rem; }
.zf-ld-slot small { color: var(--zf-muted); font-size: .7rem; text-align: right; }
.zf-ld-slot:hover { border-color: var(--zf-palette-leaf); }
.zf-ld-slot:focus-visible { outline: none; box-shadow: var(--zf-shadow-focus); }
.zf-ld-slot.is-selected { border-color: var(--zf-accent); background: var(--zf-accent); color: var(--zf-cta-ink); box-shadow: 0 6px 16px rgba(63, 90, 0, .22); }
.zf-ld-slot.is-selected small { color: var(--zf-cta-ink); opacity: .85; }
.zf-ld-slot.is-yours { border-color: var(--zf-coral-soft); border-left-color: var(--zf-palette-orange); background: var(--zf-coral-soft); cursor: default; }
.zf-ld-slot.is-yours small { color: var(--zf-coral-ink); font-weight: 700; }
.zf-ld-ghost { display: block; height: 40px; border-radius: 10px; background: var(--zf-surface-muted); }
.zf-ld-ghost:nth-child(2) { width: 88%; }
.zf-ld-ghost:nth-child(3) { width: 94%; }
.zf-ld-ghost:nth-child(4) { width: 72%; }
.zf-ld-reserve { width: 100%; justify-content: center; }

/* ---------- Einzeltermine: details ---------- */
.zf-ld-summary { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--zf-line-strong); border-radius: 12px; background: var(--zf-accent-soft); }
.zf-ld-summary small { color: var(--zf-green-ink); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.zf-ld-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.zf-ld-fields label { display: grid; align-content: start; gap: 6px; min-width: 0; color: var(--zf-ink-soft); font-size: .84rem; font-weight: 600; }
.zf-ld-fields label:last-child { grid-column: 1 / -1; }
.zf-ld-fields input,
.zf-ld-fields select { width: 100%; min-width: 0; font-weight: 400; }
.zf-ld-fields .muted,
.zf-ld-fields .hint { color: var(--zf-muted); font-weight: 400; }
.zf-ld-fields .hint { font-size: .74rem; line-height: 1.4; }
.zf-ld-error { color: var(--zf-danger-ui); font-size: .76rem; font-weight: 600; }
.zf-ld-fields input[aria-invalid="true"] { border-color: var(--zf-danger-ui); }

/* ---------- Einzeltermine: confirmation and management ---------- */
.zf-ld-confirm-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--zf-line-strong); border-radius: 12px; background: var(--zf-success-soft); color: var(--zf-green-ink); }
.zf-ld-confirm-banner i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--zf-palette-olive); color: var(--zf-cta-ink); font-style: normal; font-size: .8rem; }
.zf-ld-confirm-banner.is-cancelled { border-color: var(--zf-coral-soft); background: var(--zf-coral-soft); color: var(--zf-coral-ink); }
.zf-ld-confirm-banner.is-cancelled i { background: var(--zf-coral-ink); }
.zf-ld-appointment { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--zf-line); }
.zf-ld-appointment small { display: block; color: var(--zf-muted); font-size: .78rem; font-weight: 600; }
.zf-ld-appointment strong { display: block; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
.zf-ld-appointment.is-cancelled strong { color: var(--zf-muted); text-decoration: line-through; }
.zf-ld-status { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--zf-success-soft); color: var(--zf-green-ink); font-size: .74rem; font-weight: 700; }
.zf-ld-status.is-cancelled { background: var(--zf-coral-soft); color: var(--zf-coral-ink); }
.zf-ld-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.zf-ld-facts div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--zf-surface-muted); }
.zf-ld-facts small { color: var(--zf-muted); font-size: .72rem; }
.zf-ld-facts strong { font-size: .92rem; overflow-wrap: anywhere; }
.zf-ld-facts code { justify-self: start; padding: 4px 8px; border: 1px solid var(--zf-line); border-radius: 8px; background: var(--zf-surface); color: var(--zf-green-ink); font-family: var(--zf-font-mono); font-weight: 700; letter-spacing: .12em; }
.zf-ld-keep { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--zf-line); border-radius: 14px; background: var(--zf-surface-subtle); }
.zf-ld-keep small { color: var(--zf-muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.zf-ld-keep p { margin: 0 0 6px; color: var(--zf-muted); font-size: .8rem; line-height: 1.45; }
.zf-ld-keep code { display: block; padding: 9px 12px; border-radius: 10px; background: var(--zf-success-soft); font-family: var(--zf-font-mono); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zf-ld-mailed,
.zf-ld-freed { margin: 0; color: var(--zf-muted); font-size: .86rem; line-height: 1.5; }
.zf-ld .zf-ld-danger { color: var(--zf-danger-ui) !important; }

/* ---------- Gruppentermine ---------- */
.zf-ld-gsteps { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border: 1px solid var(--zf-line); border-radius: 16px; background: var(--zf-surface); list-style: none; }
.zf-ld-gsteps li { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; color: var(--zf-muted); font-size: .8rem; font-weight: 600; }
.zf-ld-gsteps li:last-child { flex: none; }
.zf-ld-gsteps li:not(:last-child)::after { content: ""; flex: 1; min-width: 12px; height: 1px; margin-left: 4px; background: var(--zf-line-strong); }
.zf-ld-gsteps b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--zf-surface-muted); font-size: .76rem; transition: background-color .25s ease, color .25s ease; }
.zf-ld-gsteps span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zf-ld-gsteps li.is-active { color: var(--zf-ink); }
.zf-ld-gsteps li.is-active b { background: var(--zf-palette-olive); color: var(--zf-cta-ink); box-shadow: 0 0 0 4px rgba(124, 181, 24, .18); }
.zf-ld-gsteps li.is-done b { background: var(--zf-palette-lime); color: var(--zf-mark-4); font-size: 0; }
.zf-ld-gsteps li.is-done b::before { content: "✓"; font-size: .8rem; }

.zf-ld .zf-heat-body { grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); }
.zf-ld .zf-heat-side { position: static; }
.zf-ld .zf-heat-grid[data-mode="edit"] { touch-action: pan-y; }
.zf-ld .zf-heat-grid[data-mode="edit"].is-armed { touch-action: none; }
.zf-ld .zf-heat-grid.is-locked .zf-heat-cell { cursor: default; }
.zf-ld .zf-heat-grid[data-mode="group"] .zf-heat-cell { cursor: pointer; }
.zf-ld .zf-heat-grid.is-locked[data-mode="group"] .zf-heat-cell { cursor: default; }
.zf-ld .zf-heat-mode button:disabled { opacity: .45; cursor: default; }
.zf-ld .zf-heat-cell.is-pop { animation: zfLdPop .6s cubic-bezier(.2, .8, .2, 1); }
.zf-ld .zf-heat-people li.is-new { animation: zfLdArrive .5s cubic-bezier(.2, .8, .2, 1); }
.zf-ld .zf-heat-pending span.is-typing { border-style: solid; border-color: var(--zf-palette-leaf); color: var(--zf-mark-4); }
.zf-ld .zf-heat-pending span.is-typing::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; animation: zfLdPulse 1s ease-in-out infinite; }
.zf-ld .zf-heat-footer-actions { justify-content: flex-end; }
.zf-ld .zf-heat-pick span strong { font-size: .92rem; }

@keyframes zfLdPop {
  0% { transform: scale(.55); filter: brightness(1.35); }
  60% { transform: scale(1.08); }
  100% { transform: none; filter: none; }
}
@keyframes zfLdArrive {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes zfLdPulse {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}

/* ---------- footer line ---------- */
.zf-ld-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; margin-top: 16px; color: var(--zf-muted); font-size: .88rem; }
.zf-ld-foot a { color: var(--zf-accent); font-weight: 700; }
.zf-ld-foot small { font-size: .78rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .zf-ld-stage > .zf-mascot-demo { display: none; }
}
@media (max-width: 900px) {
  .zf-ld-booking,
  .zf-ld .zf-heat-body { grid-template-columns: minmax(0, 1fr); }
  .zf-ld-timeline { max-height: none; }
}
@media (max-width: 640px) {
  .zf-ld-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .zf-ld-switch button { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
  .zf-ld-switch i { width: 34px; height: 34px; font-size: 17px; }
  .zf-ld-switch small { display: none; }
  .zf-ld-window { border-radius: 18px; }
  .zf-ld-windowbar { grid-template-columns: repeat(3, 8px) minmax(0, 1fr); padding: 9px 12px; }
  .zf-ld-windowbar i { width: 8px; height: 8px; }
  .zf-ld-windowbar span { font-size: .7rem; }
  .zf-ld-windowbar em { display: none; }
  .zf-ld-panel { gap: 12px; }
  .zf-ld-intro { padding: 16px; border-radius: 16px; }
  .zf-ld-card { border-radius: 16px; }
  .zf-ld-month { padding: 10px; }
  .zf-ld-weekdays,
  .zf-ld-days { gap: 4px; }
  .zf-ld-day { min-height: 44px; padding: 5px 6px; border-radius: 9px; }
  .zf-ld-day-dot { left: 4px; bottom: 4px; min-width: 18px; height: 18px; padding: 0 4px; font-size: .62rem; }
  .zf-ld-day-full { left: 6px; bottom: 3px; }
  .zf-ld-fields,
  .zf-ld-facts { grid-template-columns: minmax(0, 1fr); }
  .zf-ld-actions .button { flex: 1 1 auto; justify-content: center; }
  .zf-ld-gsteps li:not(.is-active) span { display: none; }
  .zf-ld .zf-heat-footer-actions { width: 100%; }
  .zf-ld .zf-heat-footer-actions .button { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .zf-ld *,
  .zf-ld-stage > .zf-mascot-demo { animation: none !important; transition: none !important; }
}
