/* Sistema cookie/GDPR — usa le CSS variable già definite nel tema host (--terracotta o --clay, --sabbia/--sand, --ink, --paper) */

/* Fix: le utility Tailwind (es. "flex", "block") hanno la stessa specificità della regola nativa
   [hidden]{display:none} e, caricando dopo, la sovrascrivono — l'attributo hidden veniva ignorato
   su elementi con quelle classi (es. i gate di consenso). Questa regola garantisce che hidden vinca sempre. */
[hidden]{display:none !important;}
.cookie-banner{
  position:fixed; left:0; right:0; bottom:0; z-index:200;
  background:var(--paper, #FBF8F2);
  border-top:1px solid var(--sabbia, var(--sand, #DCC9A8));
  box-shadow:0 -12px 32px -14px rgba(0,0,0,0.35);
  padding:10px 16px;
  animation:cookieSlideUp .4s ease both;
}
@keyframes cookieSlideUp{from{transform:translateY(100%);} to{transform:translateY(0);}}
.cookie-banner-inner{
  max-width:1100px; margin:0 auto;
  display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; justify-content:space-between;
}
.cookie-banner-text{flex:1 1 380px; min-width:240px;}
.cookie-banner-title{font-weight:800; font-size:13.5px; margin:0 0 1px; line-height:1.25;}
.cookie-banner-desc{font-size:12px; line-height:1.35; opacity:.8; margin:0;}
.cookie-link{color:var(--terracotta, var(--clay, #B5573A)); font-weight:700; text-decoration:underline;}
.cookie-banner-actions{display:flex; flex-wrap:wrap; gap:8px; flex:0 0 auto; align-items:center;}

.cookie-btn{
  font-size:12.5px; font-weight:700; padding:8px 14px; border-radius:999px;
  cursor:pointer; border:1px solid transparent; transition:transform .15s ease, background .2s ease;
  white-space:nowrap; line-height:1.2;
}
.cookie-btn:hover{transform:translateY(-1px);}
.cookie-btn:focus-visible{outline:2px solid var(--terracotta, var(--clay, #B5573A)); outline-offset:2px;}
.cookie-btn-solid{background:var(--terracotta, var(--clay, #B5573A)); color:#fff;}
.cookie-btn-outline{background:transparent; border-color:var(--sabbia, var(--sand, #DCC9A8)); color:inherit;}
.cookie-btn-ghost{background:transparent; color:inherit; opacity:.75;}

.cookie-panel-overlay{
  position:fixed; inset:0; z-index:210;
  background:rgba(26,20,14,0.45);
  display:flex; align-items:flex-end; justify-content:center;
  padding:16px;
}
@media (min-width:640px){
  .cookie-panel-overlay{align-items:center;}
}
.cookie-panel{
  background:var(--paper, #FBF8F2); border-radius:20px; max-width:560px; width:100%;
  max-height:88vh; overflow-y:auto; box-shadow:0 30px 60px -20px rgba(0,0,0,0.5);
}
.cookie-panel-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px; border-bottom:1px solid var(--sabbia, var(--sand, #DCC9A8));
  position:sticky; top:0; background:var(--paper, #FBF8F2);
}
.cookie-panel-title{font-weight:800; font-size:17px; margin:0;}
.cookie-panel-close{
  background:none; border:none; font-size:22px; line-height:1; cursor:pointer; padding:4px 8px; border-radius:8px;
}
.cookie-panel-close:focus-visible, .cookie-toggle:focus-visible{outline:2px solid var(--terracotta, var(--clay, #B5573A)); outline-offset:2px;}
.cookie-panel-body{padding:8px 20px;}
.cookie-row{
  display:flex; gap:14px; align-items:flex-start; justify-content:space-between;
  padding:14px 0; border-bottom:1px solid var(--sabbia, var(--sand, #DCC9A8));
}
.cookie-row:last-child{border-bottom:none;}
.cookie-row-title{font-weight:700; font-size:14px; margin:0 0 4px;}
.cookie-row-desc{font-size:12.5px; line-height:1.5; opacity:.75; margin:0;}
.cookie-toggle{
  flex:0 0 auto; width:46px; height:26px; border-radius:999px; border:none;
  background:#CBBBA0; position:relative; cursor:pointer; transition:background .2s ease;
}
.cookie-toggle.is-on{background:var(--terracotta, var(--clay, #B5573A));}
.cookie-toggle[disabled]{opacity:.6; cursor:not-allowed;}
.cookie-toggle-dot{
  position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%;
  background:#fff; transition:transform .2s ease; box-shadow:0 1px 3px rgba(0,0,0,0.3);
}
.cookie-toggle.is-on .cookie-toggle-dot{transform:translateX(20px);}
.cookie-panel-actions{
  display:flex; gap:10px; justify-content:flex-end; padding:16px 20px;
  border-top:1px solid var(--sabbia, var(--sand, #DCC9A8));
  position:sticky; bottom:0; background:var(--paper, #FBF8F2);
}

/* Placeholder di consenso per contenuti terze parti bloccati di default */
.consent-gate{
  border:1px dashed var(--sabbia, var(--sand, #DCC9A8));
  border-radius:16px; padding:24px; text-align:center; background:rgba(0,0,0,0.02);
}
.consent-gate p{font-size:13.5px; line-height:1.5; opacity:.8; margin:0 0 12px;}
.consent-gate-btn{
  background:var(--terracotta, var(--clay, #B5573A)); color:#fff; font-weight:700; font-size:13px;
  padding:10px 18px; border-radius:999px; border:none; cursor:pointer;
}
.consent-gate-btn:focus-visible{outline:2px solid var(--ink,#242320); outline-offset:2px;}

@media (max-width: 640px){
  .cookie-banner{padding-bottom:78px;} /* lascia spazio alla sticky bar di prenotazione mobile */
  .cookie-banner-actions{width:100%;}
  .cookie-btn{flex:1;}
}
