/* ==========================================================================
   GDPR Consent — glassmorphism CMP
   Palette: ogni sito definisce --gdpr-accent / --gdpr-accent-2 / --gdpr-btn-ink
   (fallback sui token brand --brick / --gold / --brand / --forest)
   ========================================================================== */
:root{
  --gdpr-ink:#1a1714;
  --gdpr-cream:#f7f2e8;
  --gdpr-muted:rgba(247,242,232,.72);
  --gdpr-accent:var(--brick, var(--brand, var(--gold, #c9a66b)));
  --gdpr-accent-2:var(--gold, var(--brand-soft, var(--brick, #d68912)));
  --gdpr-btn-ink:#1a1714;
  --gdpr-ok:#2f8f6b;
  --gdpr-glass:rgba(18,16,14,.74);
  --gdpr-glass-border:rgba(255,255,255,.16);
  --gdpr-blur:22px;
  --gdpr-radius:22px;
  --gdpr-font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --gdpr-display:Georgia,"Times New Roman",serif;
}

.gdpr-banner{
  position:fixed;
  left:max(12px, env(safe-area-inset-left, 0px));
  right:max(12px, env(safe-area-inset-right, 0px));
  bottom:calc(max(12px, env(safe-area-inset-bottom, 0px)) + var(--vv-bottom-inset, 0px));
  z-index:10050;
  max-width:920px;
  margin:0 auto;
  padding:1.15rem 1.25rem 1.2rem;
  border-radius:var(--gdpr-radius);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gdpr-accent) 32%, transparent), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, color-mix(in srgb, var(--gdpr-accent-2) 20%, transparent), transparent 50%),
    var(--gdpr-glass);
  border:1px solid color-mix(in srgb, var(--gdpr-accent) 35%, var(--gdpr-glass-border));
  box-shadow:
    0 24px 60px rgba(0,0,0,.38),
    0 0 0 1px color-mix(in srgb, var(--gdpr-accent) 18%, transparent),
    inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(var(--gdpr-blur)) saturate(1.35);
  -webkit-backdrop-filter:blur(var(--gdpr-blur)) saturate(1.35);
  color:var(--gdpr-cream);
  font-family:var(--gdpr-font);
  transform:translateY(120%);
  opacity:0;
  pointer-events:none;
  transition:transform .55s cubic-bezier(.22,1,.36,1), opacity .4s ease;
}
.gdpr-banner.is-visible{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}
.gdpr-banner__grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:1.1rem 1.4rem;
  align-items:end;
}
.gdpr-banner__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--gdpr-accent);
  margin:0 0 .4rem;
}
.gdpr-banner__title{
  font-family:var(--gdpr-display);
  font-size:clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight:500;
  letter-spacing:-.01em;
  margin:0 0 .55rem;
  color:#fff;
  line-height:1.2;
}
.gdpr-banner__text{
  margin:0;
  font-size:.9rem;
  line-height:1.55;
  color:var(--gdpr-muted);
  max-width:54ch;
}
.gdpr-banner__text a{
  color:#fff;
  text-decoration:underline;
  text-underline-offset:2px;
  font-weight:600;
}
.gdpr-banner__text a:hover{ color:var(--gdpr-accent); }
.gdpr-banner__actions{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  justify-content:flex-end;
  align-items:center;
}
.gdpr-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  font:inherit;
  font-size:.84rem;
  font-weight:700;
  letter-spacing:.02em;
  border-radius:999px;
  padding:.72rem 1.1rem;
  transition:transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
  white-space:nowrap;
}
.gdpr-btn:active{ transform:scale(.98); }
.gdpr-btn--primary{
  background:linear-gradient(135deg, var(--gdpr-accent), var(--gdpr-accent-2));
  color:var(--gdpr-btn-ink);
  box-shadow:0 10px 28px color-mix(in srgb, var(--gdpr-accent) 40%, transparent);
}
.gdpr-btn--primary:hover{ filter:brightness(1.06); }
.gdpr-btn--ghost{
  background:color-mix(in srgb, var(--gdpr-accent) 12%, rgba(255,255,255,.04));
  color:#fff;
  border:1px solid color-mix(in srgb, var(--gdpr-accent) 40%, rgba(255,255,255,.18));
}
.gdpr-btn--ghost:hover{
  background:color-mix(in srgb, var(--gdpr-accent) 22%, rgba(255,255,255,.06));
}
.gdpr-btn--link{
  background:transparent;
  color:var(--gdpr-muted);
  padding:.5rem .7rem;
  text-decoration:underline;
  text-underline-offset:2px;
  font-weight:600;
}
.gdpr-btn--link:hover{ color:#fff; }

/* Preferences panel */
.gdpr-prefs{
  display:none;
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.12);
}
.gdpr-banner.is-prefs .gdpr-prefs{ display:block; }
.gdpr-prefs__list{ display:flex; flex-direction:column; gap:.65rem; margin:0 0 1rem; }
.gdpr-pref{
  display:grid;
  grid-template-columns:1fr auto;
  gap:.5rem 1rem;
  align-items:center;
  padding:.85rem 1rem;
  border-radius:14px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.1);
}
.gdpr-pref h4{
  margin:0 0 .2rem;
  font-size:.92rem;
  font-weight:700;
  color:#fff;
}
.gdpr-pref p{
  margin:0;
  font-size:.78rem;
  line-height:1.45;
  color:var(--gdpr-muted);
}
.gdpr-switch{
  position:relative;
  width:48px; height:28px;
  flex:none;
}
.gdpr-switch input{
  position:absolute; inset:0;
  opacity:0; width:100%; height:100%;
  margin:0; cursor:pointer; z-index:2;
}
.gdpr-switch input:disabled{ cursor:not-allowed; }
.gdpr-switch__ui{
  position:absolute; inset:0;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.2);
  transition:background .25s ease;
}
.gdpr-switch__ui::after{
  content:"";
  position:absolute; top:3px; left:3px;
  width:20px; height:20px; border-radius:50%;
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.25);
  transition:transform .25s ease;
}
.gdpr-switch input:checked + .gdpr-switch__ui{
  background:linear-gradient(135deg, var(--gdpr-accent), var(--gdpr-accent-2));
  border-color:transparent;
}
.gdpr-switch input:checked + .gdpr-switch__ui::after{ transform:translateX(20px); }
.gdpr-switch input:disabled + .gdpr-switch__ui{
  background:color-mix(in srgb, var(--gdpr-accent) 55%, rgba(255,255,255,.2));
  border-color:transparent;
}
.gdpr-prefs__actions{
  display:flex; flex-wrap:wrap; gap:.55rem; justify-content:flex-end;
}

/* Re-open preferences (footer / floating) */
.gdpr-manage{
  position:fixed;
  left:max(0.7rem, env(safe-area-inset-left, 0px));
  bottom:calc(max(0.7rem, env(safe-area-inset-bottom, 0px)) + var(--vv-bottom-inset, 0px) + 3.6rem);
  z-index:9985;
  appearance:none; border:0; cursor:pointer;
  font:inherit; font-size:.68rem; font-weight:700;
  letter-spacing:.04em; text-transform:uppercase;
  color:#fff;
  background:color-mix(in srgb, var(--gdpr-accent) 55%, rgba(16,14,12,.92));
  border:1px solid color-mix(in srgb, var(--gdpr-accent) 45%, rgba(255,255,255,.2));
  border-radius:999px;
  padding:.45rem .75rem;
  box-shadow:0 8px 22px color-mix(in srgb, var(--gdpr-accent) 28%, transparent);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:0; pointer-events:none;
  transition:opacity .3s ease, transform .3s ease, filter .25s ease;
}
.gdpr-manage.is-visible{ opacity:1; pointer-events:auto; }
.gdpr-manage:hover{ transform:translateY(-1px); filter:brightness(1.08); }

/* Form privacy disclaimer */
.form-legal{
  display:flex;
  align-items:flex-start;
  gap:.7rem;
  margin:1rem 0 .55rem;
  padding:.9rem 1rem;
  border-radius:12px;
  background:rgba(34,31,25,.04);
  border:1px solid rgba(34,31,25,.1);
  font-size:.84rem;
  line-height:1.5;
  color:inherit;
  cursor:pointer;
}
.form-legal input{
  margin-top:.2rem;
  width:1.1rem; height:1.1rem;
  flex:none;
  accent-color:var(--gdpr-accent);
}
.form-legal a{
  color:inherit;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
}
.form-legal a:hover{ opacity:.8; }
.form-legal__hint{
  margin:0 0 1rem;
  font-size:.75rem;
  line-height:1.45;
  opacity:.75;
}

@media (max-width:720px){
  .gdpr-banner{
    left:max(8px, env(safe-area-inset-left, 0px));
    right:max(8px, env(safe-area-inset-right, 0px));
    bottom:calc(max(8px, env(safe-area-inset-bottom, 0px)) + var(--vv-bottom-inset, 0px));
    padding:1rem 1rem 1.05rem;
    border-radius:18px;
  }
  .gdpr-banner__grid{
    grid-template-columns:1fr;
    gap:.9rem;
  }
  .gdpr-banner__actions{
    justify-content:stretch;
  }
  .gdpr-banner__actions .gdpr-btn{
    flex:1 1 auto;
    text-align:center;
    justify-content:center;
  }
  .gdpr-btn--link{ flex:1 1 100%; text-align:center; }
  .gdpr-manage{
    bottom:calc(max(0.55rem, env(safe-area-inset-bottom, 0px)) + var(--vv-bottom-inset, 0px) + 3.35rem);
  }
}

/* Placeholder per mappe/video bloccati senza consenso */
.gdpr-embed-fallback{
  display:flex; align-items:center; justify-content:center;
  width:100%; min-height:180px; margin:0;
  padding:1rem 1.2rem; text-align:center;
  font:inherit; font-size:.9rem; font-weight:600; line-height:1.4;
  color:#fff; cursor:pointer;
  border:1px dashed rgba(255,255,255,.28);
  border-radius:14px;
  background:rgba(20,18,16,.55);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.gdpr-embed-fallback:hover{ background:rgba(20,18,16,.7); }

@media (prefers-reduced-motion:reduce){
  .gdpr-banner{ transition:none; }
}

/* Form su fondi scuri (es. Villa Giolai contact) */
.contact__form .form-legal,
.booking-form .form-legal{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.14);
}
.contact__form .form-legal,
.contact__form .form-legal__hint,
.booking-form--dark .form-legal{
  color:inherit;
}
