/* ==============================================
   Cookie banner — coerente con stile del sito
   ============================================== */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200; /* sopra bottom-nav (30), drawer (100); sotto preloader (9999) */
  background: #0d1216;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(.2, .7, .2, 1);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: #e9eef2;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner.hiding {
  transform: translateY(100%);
}

.cookie-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cookie-banner-text {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-banner-title {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9aa6af;
  margin-bottom: 8px;
  font-weight: 400;
}

.cookie-banner-body {
  font-size: 13px;
  line-height: 1.55;
  color: #e9eef2;
  margin: 0;
  text-wrap: pretty;
}

.cookie-banner-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.cookie-banner-link {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9aa6af;
  text-decoration: none;
  transition: color 0.25s;
}

.cookie-banner-link:hover,
.cookie-banner-link:focus-visible {
  color: #e9eef2;
}

.cookie-banner-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: #007A99;
  color: #fff;
  border: 1px solid #007A99;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}

.cookie-banner-btn:hover {
  background: #0a8fb0;
  box-shadow: 0 0 24px -4px rgba(0, 122, 153, 0.35);
  transform: translateY(-1px);
}

.cookie-banner-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 153, 0.45);
}

/* ===== Sposta gli elementi fixed esistenti SOPRA il banner mentre è visibile ===== */
/* Override attive solo quando body.has-cookie-banner è presente.
   Si rimuovono automaticamente alla chiusura del banner. */
body.has-cookie-banner .bottom-nav {
  bottom: calc(24px + var(--cookie-banner-h, 110px));
  transition: bottom 0.45s cubic-bezier(.2, .7, .2, 1);
}

body.has-cookie-banner .lang-switcher {
  bottom: calc(24px + var(--cookie-banner-h, 110px));
  transition: bottom 0.45s cubic-bezier(.2, .7, .2, 1);
}

/* ===== Footer cookie preferences button — eredita stile dei link footer ===== */
.footer-cookie-prefs {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 20px;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .cookie-banner-body {
    font-size: 12px;
  }

  /* Su mobile NON spostiamo bottom-nav e lang-switcher: il banner cookie li
     COPRE temporaneamente (z-index 200 vs 30). Più pulito visivamente e non
     "salta" il layout. L'utente chiude il banner col tap su OK. */
}
