/* ==========================================================================
   Nordlys — banner cookie (condiviso da home, Fifth e pagine interne)
   Misure in px: il banner resta identico anche se le pagine usano scale
   tipografiche diverse.
   ========================================================================== */

.consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100;
  width: min(520px, calc(100% - 32px));
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #ffffff;
  color: #0b0b0c;
  border: 1px solid #0b0b0c;
  box-shadow: 4px 4px 0 #0b0b0c;
  font-size: 15px;
  line-height: 1.4;
}

.consent[hidden] { display: none; }

.consent *,
.consent *::before,
.consent *::after { letter-spacing: 0; }

.consent__title {
  margin: 0;
  padding-right: 40px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.09em !important;
  text-transform: uppercase;
}

.consent__text { margin: 0; }

.consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* «Rifiuta» e «Accetta» hanno lo stesso peso visivo (Linee guida Garante 2021) */
.consent__btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #0b0b0c;
  border-radius: 0;
  background: #0b0b0c;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.consent__btn:hover {
  background: #ffffff;
  color: #0b0b0c;
}

.consent__close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #0b0b0c;
  cursor: pointer;
}

.consent__close svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.consent :focus-visible {
  outline: 3px solid #0b0b0c;
  outline-offset: 3px;
}

/* Link «Preferenze cookie» nei footer (è un pulsante che sembra un link) */
.consent-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.consent-open[hidden] { display: none; }

@media (max-width: 480px) {
  .consent {
    left: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent__btn { transition: none; }
}
