/* Aktions-Popup Black Week / Cyber Week 2026 (Robin 29.10.2026, views/promo.mjs, js/promo.js). Immer dunkel wie Cookie-Banner und Preis-Kasten:
   Anthrazit mit Goldverlauf, großer Rabatt, Countdown in Kästchen, Code zum Kopieren, ein goldener Knopf. Am Handy als Blatt von
   unten. Dazu der Hinweis am Gutscheinfeld der Bestellseite (.promo-note) und das Abzeichen auf der Showcase-Karte. */

.promo {
  --focus: #f5d27a;
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radius);
  background: var(--dark); color: var(--on-dark); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(242, 193, 64, .28);
}
.promo:focus { outline: none; }
.promo::backdrop { background: rgba(10, 11, 12, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html:has(.promo:modal) { overflow: hidden; }
.promo[open]:modal { animation: promo-in .45s var(--ease) both; }
.promo[open]:modal::backdrop { animation: promo-fade .35s ease both; }
@keyframes promo-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes promo-fade { from { opacity: 0; } }

.promo-media { position: relative; aspect-ratio: 16 / 7; background: var(--dark-2); overflow: hidden; }
.promo-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.promo-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 24, 27, 0) 35%, rgba(22, 24, 27, .75) 78%, var(--dark) 100%); }
.promo-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(243, 239, 231, .28); border-radius: 50%; background: rgba(16, 17, 19, .62); color: var(--on-dark); cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.promo-close:hover { background: rgba(16, 17, 19, .85); border-color: rgba(243, 239, 231, .6); }
.promo-close .icon { width: 20px; height: 20px; }

.promo-inner { position: relative; margin-top: -42px; padding: 0 clamp(18px, 5vw, 32px) clamp(14px, 3vw, 20px); }
.promo-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px;
  background: #050506; border: 1px solid rgba(242, 193, 64, .55); color: var(--brass-on-dark);
  font-family: var(--font-display); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.promo-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brass-on-dark); box-shadow: 0 0 0 3px rgba(242, 193, 64, .2); }
.promo-title { margin: 0 0 .35em; font-family: var(--font-display); color: var(--on-dark); line-height: 1.05; }
.promo-big {
  display: block; font-size: clamp(3.4rem, 15vw, 4.8rem); font-weight: 600; letter-spacing: -.02em; line-height: .95;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.promo-title-text { display: block; font-size: clamp(1.3rem, 4.6vw, 1.6rem); font-weight: 500; }
.promo-lead { margin: 0 0 12px; color: var(--on-dark-2); font-size: .98rem; line-height: 1.55; }
.promo-points { display: grid; gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .92rem; color: var(--on-dark); }
.promo-points li { display: flex; align-items: flex-start; gap: 8px; }
.promo-points .icon { margin-top: 3px; color: var(--brass-on-dark); }

/* Countdown: vier Kästchen, Ziffern gleich breit */
.promo-countdown { margin: 0 0 16px; }
.promo-extended { padding: 2px 10px; border-radius: 999px; background: var(--brass) var(--gold-grad); color: var(--on-brass); letter-spacing: .04em; }
.promo-extended[hidden] { display: none; }
.promo-countdown-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; color: var(--on-dark-2); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.promo-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.promo-unit { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: var(--radius-sm); background: var(--dark-2); border: 1px solid rgba(243, 239, 231, .1); }
.promo-num { font-family: var(--font-display); font-size: clamp(1.5rem, 6vw, 1.9rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.promo-unit-label { font-size: .74rem; color: var(--on-dark-2); }

/* Gutscheincode mit Kopierknopf */
.promo-code { margin: 0 0 14px; }
.promo-code-label { margin: 0 0 6px; color: var(--on-dark-2); font-size: .85rem; }
.promo-code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 8px 8px 8px 14px;
  border: 1.5px dashed rgba(242, 193, 64, .75); border-radius: var(--radius-sm); background: rgba(242, 193, 64, .06);
}
.promo-code-value { min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: clamp(.92rem, 3.6vw, 1.08rem); font-weight: 700; letter-spacing: .05em; color: var(--brass-on-dark); user-select: all; }
.promo-copy {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(243, 239, 231, .35); background: transparent; color: var(--on-dark); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.promo-copy:hover { background: rgba(255, 255, 255, .08); border-color: rgba(243, 239, 231, .7); }
.promo-copy.is-copied { border-color: #6fcf9b; color: #6fcf9b; }

/* Knopf bleibt beim Scrollen im Dialog unten sichtbar (Handy: Blatt höher als der Bildschirm) */
.promo-actions { position: sticky; bottom: 0; z-index: 1; margin-inline: -4px; padding: 10px 4px 2px; background: var(--dark); box-shadow: 0 -14px 18px -12px var(--dark); }
.promo-cta { width: 100%; }
.promo-cta .icon { transition: transform .2s var(--ease); }
.promo-cta:hover .icon { transform: translateX(3px); }
.promo-later {
  display: block; min-height: 44px; margin: 4px auto 0; padding: 0 8px; border: 0; background: none; color: var(--on-dark-2);
  font: inherit; font-size: .92rem; text-decoration: underline; text-underline-offset: .22em; cursor: pointer;
}
.promo-later:hover { color: var(--on-dark); }

/* Bedingungen (Popup und Bestellseite) */
.promo-terms { margin: 6px 0 0; font-size: .82rem; line-height: 1.5; color: var(--on-dark-2); }
.promo-terms summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: .22em; }
.promo-terms ul { margin: 0 0 8px; padding-left: 1.2em; }
.promo-terms li + li { margin-top: 4px; }
.promo-terms p { margin: 0 0 4px; }
.promo-terms a { color: inherit; }

@media (max-width: 540px) {
  .promo[open]:modal { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0; }
  @keyframes promo-in { from { opacity: .4; transform: translateY(40px); } }
  .promo-media { aspect-ratio: 16 / 5; }
  .promo-inner { margin-top: -34px; }
  .promo-kicker { margin-bottom: 6px; }
  .promo-big { font-size: clamp(2.8rem, 13vw, 3.4rem); }
  .promo-title-text { font-size: 1.25rem; }
  .promo-lead { font-size: .93rem; line-height: 1.5; margin-bottom: 12px; }
  .promo-points { display: none; }
  .promo-countdown { margin-bottom: 12px; }
  .promo-unit { padding: 8px 2px 6px; }
  .promo-num { font-size: 1.45rem; }
  .promo-code { margin-bottom: 6px; }
  .promo-code-label { display: none; }
  .promo-code-row { padding: 6px 6px 6px 12px; }
  .promo-code-value { font-size: .86rem; letter-spacing: .03em; white-space: nowrap; overflow-wrap: normal; }
  .promo-copy { padding: 0 12px; }
  .promo-cta { min-height: 52px; padding-inline: 16px; font-size: 1rem; }
  .promo-actions { padding-bottom: env(safe-area-inset-bottom); }
}
/* Schmale Handys: Kopierknopf nur als Symbol (Name bleibt über aria-label), damit der Code nicht anstößt */
@media (max-width: 400px) {
  .promo-copy { width: 44px; padding: 0; justify-content: center; }
  .promo-copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Niedrige Bildschirme (Laptops): alles ohne Scrollen im Dialog, der feste Knopf verdeckt nie den Code */
@media (max-height: 940px) {
  .promo-points { display: none; }
  .promo-media { aspect-ratio: 16 / 5; }
}
@media (max-height: 720px) {
  .promo-media { display: none; }
  .promo-inner { margin-top: 0; padding-top: 18px; }
  .promo-big { font-size: clamp(2.6rem, 11vw, 3.2rem); }
  .promo-code-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .promo[open]:modal, .promo[open]:modal::backdrop { animation: none; }
  .promo-cta .icon { transition: none; }
}
@media print { .promo, .promo-dock { display: none !important; } }

/* ---------------------------------------------------------------- Minimiert: Angebot in der unteren Leiste (Robin 29.10.2026)
   Geschlossen schrumpft das Popup in die Bestell-Leiste (data-sticky-cta) und nimmt dort den Platz von „In der Regel nach
   1 Werktag fertig“ ein: Name der Aktion, Rabatt, Text, Countdown; rechts bleibt „Rundgang bestellen“. Am Handy zweizeilig und
   ohne „Live erleben“. Seiten ohne Leiste bekommen unten links eine kleine eigene (.promo-dock). */
.promo-chip {
  --focus: #f5d27a;
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 4px 16px 4px 5px; border-radius: 999px;
  background: #0c0d0f; color: var(--on-dark); border: 1.5px solid rgba(242, 193, 64, .85); font: inherit; line-height: 1.1;
  text-align: left; cursor: pointer;
}
.promo-chip[hidden] { display: none; }
.promo-chip:hover { background: #1b1c20; border-color: #f2c140; }
.promo-chip-name {
  flex: none; padding: 4px 10px; border-radius: 999px; background: var(--brass) var(--gold-grad); color: var(--on-brass);
  font-family: var(--font-display); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.promo-chip-off { flex: none; font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; color: #f2c140; white-space: nowrap; }
.promo-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.promo-chip-time { flex: none; margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--on-dark-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.promo-chip.is-arrived { animation: promo-chip-pop .65s var(--ease) both; }
@keyframes promo-chip-pop {
  0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(242, 193, 64, .55); }
  60% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(242, 193, 64, .16); }
  100% { transform: none; box-shadow: 0 0 0 0 rgba(242, 193, 64, 0); }
}
/* In der Leiste: Angebot statt Hinweistext, über die ganze freie Breite */
.sticky-cta > .promo-chip { flex: 1 1 auto; }
.sticky-cta.has-promo:has(> .promo-chip:not([hidden])) .sticky-cta-text { display: none; }
@media (max-width: 759px) {
  .sticky-cta.has-promo:has(> .promo-chip:not([hidden])) .sticky-cta-actions { flex: none; }
  .sticky-cta.has-promo:has(> .promo-chip:not([hidden])) .btn-demo { display: none; }
  .sticky-cta.has-promo:has(> .promo-chip:not([hidden])) .sticky-cta-actions .btn { padding-inline: 16px; }
  .promo-chip { display: inline-grid; grid-template-columns: auto auto; justify-content: start; align-content: center; column-gap: 7px; row-gap: 1px; padding: 3px 12px 3px 5px; border-radius: 22px; }
  .promo-chip-name { padding: 2px 8px; font-size: .64rem; letter-spacing: .08em; }
  .promo-chip-off { font-size: 1rem; }
  .promo-chip-text, .promo-chip-ends { display: none; }
  .promo-chip-time { grid-column: 1 / -1; margin: 0 0 0 4px; font-size: .72rem; }
}
@media (min-width: 760px) {
  .sticky-cta.has-promo:has(> .promo-chip:not([hidden])) { width: min(980px, calc(100vw - 48px)); padding-left: 7px; gap: 10px; }
}
@media (min-width: 760px) and (max-width: 999px) { .promo-chip-ends { display: none; } }
.promo-dock {
  position: fixed; z-index: 40; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 999px;
  background: rgba(22, 24, 27, .95); border: 1px solid rgba(242, 193, 64, .35); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .65);
  transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform .3s var(--ease), visibility 0s linear .3s;
}
.promo-dock.is-visible { transform: none; visibility: visible; transition: transform .3s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .promo-chip.is-arrived { animation: none; }
  .promo-dock, .promo-dock.is-visible { transition: none; }
}

/* ---------------------------------------------------------------- Bestellseite: Hinweis am Gutscheinfeld */
.promo-note { margin: -8px 0 20px; padding: 14px 16px 6px; border-radius: var(--radius-sm); background: var(--brass-tint); border: 1px solid rgba(232, 179, 38, .55); }
.promo-note[hidden] { display: none; }
.promo-note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 6px; font-weight: 600; }
.promo-note-badge { padding: 2px 10px; border-radius: 999px; background: #0c0d0f; color: #f2c140; font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.promo-note-text[hidden], .promo-note-ends[hidden], .promo-note [data-promo-switch][hidden] { display: none; }
.promo-note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.promo-note-ends { font-variant-numeric: tabular-nums; color: var(--brass-text); font-weight: 600; }
.promo-terms-light { color: var(--text-2); }
.choice-promo.choice-promo-bw { background: #0c0d0f; color: #f2c140; }
.choice-promo[hidden] { display: none; }
