.cookie-consent, .cookie-settings { color: #17384f; font-family: inherit; }
.cookie-consent[hidden], .cookie-settings [hidden] { display: none !important; }
.cookie-consent { position: fixed; z-index: 1500; inset: auto 0 0; padding: 14px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)); background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cookie-consent-inner { position: relative; max-width: 1180px; max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); overflow-y: auto; margin: auto; padding: 4px 38px 4px 0; }
.cookie-consent h2, .cookie-settings h2 { margin: 0 0 8px; color: #14334a; font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
.cookie-consent p, .cookie-settings p { max-width: 90ch; margin: 0 0 9px; color: #43647a; font-size: 13px; line-height: 1.55; }
.cookie-consent .cookie-kicker, .cookie-settings .cookie-kicker { margin: 0 0 5px; color: #0869ab; font-size: 10px; font-weight: 750; letter-spacing: .1em; }
.cookie-consent .cookie-documents, .cookie-settings .cookie-documents { margin: 3px 0 12px; }
.cookie-policy-link { color: #075fa8; text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-consent .cookie-choice, .cookie-settings .cookie-choice { min-height: 42px; padding: 9px 16px; border: 1px solid #92bfd5; border-radius: 9px; background: #fff; color: #16577d; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cookie-consent .cookie-choice:hover, .cookie-settings .cookie-choice:hover { background: #eaf6fb; border-color: #4d9bc4; }
.cookie-consent button:focus-visible, .cookie-settings button:focus-visible, .cookie-settings input:focus-visible, .cookie-footer-link:focus-visible, .cookie-policy-link:focus-visible { outline: 3px solid #168acb; outline-offset: 3px; }
.cookie-close { position: absolute; top: 0; right: 0; width: 36px; height: 36px; padding: 0; border: 1px solid #c4dfe9; border-radius: 50%; background: #fff; color: #31566e; font-size: 24px; line-height: 1; cursor: pointer; }
.cookie-settings { width: min(580px, calc(100% - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #c6e0eb; border-radius: 16px; background: #fff; box-shadow: 0 20px 70px #102c4340; }
.cookie-settings::backdrop { background: #0c253b80; }
.cookie-settings-inner { padding: 25px; }
.cookie-settings-header { position: relative; padding-right: 44px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #dfedf3; color: #28516a; font-size: 13px; }
.cookie-category strong { display: block; margin-bottom: 4px; color: #17384f; font-size: 14px; }
.cookie-category p, .cookie-category .cookie-description { display: block; margin: 0; color: #506e82; font-size: 12px; line-height: 1.5; }
.cookie-category > span:last-child { flex-shrink: 0; font-size: 12px; font-weight: 700; }
.cookie-category input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #096eb7; }
.cookie-footer-link { padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 600px) { .cookie-consent { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); } .cookie-consent h2, .cookie-settings h2 { font-size: 18px; } .cookie-actions { display: grid; grid-template-columns: 1fr; } .cookie-choice { width: 100%; } .cookie-settings-inner { padding: 20px; } }

/* Testo e pulsanti leggibili senza coprire lo sfondo della pagina. */
.cookie-consent h2, .cookie-consent p, .cookie-consent .cookie-policy-link,
.cookie-consent .cookie-choice, .cookie-consent .cookie-close {
  color: #102f47;
  text-shadow: 0 1px 1px #fff, 1px 0 1px #fff, -1px 0 1px #fff, 0 -1px 1px #fff;
}
.cookie-consent .cookie-choice, .cookie-consent .cookie-close {
  background: transparent;
  border-color: #377697;
}
.cookie-consent .cookie-choice:hover, .cookie-consent .cookie-close:hover {
  background: #d5eff870;
  border-color: #155e87;
}

.cookie-consent h2.cookie-on-dark, .cookie-consent p.cookie-on-dark,
.cookie-consent .cookie-policy-link.cookie-on-dark,
.cookie-consent .cookie-choice.cookie-on-dark, .cookie-consent .cookie-close.cookie-on-dark {
  color: #fff;
  text-shadow: 0 1px 1px #06283f, 1px 0 1px #06283f, -1px 0 1px #06283f, 0 -1px 1px #06283f;
}
.cookie-consent .cookie-choice.cookie-on-dark, .cookie-consent .cookie-close.cookie-on-dark { border-color: #b4d9e9; }

/* Banner compatto, trasparente e leggibile anche su telefoni. */
.cookie-consent {
  inset: auto auto max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  width: min(255px, calc(100vw - 24px));
  padding: 4px 8px;
}
.cookie-consent-inner { max-width: none; padding: 0; }
.cookie-consent h2 { padding-right: 35px; margin-bottom: 3px; font-size: 16px; }
.cookie-consent p { margin-bottom: 4px; font-size: 12px; line-height: 1.3; }
.cookie-consent .cookie-kicker { display: none; }
.cookie-consent .cookie-documents { margin: 0 0 4px; }
.cookie-consent .cookie-close { width: 32px; height: 32px; font-size: 21px; }
.cookie-consent .cookie-actions { display: grid; grid-template-columns: 1fr 1.33fr 1.2fr; gap: 5px; }
.cookie-consent .cookie-choice { min-width: 0; min-height: 42px; padding: 7px 4px; font-size: 11px; line-height: 1.2; }
@media (max-width: 600px) {
  .cookie-consent { padding: 4px 8px; }
  .cookie-consent h2 { font-size: 16px; }
}
