.form { display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 800; color: var(--color-ink); }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; padding: .85rem .95rem; color: var(--color-ink); transition: border .2s var(--ease), box-shadow .2s var(--ease); }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(0,63,120,.1); outline: 0; }
.field__error { min-height: 1.2rem; color: #b42318; font-size: .88rem; font-weight: 700; }
.checkbox { display: flex; gap: .75rem; align-items: flex-start; color: #40586d; }
.checkbox input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: .15rem; }
.form-message { display: none; border-radius: 14px; padding: 1rem; background: #e7f7ef; color: #15603b; font-weight: 800; }
.form-message.is-visible { display: block; }
.newsletter { display: grid; gap: .7rem; max-width: 560px; margin-top: 1.4rem; }
.newsletter__row { display: flex; gap: .7rem; }
.newsletter input[type="email"] { flex: 1; min-height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.34); padding: 0 1.1rem; background: rgba(255,255,255,.14); color: #fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.76); }
.newsletter .checkbox { color: rgba(255,255,255,.88); font-size: .92rem; }
.newsletter .field__error { color: #fff4d6; }

/* Gestione del consenso interna al sito, senza piattaforme esterne. */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 1100;
  width: min(680px, calc(100% - 2rem));
  max-height: min(88vh, 720px);
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background: rgba(5, 35, 64, .985);
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
  padding: 1.5rem;
}
.cookie-banner[hidden],
.cookie-preferences[hidden],
.cookie-actions[hidden] { display: none !important; }
.cookie-banner__summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 1rem; padding-right: 3.25rem; }
.cookie-banner__eyebrow { margin: 0 0 .35rem; color: var(--color-accent); font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.cookie-banner h2 { margin: 0 0 .55rem; color: #fff; font-size: clamp(1.2rem, 2.2vw, 1.55rem); }
.cookie-banner p { margin: 0; color: rgba(255,255,255,.78); font-size: .91rem; line-height: 1.55; }
.cookie-banner__info { color: var(--color-accent); font-size: .84rem; font-weight: 800; white-space: nowrap; }
.cookie-banner__close { position: absolute; top: .8rem; right: .8rem; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.cookie-actions,
.cookie-preferences__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.cookie-actions button,
.cookie-preferences__actions button { min-height: 44px; padding: .65rem 1.1rem; border: 1px solid transparent; border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 800; cursor: pointer; }
.cookie-accept,
.cookie-save { background: var(--color-accent); color: #082b4f; }
.cookie-essential,
.cookie-customize,
.cookie-back { border-color: rgba(255,255,255,.25) !important; background: rgba(255,255,255,.08); color: #fff; }
.cookie-preferences { margin-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14); padding-top: .5rem; }
.cookie-preference-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.cookie-preference-row strong { display: block; margin-bottom: .25rem; color: #fff; }
.cookie-preference-row p,
.cookie-preference-row span span { display: block; color: rgba(255,255,255,.7); font-size: .82rem; line-height: 1.45; }
.cookie-preference-row--interactive { cursor: pointer; }
.cookie-preference-row input[type="checkbox"] { appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: #405c73; cursor: pointer; }
.cookie-preference-row input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.cookie-preference-row input[type="checkbox"]:checked { border-color: var(--color-accent); background: var(--color-accent); }
.cookie-preference-row input[type="checkbox"]:checked::after { transform: translateX(20px); background: #082b4f; }
.cookie-preference-row input[type="checkbox"]:focus-visible,
.cookie-actions button:focus-visible,
.cookie-preferences__actions button:focus-visible,
.cookie-banner__close:focus-visible { outline: 3px solid rgba(242,169,0,.5); outline-offset: 3px; }
.cookie-status { display: inline-flex; min-height: 32px; align-items: center; padding: .4rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.cookie-status--required { background: rgba(242,169,0,.16); color: var(--color-accent); }
.footer-cookie-manage { border: 0; background: none; color: inherit; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.footer-cookie-manage:hover { text-decoration: underline; }

.field--hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-message.is-error { background: #fdeaea; color: #9f1f1f; }
.form button:disabled { opacity: .72; cursor: wait; }

@media (max-width: 640px) {
  .newsletter__row { display: grid; }
  .cookie-banner { bottom: .75rem; width: calc(100% - 1.5rem); padding: 1.2rem; border-radius: 20px; }
  .cookie-banner__summary { grid-template-columns: 1fr; padding-right: 3.25rem; }
  .cookie-banner__info { justify-self: start; }
  .cookie-actions,
  .cookie-preferences__actions { display: grid; grid-template-columns: 1fr; }
  .cookie-actions button,
  .cookie-preferences__actions button { width: 100%; }
}
