/* =========================================================
   MARIS TERRA B&B - COOKIE, MODALI LEGALI, CHATBOT (legale.css)
   Estratto dall'export Squadd: quei tre blocchi HTML sono riusati
   intatti nella home e senza questo foglio si vedrebbero come
   contenuto normale in fondo alla pagina.
========================================================= */
/* COOKIE BANNER + LEGAL MODALS + COOKIE PREFS                     */
/* ============================================================== */
.cookie-banner {
  position: fixed; left: clamp(16px,3vw,32px); right: clamp(16px,3vw,32px);
  bottom: clamp(16px,3vw,32px); z-index: 9990;
  background: #1a1410; color: #fbf7ee; border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  padding: clamp(20px,2.5vw,26px) clamp(22px,3vw,32px);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  transform: translateY(24px); opacity: 0; pointer-events: none;
  transition: transform .5s ease, opacity .4s ease;
  max-width: 1080px; margin: 0 auto;
  border: 1px solid rgba(217,166,72,0.25);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.cookie-banner.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner-text { font-size: 13.5px; line-height: 1.6; color: rgba(251,247,238,0.85); }
.cookie-banner-text h5 { font-weight: 600; font-style: italic; font-size: 20px; color: #fbf7ee; margin: 0 0 6px; }
.cookie-banner-text a { color: #d9a648; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner-text a:hover { color: #fbf7ee; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 820px) {

  .cookie-banner { grid-template-columns: 1fr; gap: 16px; padding: 20px 20px 18px; }

  .cookie-banner-actions { justify-content: flex-start; }
}
.legal-overlay {
  position: fixed; inset: 0; z-index: 9991;
  background: rgba(26,20,16,0.78);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: clamp(12px,3vw,40px);
  opacity: 0; transition: opacity .3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.legal-overlay.open { display: flex; opacity: 1; }
.legal-card {
  background: #fbf7ee; color: #1a1410;
  width: 100%; max-width: 860px; max-height: 92vh;
  border-radius: 4px; box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform .45s ease;
  border: 1px solid #e8ddc4;
}
.legal-overlay.open .legal-card { transform: translateY(0) scale(1); }
.legal-head {
  padding: clamp(16px,2.5vw,24px) clamp(20px,3vw,32px);
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid rgba(26,20,16,0.1); gap: 16px;
  position: sticky; top: 0; background: #fbf7ee; z-index: 1;
}
.legal-head .kicker { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(26,20,16,0.5); margin-bottom: 6px; font-weight: 600; }
.legal-head h3 { margin: 0; font-size: clamp(20px,3vw,26px); line-height: 1.2; font-weight: 600; }
.legal-head .updated { font-size: 11px; color: rgba(26,20,16,0.45); margin-top: 8px; font-style: italic; }
.legal-close {
  position: relative; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(26,20,16,0.2); background: transparent;
  cursor: pointer; transition: all .25s ease;
}
.legal-close:hover { border-color: #c25e3a; background: rgba(194,94,58,0.08); }
.legal-close::before, .legal-close::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 1.5px; background: #1a1410;
  transition: background .25s ease;
}
.legal-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.legal-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.legal-body {
  padding: clamp(18px,3vw,28px) clamp(20px,3vw,32px) clamp(20px,3vw,32px);
  overflow-y: auto; flex: 1;
  font-size: 14.5px; line-height: 1.65; color: rgba(26,20,16,0.85);
}
.legal-body .lead { font-size: 16px; color: #1a1410; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(26,20,16,0.1); }
.legal-body h4 { margin: 22px 0 10px; font-size: 17px; color: #1a1410; font-weight: 600; }
.legal-body h5 { margin: 16px 0 6px; font-size: 14px; color: #1a1410; font-weight: 600; }
.legal-body p { margin: 0 0 12px; }
.legal-body a { color: #a04527; text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: #c25e3a; }
.legal-body ul { margin: 0 0 14px 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 13.5px; }
.legal-body th, .legal-body td { text-align: left; padding: 8px 12px; border-bottom: 1px dashed rgba(26,20,16,0.12); vertical-align: top; }
.legal-body th { background: #f4ecdb; font-weight: 600; color: #1a1410; width: 35%; }
.legal-body .callout { background: rgba(217,166,72,0.12); border-left: 3px solid #d9a648; padding: 14px 18px; border-radius: 4px; margin: 14px 0; font-size: 14px; color: rgba(26,20,16,0.85); }
.legal-body .placeholder { color: #c25e3a; background: rgba(194,94,58,0.08); padding: 1px 6px; border-radius: 3px; font-family: monospace; font-size: 0.9em; font-weight: 600; }
.legal-body .foot-note { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(26,20,16,0.1); font-size: 12px; color: rgba(26,20,16,0.5); font-style: italic; }
.legal-body .cookie-block { background: #fff; border: 1px solid rgba(26,20,16,0.1); border-radius: 3px; padding: 16px 20px; margin: 14px 0; }
.legal-body .cookie-block h5 { margin-top: 0; margin-bottom: 8px; }
.legal-body .cookie-block .tag { display: inline-block; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 6px; font-weight: 700; vertical-align: 1px; }
.legal-body .cookie-block .tag-tech { background: #d9e7d2; color: #3d5532; }
.legal-body .cookie-block .tag-third { background: #f1d9d3; color: #8d3a22; }
.legal-body .cookie-block dl { margin-top: 8px; font-size: 13px; }
.legal-body .cookie-block dl div { display: grid; grid-template-columns: 150px 1fr; padding: 6px 0; border-bottom: 1px dashed rgba(26,20,16,0.1); }
.legal-body .cookie-block dl div:last-child { border-bottom: 0; }
.legal-body .cookie-block dt { font-weight: 700; color: #1a1410; font-size: 12px; }
.legal-body .cookie-block dd { color: rgba(26,20,16,0.8); font-size: 13px; margin: 0; }
.cookie-category { padding: 16px 0; border-bottom: 1px solid rgba(26,20,16,0.1); display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: flex-start; }
.cookie-category:last-of-type { border-bottom: 0; }
.cookie-category-title { font-weight: 700; font-size: 14px; color: #1a1410; margin-bottom: 4px; }
.cookie-category-desc { font-size: 13px; color: rgba(26,20,16,0.65); line-height: 1.55; }
.cookie-category .status { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(26,20,16,0.4); margin-top: 6px; font-weight: 700; }
.switch-wrap { flex-shrink: 0; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; transition: .3s; border-radius: 26px; }
.switch .slider::before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; transition: .3s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch input:checked + .slider { background: #a6823c; }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { background: #d9a648; cursor: not-allowed; opacity: 0.7; }
#azc-launcher{position:fixed;bottom:24px;right:24px;width:60px;height:60px;border-radius:30px;background:#a6823c;box-shadow:0 6px 20px rgba(166,130,60,.4);cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:9998;border:none;color:#fff;transition:transform .2s}
#azc-launcher:hover{transform:scale(1.05)}
#azc-launcher svg{width:28px;height:28px}
#azc-badge{position:absolute;top:-2px;right:-2px;background:#e74c3c;color:#fff;border-radius:50%;width:18px;height:18px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
#azc-panel{position:fixed;bottom:24px;right:24px;width:380px;max-width:calc(100vw - 32px);height:560px;max-height:calc(100vh - 48px);background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.18);z-index:9999;display:none;flex-direction:column;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}
#azc-panel.open{display:flex}
.azc-header{background:linear-gradient(135deg,#a6823c,#8b6a2f);color:#fff;padding:16px;display:flex;align-items:center;gap:12px}
.azc-header-info{flex:1}
.azc-header-info h3{margin:0;font-size:15px;font-weight:600}
.azc-header-info p{margin:2px 0 0;font-size:12px;opacity:.85}
.azc-close{background:none;border:none;color:#fff;cursor:pointer;padding:4px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.azc-close:hover{background:rgba(255,255,255,.15)}
.azc-close svg{width:20px;height:20px}
.azc-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#f7f7f8}
.azc-msg{max-width:82%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.45;word-wrap:break-word}
.azc-msg.user{align-self:flex-end;background:#a6823c;color:#fff;border-bottom-right-radius:4px}
.azc-msg.bot{align-self:flex-start;background:#fff;color:#222;border:1px solid #e5e5e7;border-bottom-left-radius:4px}
.azc-msg a{color:#a6823c;text-decoration:underline;word-break:break-all}
.azc-typing{align-self:flex-start;background:#fff;border:1px solid #e5e5e7;border-radius:16px;padding:12px 16px;display:flex;gap:4px}
.azc-typing span{width:7px;height:7px;border-radius:50%;background:#aaa;animation:azc-bounce 1.4s infinite ease-in-out both}
.azc-typing span:nth-child(2){animation-delay:.16s}
.azc-typing span:nth-child(3){animation-delay:.32s}
@keyframes azc-bounce{0%,80%,100%{transform:scale(.6);opacity:.5}40%{transform:scale(1);opacity:1}}
.azc-suggest{padding:8px 12px;display:flex;flex-wrap:wrap;gap:6px;border-top:1px solid #eee;background:#fff}
.azc-chip{background:#f7f7f8;border:1px solid #ddd;border-radius:14px;padding:6px 12px;font-size:12px;cursor:pointer;color:#444}
.azc-chip:hover{background:#a6823c;color:#fff;border-color:#a6823c}
.azc-input-wrap{display:flex;align-items:flex-end;gap:8px;padding:10px;border-top:1px solid #eee;background:#fff}
.azc-input{flex:1;border:1px solid #ddd;border-radius:18px;padding:9px 14px;font-size:14px;outline:none;resize:none;font-family:inherit;max-height:96px;line-height:1.4}
.azc-input:focus{border-color:#a6823c}
.azc-send{background:#a6823c;border:none;color:#fff;width:38px;height:38px;border-radius:19px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.azc-send:disabled{opacity:.5;cursor:not-allowed}
.azc-send svg{width:18px;height:18px}
.azc-footer{padding:6px;text-align:center;font-size:10px;color:#999;background:#fff;border-top:1px solid #eee}
@media (max-width:480px) {
#azc-panel{bottom:0;right:0;width:100vw;height:100vh;max-height:100vh;border-radius:0}
}
body.menu-open #azc-launcher,
body.menu-open #azc-panel,
body.menu-open .iubenda-cs-container,
body.menu-open #cookieConsent,
body.menu-open [class*="cookie-consent"],
body.menu-open [class*="consent-banner"],
body.menu-open .cookie-banner { display: none !important; }