/* ============================================================
   Elpi System – Stili personalizzati
   1) Font Inter auto-ospitato (no Google Fonts -> privacy/Garante)
   2) Fix immagine hero Assistenza + footer su mobile
   3) Banner cookie conforme normativa italiana
   ============================================================ */

/* ---------- 1) FONT INTER LOCALE (subset latin) ---------- */
@font-face{font-family:"Inter";font-style:normal;font-weight:300;font-display:swap;src:url("/assets/fonts/inter-latin-300-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:800;font-display:swap;src:url("/assets/fonts/inter-latin-800-normal.woff2") format("woff2");}
@font-face{font-family:"Inter";font-style:normal;font-weight:900;font-display:swap;src:url("/assets/fonts/inter-latin-900-normal.woff2") format("woff2");}

/* ---------- 2) ASSISTENZA: immagine hero chiara + testo leggibile su mobile ---------- */
@media (max-width:639.98px){
  div[style*="assistenza-hero"]{
    display:block !important;
    width:100% !important;
    opacity:.55 !important;
  }
  /* velatura bianca: opaca a sinistra (testo nitido), trasparente a destra (foto visibile) */
  section:has(> div[style*="assistenza-hero"])::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(to right,#fff 0%,rgba(255,255,255,.92) 30%,rgba(255,255,255,.65) 55%,rgba(255,255,255,0) 95%);
    z-index:1;
    pointer-events:none;
  }
}

/* ---------- 2b) FOOTER su mobile: meno lungo, due colonne ---------- */
@media (max-width:639.98px){
  footer .grid.grid-cols-1{
    grid-template-columns:1fr 1fr !important;
    column-gap:1.25rem !important;
    row-gap:2.25rem !important;
    margin-bottom:2rem !important;
  }
  /* descrizione azienda e "Contattaci" a tutta larghezza; Link utili + Servizi affiancati */
  footer .grid.grid-cols-1 > div:first-child,
  footer .grid.grid-cols-1 > div:nth-child(4){
    grid-column:1 / -1 !important;
  }
  /* riga legale/copyright più compatta */
  footer .max-w-2xl{font-size:11px !important;line-height:1.5 !important;}
}

/* ---------- 3) COOKIE BANNER ---------- */
#elpi-cookie-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:2147483646;display:none;}
#elpi-cookie-overlay.elpi-show{display:block;}

.elpi-cc{position:fixed;z-index:2147483647;left:50%;bottom:24px;transform:translateX(-50%);
  width:min(680px,calc(100% - 32px));background:#fff;color:#1e1e1e;
  border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.25);
  font-family:"Inter",system-ui,sans-serif;padding:26px 26px 22px;display:none;}
.elpi-cc.elpi-show{display:block;}
.elpi-cc h2{font-size:18px;font-weight:800;margin:0 0 8px;color:#1e1e1e;}
.elpi-cc p{font-size:13.5px;line-height:1.55;color:#475569;margin:0 0 14px;}
.elpi-cc a{color:#003d9e;font-weight:600;text-decoration:none;}
.elpi-cc a:hover{text-decoration:underline;}
.elpi-cc-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px;}
.elpi-cc-btn{flex:1 1 auto;min-width:140px;border:0;cursor:pointer;border-radius:12px;
  padding:12px 16px;font-size:13.5px;font-weight:700;font-family:inherit;transition:all .2s;}
.elpi-cc-accept{background:#ff5c00;color:#fff;}
.elpi-cc-accept:hover{background:#e04c00;}
.elpi-cc-reject{background:#eef2f7;color:#1e1e1e;}
.elpi-cc-reject:hover{background:#e2e8f0;}
.elpi-cc-prefs{background:#fff;color:#003d9e;border:1.5px solid #003d9e;}
.elpi-cc-prefs:hover{background:#f0f5ff;}

/* pannello preferenze */
.elpi-cc-panel{display:none;margin-top:6px;}
.elpi-cc.elpi-panel-open .elpi-cc-panel{display:block;}
.elpi-cc.elpi-panel-open .elpi-cc-actions-main{display:none;}
.elpi-cc-cat{border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;margin-bottom:10px;}
.elpi-cc-cat-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.elpi-cc-cat-head strong{font-size:14px;color:#1e1e1e;}
.elpi-cc-cat p{font-size:12.5px;margin:8px 0 0;color:#64748b;}
.elpi-cc-switch{position:relative;width:42px;height:24px;flex:0 0 auto;}
.elpi-cc-switch input{opacity:0;width:0;height:0;position:absolute;}
.elpi-cc-slider{position:absolute;inset:0;background:#cbd5e1;border-radius:999px;transition:.2s;cursor:pointer;}
.elpi-cc-slider:before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;}
.elpi-cc-switch input:checked + .elpi-cc-slider{background:#003d9e;}
.elpi-cc-switch input:checked + .elpi-cc-slider:before{transform:translateX(18px);}
.elpi-cc-switch input:disabled + .elpi-cc-slider{background:#94a3b8;cursor:not-allowed;}
.elpi-cc-panel-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;}

/* bottone fluttuante per riaprire le preferenze */
#elpi-cc-reopen{position:fixed;left:16px;bottom:16px;z-index:2147483640;
  width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;
  background:#003d9e;color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.25);
  display:none;align-items:center;justify-content:center;font-size:22px;line-height:1;}
#elpi-cc-reopen.elpi-show{display:flex;}
#elpi-cc-reopen:hover{background:#002e75;}

/* placeholder per contenuti di terze parti bloccati (es. YouTube) */
.elpi-cc-blocked{display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;text-align:center;background:#f1f5f9;border:1px dashed #cbd5e1;border-radius:14px;
  padding:28px 20px;color:#475569;font-family:"Inter",system-ui,sans-serif;min-height:160px;}
.elpi-cc-blocked p{margin:0;font-size:13px;line-height:1.5;max-width:420px;}
.elpi-cc-blocked button{border:0;cursor:pointer;background:#ff5c00;color:#fff;font-weight:700;
  border-radius:10px;padding:10px 18px;font-size:13px;font-family:inherit;}
.elpi-cc-blocked button:hover{background:#e04c00;}

@media (max-width:480px){
  .elpi-cc{padding:20px 18px 18px;border-radius:16px 16px 0 0;bottom:0;width:100%;}
  .elpi-cc-btn{flex-basis:100%;}
}
