/* ============================================================================
 * Soul Contact — Barra annunci (strip sopra l'header).
 *
 * Foglio AUTONOMO: la barra vive fuori da `.sc-landing`, quindi non eredita né
 * le variabili né i reset di promo.css. Tutto è prefissato `.sc-topbar__*`
 * perché qui intorno c'è Enfold, che usa `.container`, `.btn`, `.section`.
 *
 * `!important` sui colori dei link e sul reset dei bottoni: Enfold li colora
 * con selettori ad alta specificità (`#top a`, `.container_wrap button`).
 * ========================================================================== */

.sc-topbar {
  /* Tema chiaro (default): banda salvia del design system.
     Accento sul terracotta scuro: #bb5a37 su salvia dà 3.8:1, sotto la soglia
     AA per testo normale; #9c4527 arriva a 5.4:1. */
  --sct-bg: #e9ede6;
  --sct-text: #333333;
  --sct-cta: #9c4527;
  --sct-cta-hover: #7d3419;
  --sct-tag-bg: #4e5b43;
  --sct-tag-text: #ffffff;
  --sct-arrow: #574e42;
  --sct-arrow-hover: #9c4527;
  --sct-hairline: rgba(38, 31, 23, 0.10);

  position: relative;
  z-index: 1;                       /* sotto l'header sticky di Enfold (z-index 501) */
  background: var(--sct-bg);
  color: var(--sct-text);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid var(--sct-hairline);
  -webkit-font-smoothing: antialiased;
}

/* Tema pieno: terracotta di brand, testo bianco (4.5:1, AA). */
.sc-topbar--terracotta {
  --sct-bg: #bb5a37;
  --sct-text: #ffffff;
  --sct-cta: #ffffff;
  --sct-cta-hover: #ffe4d6;
  --sct-tag-bg: #8a3d22;            /* terracotta profondo: 7.6:1 col bianco */
  --sct-tag-text: #ffffff;
  --sct-arrow: rgba(255, 255, 255, 0.85);
  --sct-arrow-hover: #ffffff;
  --sct-hairline: rgba(0, 0, 0, 0.12);
}

.sc-topbar *,
.sc-topbar *::before,
.sc-topbar *::after { box-sizing: border-box; }

.sc-topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

/* La finestra: taglia le slide fuori campo. `min-width:0` o il flex item
   non si stringe e il testo lungo sfonda la riga. */
.sc-topbar__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.sc-topbar__track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sc-topbar__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-topbar__msg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  width: 100%;
  padding: 11px 0;
  text-align: center;
  color: var(--sct-text) !important;
  text-decoration: none !important;
}

a.sc-topbar__msg:hover .sc-topbar__cta { color: var(--sct-cta-hover) !important; }
a.sc-topbar__msg:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }

/* Pill dell'etichetta ("NOVITÀ"). Capsula e non rettangolo squadrato come i
   bottoni: qui è un badge, non un'azione. */
.sc-topbar__tag {
  flex: 0 0 auto;
  background: var(--sct-tag-bg);
  color: var(--sct-tag-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sc-topbar__text { font-weight: 500; }
.sc-topbar__text--short { display: none; }

.sc-topbar__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sct-cta) !important;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.sc-topbar__cta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

a.sc-topbar__msg:hover .sc-topbar__cta svg { transform: translateX(3px); }

/* Frecce agli estremi del contenitore, una per lato: essendo larghe uguale, il
   messaggio resta centrato sulla pagina (e lo resta anche quando non ci sono,
   con un solo messaggio attivo). Reset completo perché Enfold veste i <button>. */
.sc-topbar__arrow {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  background: none !important;
  border: 0 !important;
  border-radius: 2px;
  box-shadow: none !important;
  color: var(--sct-arrow) !important;
  cursor: pointer;
  line-height: 0;
  transition: color 0.2s ease;
}

.sc-topbar__arrow:hover { color: var(--sct-arrow-hover) !important; }
.sc-topbar__arrow:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

.sc-topbar__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;             /* i click arrivano sempre al <button> */
}

@media (max-width: 767px) {
  .sc-topbar { font-size: 13px; }

  /* Con le frecce ai lati ogni pixel di contorno è larghezza tolta al testo,
     che qui si paga in righe in più: padding, gap e frecce al minimo. */
  .sc-topbar__inner { min-height: 40px; padding: 0 4px; gap: 2px; }

  /* Sotto i 768px il messaggio smette di essere una riga flex e torna un
     flusso di testo: pill, testo e CTA riempiono le righe invece di
     prendersene una a testa. Su iPhone la barra passa da 97px a ~55px.
     NB: nessuna regola `display` su `.sc-topbar__text`, o vincerebbe per
     ordine su `--full { display: none }` e stamperebbe entrambe le versioni. */
  .sc-topbar__msg { display: block; padding: 8px 0; }
  .sc-topbar__tag { display: inline-block; vertical-align: 1px; margin-right: 6px; font-size: 10px; padding: 2px 8px; }

  /* Il link va sempre a capo, su una riga sua: `flex` invece di `inline-flex`
     lo rende un blocco, quindi interrompe il flusso di testo da solo. */
  .sc-topbar__cta { display: flex; justify-content: center; margin: 3px 0 0; }

  .sc-topbar__text--full { display: none; }
  .sc-topbar__text--short { display: inline; }
  .sc-topbar__arrow { width: 22px; height: 22px; }
  .sc-topbar__arrow svg { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-topbar__track { transition: none; }
  .sc-topbar__cta svg { transition: none; }
}

@media print {
  .sc-topbar { display: none; }
}
