/* ==========================================================================
   Hinweisleiste oben (Topbar). Der Worker setzt Leiste und diese Datei nur ein, wenn eine Leiste aktiv ist.
   Gleiche Gestaltungen wie die Popups; Bewegung nur leise im Hintergrund (Schnee, Lichtpunkte, Glanz).
   ========================================================================== */
.tb {
  --tb-a: #0b1630;
  --tb-b: #142454;
  --tb-mark: #93c5fd;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: linear-gradient(90deg, var(--tb-a), var(--tb-b) 50%, var(--tb-a));
  color: #f1f5f9;
  font-size: 0.9375rem;
}

.tb-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.tb-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding-block: 0.5rem;
}

.tb-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.6rem;
  margin: 0;
  padding-inline: 2.25rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.tb-mark {
  flex: none;
  color: var(--tb-mark);
}

.tb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.4);
  text-underline-offset: 3px;
  white-space: nowrap;
}

.tb-link:hover {
  text-decoration-color: currentColor;
}

.tb-link .icon {
  transition: transform 0.2s ease;
}

.tb-link:hover .icon {
  transform: translateX(2px);
}

.tb-link:focus-visible,
.tb-x:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 4px;
}

.tb-x {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transform: translateY(-50%);
}

.tb-x:hover {
  background: rgb(255 255 255 / 0.1);
  color: #ffffff;
}

@media (max-width: 600px) {
  .tb {
    font-size: 0.875rem;
  }

  .tb-text {
    padding-inline: 0 2rem;
    text-align: left;
    justify-content: flex-start;
  }
}

/* ---------- Gestaltungen ---------- */
.tb-christmas {
  --tb-a: #0a1430;
  --tb-b: #1a1f45;
  --tb-mark: #facc15;
}

.tb-christmas .tb-fx {
  background-image:
    radial-gradient(circle at 20px 8px, rgb(255 255 255 / 0.8) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 90px 26px, rgb(255 255 255 / 0.6) 0 1px, transparent 1.9px),
    radial-gradient(circle at 150px 14px, rgb(255 255 255 / 0.7) 0 1.3px, transparent 2.3px),
    radial-gradient(circle at 220px 34px, rgb(255 255 255 / 0.55) 0 1px, transparent 1.9px),
    radial-gradient(circle at 55px 40px, rgb(253 230 138 / 0.6) 0 0.9px, transparent 1.7px),
    radial-gradient(circle at 40px 20px, rgb(255 255 255 / 0.4) 0 0.7px, transparent 1.3px),
    radial-gradient(circle at 120px 6px, rgb(255 255 255 / 0.35) 0 0.6px, transparent 1.2px);
  background-size: 260px 48px, 260px 48px, 260px 48px, 260px 48px, 260px 48px, 170px 40px, 170px 40px;
}

.tb-promo {
  --tb-a: #1b1240;
  --tb-b: #2f1d68;
  --tb-mark: #f0abfc;
}

.tb-promo .tb-fx {
  background-image:
    radial-gradient(circle at 30px 30px, rgb(240 171 252 / 0.55) 0 1.1px, transparent 2px),
    radial-gradient(circle at 140px 12px, rgb(250 204 21 / 0.45) 0 1px, transparent 1.9px),
    radial-gradient(circle at 230px 36px, rgb(255 255 255 / 0.4) 0 0.9px, transparent 1.7px);
  background-size: 300px 48px;
}

.tb-holiday {
  --tb-a: #0b2533;
  --tb-b: #11384f;
  --tb-mark: #fde68a;
}

.tb-holiday .tb-fx,
.tb-info .tb-fx {
  background: linear-gradient(100deg, transparent 40%, rgb(255 255 255 / 0.07) 50%, transparent 60%);
  background-size: 300% 100%;
  background-position: 120% 0;
}

.tb-info {
  --tb-a: #0b1630;
  --tb-b: #17306a;
  --tb-mark: #93c5fd;
}

.tb-alert {
  --tb-a: #2a1d0c;
  --tb-b: #3d2a10;
  --tb-mark: #fbbf24;
  border-bottom-color: rgb(251 191 36 / 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .tb-christmas .tb-fx {
    animation: tb-snow 14s linear infinite;
  }

  .tb-promo .tb-fx {
    animation: tb-drift 30s linear infinite;
  }

  .tb-holiday .tb-fx,
  .tb-info .tb-fx {
    animation: tb-sheen 9s ease-in-out 1s infinite;
  }
}

@keyframes tb-snow {
  to {
    background-position: 26px 48px, 26px 48px, 26px 48px, 26px 48px, 26px 48px, -12px 40px, -12px 40px;
  }
}

@keyframes tb-drift {
  to {
    background-position: 300px -48px;
  }
}

@keyframes tb-sheen {
  0% {
    background-position: 120% 0;
  }

  30%,
  100% {
    background-position: -20% 0;
  }
}
