/* iat-consent.css — Banner consenso Italia a Tavola (custom, first-party). Font Roboto. */

.iatcc-root, .iatcc-root * { box-sizing: border-box; font-family: 'Roboto', Arial, sans-serif; }
.iatcc-root { position: fixed; inset: 0; z-index: 2147483600; }
.iatcc-root[hidden] { display: none; }

/* backdrop */
.iatcc-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}

/* card */
.iatcc-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(500px, calc(100% - 28px)); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(15, 23, 42, .4);
  animation: iatcc-in .22s ease;
}
@keyframes iatcc-in { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* header con logo */
.iatcc-head {
  padding: 24px 24px 18px; border-bottom: 3px solid #d62629; text-align: center;
}
.iatcc-head img { height: 42px; width: auto; }

/* body */
.iatcc-body { padding: 20px 26px 8px; text-align: center; }
.iatcc-title { font-size: 20px; font-weight: 900; color: #0f172a; margin: 0 0 10px; }
.iatcc-text { font-size: 14.5px; line-height: 1.6; color: #475569; margin: 0; }
.iatcc-text a { color: #d62629; font-weight: 700; text-decoration: underline; }

/* azioni */
.iatcc-actions { display: flex; gap: 10px; padding: 18px 26px 6px; flex-wrap: wrap; }
.iatcc-actions .iatcc-btn { flex: 1 1 0; min-width: 150px; }
.iatcc-btn {
  appearance: none; border: 2px solid transparent; border-radius: 10px; cursor: pointer;
  padding: 12px 18px; font-size: 14px; font-weight: 700; line-height: 1; transition: all .15s;
}
.iatcc-btn-accept { background: #d62629; color: #fff; border-color: #d62629; }
.iatcc-btn-accept:hover { background: #b01f22; border-color: #b01f22; }
.iatcc-btn-reject { background: #fff; color: #d62629; border-color: #d62629; }
.iatcc-btn-reject:hover { background: #fdecec; }
.iatcc-btn-save { background: #0f172a; color: #fff; border-color: #0f172a; }
.iatcc-btn-save:hover { background: #1e293b; }
.iatcc-link {
  display: block; width: 100%; text-align: center; background: none; border: none; cursor: pointer;
  color: #64748b; font-size: 13.5px; font-weight: 500; text-decoration: underline; padding: 14px 0 20px;
}
.iatcc-link:hover { color: #0f172a; }

/* pannello categorie (Personalizza) */
.iatcc-cats { padding: 4px 26px 8px; text-align: left; }
.iatcc-cat {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid #e2e8f0;
}
.iatcc-cat:first-child { border-top: none; }
.iatcc-cat-info { flex: 1; }
.iatcc-cat-name { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 3px; }
.iatcc-cat-desc { font-size: 12.5px; line-height: 1.5; color: #64748b; margin: 0; }

/* switch */
.iatcc-switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; margin-top: 2px; }
.iatcc-switch input { opacity: 0; width: 0; height: 0; }
.iatcc-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .18s; cursor: pointer;
}
.iatcc-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.iatcc-switch input:checked + .iatcc-slider { background: #16a34a; }
.iatcc-switch input:checked + .iatcc-slider::before { transform: translateX(20px); }
.iatcc-switch input:disabled + .iatcc-slider { background: #16a34a; opacity: .55; cursor: not-allowed; }

/* pulsante flottante RIMOSSO: la riapertura è il link "Gestione Cookie" in footer.
   Tenuto display:none come rete di sicurezza anti-cache (vecchio JS che lo creasse). */
.iatcc-fab { display: none !important; }

@media (max-width: 540px) {
  .iatcc-actions { flex-direction: column; }
  .iatcc-actions .iatcc-btn { width: 100%; }
}
