/* ============================================================
   Elbe-Saison — button + garland + confetti
   The button hangs a decorative flag garland from the header-rule and
   fires a short confetti shower. Pattern encodes a hidden word via
   the ICS maritime flag alphabet.
   ============================================================ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.elbe-saison-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;                                      /* match .live-badge */
  background: transparent;
  border: 1px solid var(--ink-faint, #6f5f47);
  color: var(--ink-faint, #6f5f47);
  padding: 0.4rem 0.75rem;                          /* match .live-badge */
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.7rem;                                /* match .live-badge */
  letter-spacing: 0.18em;                           /* match .live-badge */
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
  white-space: nowrap;
}
.elbe-saison-btn svg { flex-shrink: 0; }
.elbe-saison-btn:hover,
.elbe-saison-btn:focus-visible {
  background: var(--manila, #e8d9a9);
  color: var(--ink, #2a1f15);
  border-color: var(--ink, #2a1f15);
  outline: none;
}
.elbe-saison-btn[aria-pressed="true"] {
  background: var(--ink, #2a1f15);
  color: var(--paper, #f2e9d0);
  border-color: var(--ink, #2a1f15);
}

/* ---- Garland ---- */
/* The garland container is positioned absolutely within the sticky header.
   JS measures where the logo ends and where the Elbe-Saison button starts
   each time the button is toggled (and on resize), then sets `left` and
   `width` inline. The rope and flag positions inside are also JS-driven. */
.elbe-garland {
  position: absolute;
  top: 100%;              /* Hang from the bottom of header-rule */
  height: 230px;          /* Enough room for deep sag + large flags */
  pointer-events: none;
  z-index: 49;
  transform-origin: top center;
  animation: elbeGarlandDrop 0.7s cubic-bezier(0.25, 1.25, 0.4, 1) both;
}
.elbe-garland[hidden] { display: none; }
@keyframes elbeGarlandDrop {
  0%   { opacity: 0; transform: translateY(-8px) scaleY(0.5); }
  60%  { opacity: 1; transform: translateY(0) scaleY(1.06); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}
.elbe-rope {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* Individual flags — square format (ICS-standard). Size, position and
   rotation are set per-flag by JS so each flag hangs exactly where the
   rope is and tilts to follow the rope's local tangent. */
.elbe-flag {
  position: absolute;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
  transform-origin: top center;
}

/* The five ICS flag patterns encoding P · F · E · R · D — rendered from
   SVG files in /assets/flags/. Using background-image on the existing
   flag divs keeps the sway-animation & positioning logic intact. */
.elbe-flag-p { background-image: url('/assets/flags/p.svg'); }
.elbe-flag-f { background-image: url('/assets/flags/f.svg'); }
.elbe-flag-e { background-image: url('/assets/flags/e.svg'); }
.elbe-flag-r { background-image: url('/assets/flags/r.svg'); }
.elbe-flag-d { background-image: url('/assets/flags/d.svg'); }
.elbe-flag-p, .elbe-flag-f, .elbe-flag-e, .elbe-flag-r, .elbe-flag-d {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- Confetti ---- */
.elbe-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}
.elbe-confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  opacity: 0;
  animation: elbeConfettiFall linear forwards;
}
@keyframes elbeConfettiFall {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 40px), 100vh, 0) rotate(var(--spin, 540deg));
  }
}

@media (max-width: 800px) {
  .elbe-saison-btn span { display: none; }   /* Icon-only on mobile */
  .elbe-saison-btn { padding: 0.45rem 0.55rem; }
  .elbe-garland { height: 160px; }
}

/* Auf dem Handy exakt die Maße des Burger-Buttons (38x38px,
   siehe css/12-postits.css), Icon mittig — beide Buttons wirken
   so als gleich großes Paar rechts im Header. */
@media (max-width: 720px) {
  .elbe-saison-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
  }
  .elbe-saison-btn svg { width: 16px; height: 16px; }
}

/* HINWEIS: Der Feier-Button bleibt auf Mobile bewusst sichtbar
   (icon-only, siehe oben) — Girlande samt PFERD-Hinweis sollen auch
   auf dem Handy per Klick erreichbar sein. Eine frühere display:none-
   Regel in css/12-postits.css war ohnehin wirkungslos (Kaskade: die
   Basis-Regel `display: flex` dieser Datei lädt später und gewinnt
   bei gleicher Spezifität) und wurde dort durch einen Verweis ersetzt. */

