/* ═══════════════════════════════════════════════════════════════
   TEMPORAER: Messe-Hinweis Interforst 2026 (Hero)
   Eigene Datei statt styles.css, damit (a) der Rueckbau nur eine Datei
   loescht und (b) der 24-h-Edge-Cache von styles.css nicht dazu fuehrt,
   dass neues HTML auf altes CSS trifft. Wird nur geladen, solange
   isInterforstActive() in src/interforst.tsx true liefert.

   Layout:
   - >= 1200 px: Ticket unten rechts im Hero, Scroll-Hint bleibt mittig.
   - <  1200 px: Ticket unten mittig, ersetzt den Scroll-Hint.
   - <   640 px: kompaktes Ticket ohne Titelzeile.
   ═══════════════════════════════════════════════════════════════ */

.interforst {
  position: absolute;
  right: clamp(24px, 3vw, 48px);
  bottom: clamp(24px, 4vh, 44px);
  z-index: 4;
  display: flex;
  align-items: stretch;
  gap: 16px;
  max-width: 480px;
  padding: 14px 14px 14px 22px;
  color: #fff;
  text-align: left;
  /* Dunkles Waldgruen als Glas – gleiche Familie wie .btn-ghost-light */
  background: rgba(14, 34, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55);
  animation: interforst-in 0.9s var(--ease-out-expo) 0.9s backwards;
}

.interforst-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.interforst-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7dd98a;
}

/* Pulsierender Live-Punkt */
.interforst-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dd98a;
}
.interforst-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #7dd98a;
  animation: interforst-pulse 2s ease-out infinite;
}

.interforst-title {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.interforst-products {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.interforst-date {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

/* Stand-Abriss: weisse Karte wie der Primaer-Button im Hero */
.interforst-stand {
  flex: none;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 12px 4px;
  background: #fff;
  border-radius: 14px;
}
.interforst-stand > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}
.interforst-stand > div + div {
  border-left: 1px solid rgba(41, 103, 45, 0.18);
}
.interforst-stand dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tf-gray-dk);
}
.interforst-stand dd {
  margin: 6px 0 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--tf-green);
  font-variant-numeric: tabular-nums;
}

/* Niedrige Laptop-Viewports (z. B. 1366x657): Titelzeile weicht, damit
   das Ticket nicht an den CTA-Buttons klebt. */
@media (min-width: 1200px) and (max-height: 720px) {
  .interforst-title {
    display: none;
  }
  .interforst-products {
    margin-top: 6px;
  }
}

/* Tablet + kleine Laptops: Ticket mittig unten, Scroll-Hint weicht,
   sonst kollidiert er mit dem Ticket bzw. (mobil) mit den CTAs. */
@media (max-width: 1199px) {
  .interforst {
    left: 0;
    right: 0;
    width: max-content;
    max-width: calc(100% - 32px);
    margin-inline: auto;
    bottom: clamp(16px, 3vh, 32px);
  }
  #top .scroll-video-hint {
    display: none;
  }
}

/* Smartphone: kompaktes Raster, damit das Ticket unter die gestapelten
   CTAs passt. Eyebrow ueber volle Breite, darunter Produkte + Datum links,
   Stand rechts. Titelzeile entfaellt (Eyebrow + Stand tragen die Einladung).
   .interforst-main wird per display:contents aufgeloest, damit seine
   Kinder direkt im Raster des Tickets landen. */
@media (max-width: 639px) {
  .interforst {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "eyebrow eyebrow"
      "products stand"
      "date stand";
    gap: 0 10px;
    width: auto;
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 12px;
    padding: 10px 10px 10px 14px;
    border-radius: 16px;
  }
  /* CTAs minimal hoeher: ihr Abstand war auf den Scroll-Hint ausgelegt,
     jetzt sitzt dort das (etwas hoehere) Ticket. */
  #top .scroll-video-cta {
    bottom: clamp(112px, 14vh, 140px);
  }
  .interforst-main {
    display: contents;
  }
  .interforst-eyebrow {
    grid-area: eyebrow;
    gap: 7px;
    margin-bottom: 5px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .interforst-title {
    display: none;
  }
  .interforst-products {
    grid-area: products;
    align-self: end;
    margin-top: 0;
    font-size: 12px;
  }
  .interforst-date {
    grid-area: date;
    align-self: start;
    margin-top: 2px;
    font-size: 11.5px;
  }
  .interforst-stand {
    grid-area: stand;
    padding: 6px 2px;
    border-radius: 10px;
  }
  .interforst-stand > div {
    padding: 0 9px;
  }
  .interforst-stand dt {
    font-size: 8.5px;
    line-height: 1;
    letter-spacing: 0.12em;
  }
  .interforst-stand dd {
    margin-top: 5px;
    font-size: 18px;
  }
}

/* Schmale Androids (360 px): Stand-Block enger, damit das Datum einzeilig bleibt. */
@media (max-width: 379px) {
  .interforst-stand > div {
    padding: 0 7px;
  }
  .interforst-products {
    font-size: 11.5px;
  }
  .interforst-date {
    font-size: 11px;
  }
}

/* Sehr schmale Geraete (iPhone SE 1. Gen.): Produktzeile weicht,
   sonst bricht alles zweizeilig um und das Ticket stoesst an die CTAs. */
@media (max-width: 359px) {
  .interforst {
    grid-template-areas:
      "eyebrow eyebrow"
      "date stand";
  }
  .interforst-products {
    display: none;
  }
  .interforst-date {
    align-self: center;
    margin-top: 0;
  }
}

@keyframes interforst-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes interforst-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .interforst,
  .interforst-dot::after {
    animation: none;
  }
}
