/*!
 * LANGA Tools — Seasonal top bar.
 *
 * Colours arrive as inline custom properties set by the loader, taken from
 * the effect itself, so the same season looks the same on every site.
 *
 * @since 2.7.7
 */

.langa-fx-bar {
  --langa-fx-bg: #222;
  --langa-fx-fg: #fff;
  --langa-fx-accent: #fff;

  position: relative;
  z-index: 99998; /* under #wpadminbar (99999), over site headers */
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 44px 9px 16px;
  background: var(--langa-fx-bg);
  color: var(--langa-fx-fg);
  font-size: 15px;
  line-height: 1.35;
  font-family: inherit;
  letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}

.langa-fx-bar.langa-fx-sticky {
  position: sticky;
  top: 0;
}

/* The track is the visible window. Overflow is hidden here so the text can
   travel inside it when, and only when, it does not fit. */
.langa-fx-track {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: center;
}

.langa-fx-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  max-width: 100%;
}

.langa-fx-icon {
  font-size: 1.15em;
  line-height: 1;
  color: var(--langa-fx-accent);
}

/* Marquee: added by the loader only on real overflow, and never when the
   visitor asked for reduced motion. Duration is set inline so speed stays
   constant and long phrases simply take longer. */
.langa-fx-bar.langa-fx-scroll .langa-fx-track {
  text-align: left;
}

.langa-fx-bar.langa-fx-scroll .langa-fx-text {
  will-change: transform;
  animation-name: langa-fx-marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  padding-left: 100%;
}

.langa-fx-bar.langa-fx-scroll:hover .langa-fx-text,
.langa-fx-bar.langa-fx-scroll:focus-within .langa-fx-text {
  animation-play-state: paused;
}

@keyframes langa-fx-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.langa-fx-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: .7;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.langa-fx-bar[dir="rtl"] { padding: 9px 16px 9px 44px; }
.langa-fx-bar[dir="rtl"] .langa-fx-close { right: auto; left: 10px; }
.langa-fx-bar[dir="rtl"].langa-fx-scroll .langa-fx-track { text-align: right; }

.langa-fx-close:hover,
.langa-fx-close:focus-visible { opacity: 1; background: rgba(255, 255, 255, .15); }

@media (max-width: 600px) {
  .langa-fx-bar { font-size: 13.5px; padding: 8px 38px 8px 12px; }
  .langa-fx-bar[dir="rtl"] { padding: 8px 12px 8px 38px; }
  .langa-fx-close { width: 24px; height: 24px; font-size: 17px; right: 7px; }
  .langa-fx-bar[dir="rtl"] .langa-fx-close { right: auto; left: 7px; }
}

@media print { .langa-fx-bar { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .langa-fx-bar.langa-fx-scroll .langa-fx-text { animation: none; padding-left: 0; }
  .langa-fx-bar.langa-fx-scroll .langa-fx-track { text-align: center; }
}

/* 2.7.7.1 — due correzioni dal collaudo sui siti vivi, 14/08/2026.
   1) Gli effetti (.ltc-*-wrap) sono fixed a z-index 999999 e cadevano SOPRA
      la fascia invece che dietro. La fascia sale sopra il livello
      decorativo: vale per tutti gli effetti senza toccarne il CSS.
   2) Dopo un click la X restava con l'anello di focus. Resta per chi
      naviga da tastiera, sparisce per chi usa il mouse. */
.langa-fx-bar { z-index: 1000001; }
.langa-fx-close:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.langa-fx-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* 2.7.7.2 — BLINDATURA, 14/08/2026, da italycafe.com.
   La X ereditava lo stile dei bottoni del tema: fondo nero, bordo e un
   pezzo bianco sotto che era uno pseudo-elemento del tema. Su 43 siti con
   43 fogli di stile non si puo' sperare che nessuno tocchi un <button>:
   si azzera e si riscrive con !important. Selettore per ID perche' la
   fascia e' unica in pagina, quindi l'alta specificita' non tocca altro. */
#langa-fx-topbar {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 9px 44px 9px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--langa-fx-bg) !important;
  color: var(--langa-fx-fg) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  float: none !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1000001 !important;
}

#langa-fx-topbar .langa-fx-track { flex: 1 1 auto !important; min-width: 0 !important; overflow: hidden !important; }
#langa-fx-topbar .langa-fx-text { display: inline-flex !important; align-items: center !important; gap: 8px !important; white-space: nowrap !important; color: inherit !important; }
#langa-fx-topbar .langa-fx-icon { color: var(--langa-fx-accent) !important; font-size: 1.15em !important; line-height: 1 !important; }

/* La X: nient'altro che una X. Niente fondo, niente bordo, niente ombra,
   niente pseudo-elementi del tema, nessun font del tema che la deformi. */
#langa-fx-topbar .langa-fx-close {
  -webkit-appearance: none !important;
  appearance: none !important;
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--langa-fx-fg) !important;
  opacity: .75 !important;
  font: 400 22px/1 system-ui, -apple-system, Arial, sans-serif !important;
  cursor: pointer !important;
  outline: none !important;
  overflow: visible !important;
  float: none !important;
}
#langa-fx-topbar .langa-fx-close::before,
#langa-fx-topbar .langa-fx-close::after { content: none !important; display: none !important; }
#langa-fx-topbar .langa-fx-close:hover { opacity: 1 !important; background: none !important; }
#langa-fx-topbar .langa-fx-close:focus-visible { outline: 2px solid currentColor !important; outline-offset: 2px !important; }
#langa-fx-topbar[dir="rtl"] { padding: 9px 16px 9px 44px !important; }
#langa-fx-topbar[dir="rtl"] .langa-fx-close { right: auto !important; left: 12px !important; }

/* 2.7.7.3 — DENTRO LA FASCIA NON ENTRA NIENTE DEL SITO, 14/08/2026.
   Su farmaciabainotti.it scritta e X uscivano verdi: il verde del tema.
   Le regole per classe non bastavano perche' il tema colorava i figli.
   Qui il colore e' imposto a OGNI discendente: la fascia contiene solo
   elementi nostri, quindi il selettore universale e' confinato e sicuro.
   Il valore arriva dal loader, che lo calcola dalla luminanza dello
   sfondo dell'evento: bianco o nero, mai un colore del sito. */
#langa-fx-topbar,
#langa-fx-topbar * {
  color: var(--langa-fx-fg) !important;
  text-shadow: none !important;
  font-family: inherit !important;
}
#langa-fx-topbar .langa-fx-track { display: flex !important; align-items: center !important; justify-content: center !important; }

/* 2.7.7.5 — su farmaciabainotti.it il testo usciva VERDE su fondo blu.
   Il testo sta in uno <span> senza classe: ereditava il bianco dalla
   fascia, ma l'ereditarieta' perde contro QUALSIASI regola diretta del
   tema su span. Non basta blindare la fascia: vanno blindati anche i
   suoi discendenti, che sono pochi e tutti nostri. */
#langa-fx-topbar, #langa-fx-topbar * {
  color: var(--langa-fx-fg) !important;
  font-family: inherit !important;
  background-color: transparent !important;
  background-image: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
}
#langa-fx-topbar { background-color: var(--langa-fx-bg) !important; }
#langa-fx-topbar .langa-fx-icon { color: var(--langa-fx-accent) !important; }
