/* ==========================================================================
   Hinweis-Laufband  –  kaernten-ferienwohnungen.com
   Passend zum Bootstrap-3-Layout der Seite (Navbar 50px, KLR #ad0404)
   ========================================================================== */

.lb-notice {
  /* --- Farben / Maßstäbe (per JS oder eigenem CSS überschreibbar) --- */
  --lb-bg:            #ad0404;
  --lb-bg-dark:       #791311;
  --lb-fg:            #ffffff;
  --lb-link:          #ffe9b0;
  --lb-border:        #5e0202;
  --lb-height:        46px;
  --lb-font-size:     17px;
  --lb-gap:           30px;          /* Abstand zwischen den Lauftexten   */
  --lb-top:           50px;          /* = Hoehe der fixierten Navbar      */
  --lb-duration:      30s;           /* wird von JS neu berechnet         */

  position: fixed;
  top: var(--lb-top);
  left: 0;
  right: 0;
  z-index: 10000;                    /* ueber Bootstrap-Navigation (1030) */
  min-height: var(--lb-height);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--lb-bg) 0%, var(--lb-bg-dark) 100%);
  color: var(--lb-fg);
  font-family: Arial, Helvetica, sans-serif;   /* wie custom.css */
  font-size: var(--lb-font-size);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
  border-bottom: 2px solid var(--lb-border);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  text-align: center;
}

/* dezent blinkender Akzeptanz-Balken oben (rein dekorativ) */
.lb-notice::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 180% at 50% -60%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 60%);
}

/* -------------------------- Lauftext (Marquee) ------------------------- */

.lb-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  padding: 8px 0;
}

.lb-track {
  display: flex;
  width: max-content;
  animation: lb-scroll var(--lb-duration) linear infinite;
  will-change: transform;
}

/* eine inhaltlich komplette Gruppe (wird von JS 2x angelegt) */
.lb-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-right: 0;                 /* Gruppen enden mit einem Punkt,      */
  white-space: nowrap;              /* damit ist der Abstand überall gleich */
}

.lb-item {
  padding-right: var(--lb-gap);
}

.lb-item--strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lb-label {
  padding-right: 8px;
}

.lb-dot {
  color: var(--lb-link);
  font-size: 1.15em;
  padding-right: var(--lb-gap);
}

.lb-mail {
  color: var(--lb-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .18);
}

.lb-mail:hover,
.lb-mail:focus-visible {
  background: #fff;
  color: var(--lb-bg);
  text-decoration: none;
}

.lb-mail:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@keyframes lb-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* Hover / Touch / Tastatur: Laufband bleibt stehen */
.lb-notice:hover .lb-track,
.lb-notice:focus-within .lb-track,
.lb-notice.lb-paused .lb-track {
  animation-play-state: paused;
}

/* ---------------------- Icon + Schliessen (optional) ------------------- */

.lb-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 46px;
  font-size: 22px;
  line-height: 1;
  background: rgba(0, 0, 0, .22);
  user-select: none;
}

.lb-close {
  flex: 0 0 auto;
  align-self: stretch;
  width: 46px;
  border: 0;
  background: rgba(0, 0, 0, .3);
  color: #fff;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lb-close:hover,
.lb-close:focus-visible {
  background: #000;
}

.lb-close:focus-visible {
  outline: 3px solid var(--lb-link);
  outline-offset: -4px;
}

/* ------------------------------ Static-Modus --------------------------- */
/* Kein JS-Scroll: umbrochener, statischer Hinweistext                    */

.lb-notice.lb--static .lb-viewport { overflow: visible; padding: 10px 14px; }
.lb-notice.lb--static .lb-track    { animation: none; width: auto; flex-wrap: wrap; justify-content: center; white-space: normal; }
.lb-notice.lb--static .lb-group    { flex: 1 1 100%; flex-wrap: wrap; white-space: normal; padding-right: 0; }
.lb-notice.lb--static .lb-group + .lb-group { display: none; }   /* Kopie aus */
.lb-notice.lb--static .lb-item     { flex: 0 1 auto; padding-right: 8px; }
.lb-notice.lb--static .lb-label    { padding-right: 8px; }
.lb-notice.lb--static .lb-mail     { flex: 0 0 auto; }
.lb-notice.lb--static .lb-dot      { display: none; }

/* ------------------------------- Mobil --------------------------------- */

@media (max-width: 767px) {
  .lb-notice { --lb-font-size: 15px; --lb-height: 44px; line-height: 1.3; }
  .lb-badge  { width: 34px; font-size: 18px; }
  .lb-close  { width: 38px; font-size: 20px; }
}

@media (max-width: 480px) {
  .lb-notice            { --lb-font-size: 14px; }
  .lb-badge             { display: none; }
  .lb-notice.lb--static .lb-viewport { padding: 9px 10px; }
}

/* ------------------- Barrierefreiheit / Sonderfaelle ------------------- */

@media (prefers-reduced-motion: reduce) {
  .lb-track { animation: none !important; }
}

@media (forced-colors: active) {
  .lb-notice { background: Canvas; color: CanvasText; border-bottom: 2px solid CanvasText; }
  .lb-mail, .lb-dot { color: LinkText; }
}

/* im Druck: vollstaendig sichtbar, nicht laufend */
@media print {
  .lb-notice { position: static; background: #fff; color: #000; border: 2px solid #000; box-shadow: none; }
  .lb-notice .lb-track { animation: none; }
  .lb-notice .lb-close { display: none; }
}

/* Der vom JS gesetzte "ausgeblendet"-Zustand */
body.lb-hidden .lb-notice { display: none; }

/* Geoeffnetes Mobil-Menue der Seite nicht ueberdecken (Platz bleibt erhalten) */
.lb-notice.lb-menu-open { visibility: hidden; }
