/* ==========================================================================
   LEVEL 7 — Buchungs-Fenster (23.09.2026)
   Vorlage: src/_includes/buchen-modal.njk · Verhalten: assets/js/buchen-modal.js
   Nur Tokens aus main.css (Tuerkis, Magenta, Schwarz, Montserrat, scharfe Kanten).
   Ruhig: ein Einblenden, kein Wackeln, keine Effekte ueber Text. Am Handy ein Blatt von unten.
   ========================================================================== */

html.l7-bm-offen, html.l7-bm-offen body { overflow: hidden; }

.l7-bm { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; padding: 24px; }
.l7-bm[hidden] { display: none; }
.l7-bm__hinter { position: absolute; inset: 0; background: rgba(5, 5, 5, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.22s ease-out; }
.l7-bm.is-offen .l7-bm__hinter { opacity: 1; }

.l7-bm__fenster { position: relative; width: 100%; max-width: 880px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: #111; color: var(--l7-white); border: 1px solid #2A2A2A; border-top: 3px solid var(--l7-teal);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(4, 255, 247, 0.06);
  padding: 36px 36px 28px; opacity: 0; transform: translateY(12px); transition: opacity 0.22s ease-out, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.l7-bm.is-offen .l7-bm__fenster { opacity: 1; transform: none; }
.l7-bm__fenster:focus { outline: none; }

.l7-bm__zu { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); color: var(--l7-white); cursor: pointer; padding: 0; transition: border-color 0.15s, color 0.15s; }
.l7-bm__zu svg { width: 16px; height: 16px; }
.l7-bm__zu:hover { border-color: var(--l7-teal); color: var(--l7-teal); }

.l7-bm__kopf { padding-right: 56px; margin-bottom: 24px; }
.l7-bm__kopf .l7-eyebrow { margin-bottom: 8px; }
.l7-bm__titel { font-size: clamp(30px, 4vw, 44px); margin: 0 0 10px; color: var(--l7-white); }
.l7-bm__text { margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.75); max-width: 560px; }
.l7-bm__ruhetag { margin: 14px 0 0; padding-left: 12px; border-left: 3px solid var(--l7-magenta); font-size: 14px; font-weight: 700; color: var(--l7-white); }
.l7-bm__ruhetag[hidden] { display: none; }

.l7-bm__gruppen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.l7-bm__gruppe { min-width: 0; background: #161616; border: 1px solid #2A2A2A; display: flex; flex-direction: column; }
.l7-bm__gruppe--hervor { border: 2px solid var(--l7-teal); box-shadow: 0 0 36px rgba(4, 255, 247, 0.12); }

.l7-bm__gkopf { position: relative; }
.l7-bm__bild { aspect-ratio: 16 / 7; overflow: hidden; background: #141414; position: relative; }
.l7-bm__bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l7-bm__bild::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(22, 22, 22, 0.96) 100%); }
.l7-bm__gtitel { position: absolute; left: 16px; right: 16px; bottom: 10px; margin: 0; font-size: 20px; letter-spacing: -0.01em; color: var(--l7-white); z-index: 1; }
.l7-bm__gkopf:not(:has(.l7-bm__bild)) .l7-bm__gtitel { position: static; padding: 16px 16px 0; }
.l7-bm__flagge { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--l7-teal); color: var(--l7-black); font-size: 10px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; padding: 5px 10px; }

.l7-bm__optionen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.l7-bm__option { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 132px; padding: 14px 14px 12px; text-decoration: none; color: var(--l7-white);
  background: #1D1D1D; border: 1px solid #333; transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.l7-section--dark .l7-bm__option, .l7-bm .l7-bm__option { color: var(--l7-white); }
.l7-bm__option:hover { border-color: var(--l7-teal); background: #202424; box-shadow: 0 0 0 1px var(--l7-teal); color: var(--l7-white); }
.l7-bm__option:focus-visible { outline: 3px solid var(--l7-teal); outline-offset: 2px; }
.l7-bm__dauer { padding-right: 32px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; white-space: nowrap; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.l7-bm__preis { margin-top: 10px; white-space: nowrap; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.7); line-height: 1.1; }
.l7-bm__preis strong { display: inline; margin-left: 2px; font-size: clamp(20px, 2vw, 24px); font-weight: 900; letter-spacing: -0.02em; color: var(--l7-white); white-space: nowrap; font-variant-numeric: tabular-nums; }
.l7-bm__option.is-heute .l7-bm__preis strong { color: var(--l7-teal); }
.l7-bm__stufe { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.6); }
.l7-bm__option.is-heute .l7-bm__stufe { color: var(--l7-teal); }
.l7-bm__andere { margin-top: auto; padding-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.45); font-variant-numeric: tabular-nums; }
.l7-bm__los { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--l7-teal); color: var(--l7-black); }
.l7-bm__los svg { width: 13px; height: 13px; }

.l7-bm__hinweis { margin: 18px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.55); }

.l7-bm__zusatz { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.l7-bm__zlink { font-size: 14px; text-decoration: none; color: rgba(255, 255, 255, 0.7); }
.l7-bm .l7-bm__zlink:hover { color: var(--l7-white); }
.l7-bm__ztext { color: var(--l7-teal); font-weight: 700; }
.l7-bm__zlink:hover .l7-bm__ztext { text-decoration: underline; text-underline-offset: 3px; }

.l7-bm__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Handy: Blatt von unten ---------- */
@media (max-width: 680px) {
  .l7-bm { align-items: flex-end; padding: 0; }
  .l7-bm__fenster { max-height: 92vh; max-height: 92dvh; border: 0; border-top: 3px solid var(--l7-teal); padding: 26px 18px calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateY(40px); }
  .l7-bm__zu { top: 10px; right: 10px; }
  .l7-bm__kopf { margin-bottom: 16px; }
  .l7-bm__titel { font-size: 28px; margin-bottom: 6px; }
  .l7-bm__text { font-size: 14px; }
  .l7-bm__gruppen { grid-template-columns: 1fr; gap: 12px; }
  /* Bild als schmaler Streifen links neben dem Titel — die Optionen bleiben ueber der Falz. */
  .l7-bm__gkopf { display: flex; align-items: center; gap: 12px; padding: 12px 12px 0; }
  .l7-bm__bild { flex: 0 0 64px; height: 44px; aspect-ratio: auto; }
  .l7-bm__bild::after { display: none; }
  .l7-bm__gtitel { position: static; font-size: 18px; }
  .l7-bm__gkopf:not(:has(.l7-bm__bild)) .l7-bm__gtitel { padding: 0; }
  .l7-bm__flagge { position: static; margin-left: auto; font-size: 9px; padding: 4px 7px; letter-spacing: 0.14em; }
  .l7-bm__optionen { padding: 12px; gap: 8px; }
  .l7-bm__option { min-height: 0; padding: 11px 10px 10px; }
  .l7-bm__preis { margin-top: 4px; }
  .l7-bm__andere { padding-top: 4px; }
  .l7-bm__hinweis { margin-top: 14px; font-size: 12px; }
  .l7-bm__zusatz { margin-top: 14px; padding-top: 12px; }
  .l7-bm__zusatz { gap: 8px 22px; }
  .l7-bm__zlink { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .l7-bm__hinter, .l7-bm__fenster { transition: none; }
  .l7-bm__fenster { transform: none; }
}
