/* =========================================================
   DolceItalia — Tema natalizio
   Caricato SOLO quando è attivo (Admin → Impostazioni → Aspetto).
   Tutte le regole sono sotto body.xm: spegnendo lo switch il sito
   torna esattamente com'era.
   Sorgente generata: le immagini SVG sono inline (data URI).
   ========================================================= */

body.xm{
  --xm-green:#1d5c3a;
  --xm-green-d:#123f27;
  --xm-green-l:#e6f0ea;
  --xm-gold:#e9b949;
  --xm-snow:#ffffff;
  --xm-bar-h:0px;
  /* rosso un po' più "natalizio" (ereditato da pulsanti, form prenotazione, prezzi) */
  --di-red:#b8282d;
  --di-red-dark:#8f1d22;
  --primary:#b8282d;
}
body.xm ::selection{background:var(--di-red);color:#fff}

/* ---------- Barra messaggio in alto ---------- */
body.xm-on-bar{--xm-bar-h:36px}
html.xm-bar-closed body.xm-on-bar{--xm-bar-h:0px}
html.xm-bar-closed .xm-bar{display:none}
.xm-bar{position:fixed;top:0;left:0;right:0;z-index:1002;height:36px;display:flex;align-items:center;justify-content:center;
  padding:0 44px;background:linear-gradient(90deg,var(--xm-green-d),var(--xm-green) 50%,var(--xm-green-d));color:#fff;
  font:600 13px/1 var(--di-body);letter-spacing:.02em;box-shadow:0 2px 10px rgba(0,0,0,.18)}
.xm-bar p{margin:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.xm-bar a{color:#fff!important;text-decoration:none}
.xm-bar a:hover{color:var(--di-gold)!important;text-decoration:underline;text-underline-offset:3px}
.xm-bar-star{color:var(--xm-gold)}
.xm-bar-x{position:absolute;right:max(6px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);width:32px;height:32px;
  border:0;border-radius:50%;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer}
.xm-bar-x:hover{background:rgba(255,255,255,.15)}
.xm-bar :focus-visible{outline-color:var(--di-gold)}
@media(max-width:600px){.xm-bar{font-size:12px;padding:0 40px 0 12px;justify-content:flex-start}}

/* spazio per la barra: header fisso e contenuto scendono di --xm-bar-h */
body.xm .topbar{top:var(--xm-bar-h)}
body.xm .wp-site-blocks{padding-top:var(--xm-bar-h)}
html:has(body.xm-on-bar){scroll-padding-top:calc(90px + 36px)}
html.xm-bar-closed:has(body.xm-on-bar){scroll-padding-top:90px}
body.xm .menu-index{top:calc(72px + var(--xm-bar-h))}

/* ---------- Lucine ---------- */
.xm-lights{position:fixed;left:0;right:0;top:var(--xm-bar-h);height:30px;z-index:1001;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='30' viewBox='0 0 96 30'%3E%3Cpath d='M0 4 Q24 14 48 4 T96 4' fill='none' stroke='%233a2a20' stroke-width='1.6'/%3E%3Crect x='9.5' y='6.75' width='5' height='4' rx='1' fill='%235b4636'/%3E%3Cellipse cx='12' cy='16.75' rx='4.2' ry='6.2' fill='%23e53935'/%3E%3Cellipse cx='10.6' cy='14.75' rx='1.2' ry='2.2' fill='%23fff' fill-opacity='.55'/%3E%3Crect x='33.5' y='6.75' width='5' height='4' rx='1' fill='%235b4636'/%3E%3Cellipse cx='36' cy='16.75' rx='4.2' ry='6.2' fill='%23ffc93c'/%3E%3Cellipse cx='34.6' cy='14.75' rx='1.2' ry='2.2' fill='%23fff' fill-opacity='.55'/%3E%3Crect x='57.5' y='6.75' width='5' height='4' rx='1' fill='%235b4636'/%3E%3Cellipse cx='60' cy='16.75' rx='4.2' ry='6.2' fill='%232ecc71'/%3E%3Cellipse cx='58.6' cy='14.75' rx='1.2' ry='2.2' fill='%23fff' fill-opacity='.55'/%3E%3Crect x='81.5' y='6.75' width='5' height='4' rx='1' fill='%235b4636'/%3E%3Cellipse cx='84' cy='16.75' rx='4.2' ry='6.2' fill='%234fc3f7'/%3E%3Cellipse cx='82.6' cy='14.75' rx='1.2' ry='2.2' fill='%23fff' fill-opacity='.55'/%3E%3C/svg%3E") repeat-x 0 0/96px 30px}
.xm-lights::before,.xm-lights::after{content:"";position:absolute;inset:0;background-repeat:repeat-x;background-size:96px 30px;animation:xm-twinkle 2.4s ease-in-out infinite}
.xm-lights::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='30' viewBox='0 0 96 30'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23e53935' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%23e53935' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23ffc93c' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%23ffc93c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%232ecc71' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%232ecc71' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g3'%3E%3Cstop offset='0' stop-color='%234fc3f7' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%234fc3f7' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='16.75' r='11' fill='url(%23g0)'/%3E%3Ccircle cx='60' cy='16.75' r='11' fill='url(%23g2)'/%3E%3C/svg%3E")}
.xm-lights::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='30' viewBox='0 0 96 30'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23e53935' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%23e53935' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23ffc93c' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%23ffc93c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%232ecc71' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%232ecc71' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g3'%3E%3Cstop offset='0' stop-color='%234fc3f7' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%234fc3f7' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='36' cy='16.75' r='11' fill='url(%23g1)'/%3E%3Ccircle cx='84' cy='16.75' r='11' fill='url(%23g3)'/%3E%3C/svg%3E");animation-delay:-1.2s}
@keyframes xm-twinkle{0%,100%{opacity:.15}50%{opacity:1}}
@media(max-width:600px){.xm-lights{transform:scale(.8);transform-origin:top center;left:-12%;right:-12%}}

/* ---------- Neve (canvas creato da xmas.js) ---------- */
.xm-snow{position:fixed;inset:0;width:100%;height:100%;z-index:999;pointer-events:none}
html.xm-snow-off .xm-snow{display:none}
.xm-snow-btn{position:fixed;left:68px;bottom:max(15px,env(safe-area-inset-bottom));z-index:9990;width:44px;height:44px;border-radius:50%;
  border:2px solid rgba(255,255,255,.85);background:var(--xm-green);color:#fff;font-size:20px;line-height:1;cursor:pointer;
  box-shadow:0 3px 10px rgba(0,0,0,.2);transition:transform .25s,opacity .25s}
.xm-snow-btn:hover{transform:scale(1.08)}
html.xm-snow-off .xm-snow-btn{opacity:.6;background:#6b6b6b}
html.xm-snow-off .xm-snow-btn::after{content:"";position:absolute;left:50%;top:8px;bottom:8px;width:2px;background:#fff;transform:rotate(45deg)}

/* ---------- Cappello di Babbo Natale sul logo ---------- */
body.xm-on-hat :is(.brand a,.nav-brand){position:relative}
body.xm-on-hat .brand a::before,body.xm-on-hat .nav-brand::before{content:"";position:absolute;z-index:2;pointer-events:none;
  left:-9px;top:-15px;width:36px;height:30px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='36' viewBox='0 0 44 36'%3E %3Cpath d='M5 27 C8 13 18 3 31 4 C36 5 39 10 38 17 L34 15 C31 11 27 11 23 14 C17 19 15 23 15 27 Z' fill='%23d32f2f'/%3E %3Cpath d='M12 26 C15 16 22 9 30 8' fill='none' stroke='%239f1c1c' stroke-width='1.4' stroke-opacity='.5'/%3E %3Crect x='1' y='24' width='29' height='9' rx='4.5' fill='%23fff'/%3E%3Ccircle cx='37' cy='18' r='5' fill='%23fff'/%3E%3C/svg%3E") no-repeat center/contain;transform:rotate(-16deg);
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
body.xm-on-hat .nav-brand::before{left:-8px;top:-13px;width:32px;height:26px}

/* ---------- Header ---------- */
body.xm .topbar.is-scrolled{background:rgba(253,248,243,.94);box-shadow:0 6px 24px rgba(43,30,22,.08),inset 0 -3px 0 var(--xm-green)}
body.xm .topbar-book::before{content:"❄";margin-right:7px;font-size:13px;opacity:.9}
@media(max-width:360px){body.xm .topbar-book::before{display:none}}

/* ---------- Menu a tutto schermo ---------- */
body.xm .menu-overlay{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%238a6d5a' stroke-opacity='.12' stroke-width='1.6' stroke-linecap='round'%3E %3Cg transform='translate(36 40)'%3E%3Cpath d='M0-14V14M-12-7 12 7M-12 7 12-7M-4-10 0-6 4-10M-4 10 0 6 4 10'/%3E%3C/g%3E %3Cg transform='translate(118 112) scale(.7)'%3E%3Cpath d='M0-14V14M-12-7 12 7M-12 7 12-7M-4-10 0-6 4-10M-4 10 0 6 4 10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0/160px 160px,radial-gradient(circle at 20% 10%,#fffaf3 0,#f1e4d6 60%)}
body.xm .menu-nav a.menu-cta{background:var(--di-red)}
body.xm .menu-nav a.menu-cta::before{content:"🎄";margin-right:8px}
body.xm .nav-main a::after{color:var(--xm-green)}
body.xm .nav-quick a{background:var(--xm-green-d)}

/* ---------- Pulsanti ---------- */
body.xm .btn-light:hover{background:var(--xm-gold)}
body.xm :is(.btn-primary,.topbar-book,.menu-nav a.menu-cta){box-shadow:0 8px 22px rgba(184,40,45,.3)}

/* ---------- Home ---------- */
body.xm .hero::after{background:linear-gradient(to bottom,rgba(18,63,39,.55),rgba(0,0,0,.82))}
body.xm .hero h1{text-shadow:0 2px 24px rgba(233,185,73,.35)}
body.xm .homepage .parallax::after{background:linear-gradient(rgba(18,63,39,.72),rgba(10,20,14,.78))}
body.xm .homepage .section.cta::after{background:linear-gradient(rgba(18,63,39,.6),rgba(20,17,15,.8))}
body.xm .homepage .feature h3{color:var(--xm-green)}
/* piccolo ornamento sotto i titoli di sezione su sfondo chiaro */
body.xm .homepage .section:not(.parallax):not(.cta) h2::after,
body.xm .di-page-hero h1::after{content:"";display:block;width:74px;height:4px;margin-top:14px;border-radius:2px;
  background:linear-gradient(90deg,var(--di-red) 0 33%,var(--xm-gold) 33% 66%,var(--xm-green) 66%)}
body.xm .di-page-hero h1::after{margin:16px auto 0}

/* ---------- Menu e Lounas ---------- */
body.xm .menu-price{background:var(--xm-green-l);color:var(--xm-green-d)}
body.xm .menu-item:hover{border-color:rgba(29,92,58,.25)}
body.xm .lounas-day-header{background:var(--xm-green-d)}
body.xm .lounas-section.is-today .lounas-day-header{background:var(--di-red)}

/* ---------- Footer: verde abete con neve sul bordo ---------- */
body.xm .footer-di{position:relative;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.07' stroke-width='1.6' stroke-linecap='round'%3E %3Cg transform='translate(36 40)'%3E%3Cpath d='M0-14V14M-12-7 12 7M-12 7 12-7M-4-10 0-6 4-10M-4 10 0 6 4 10'/%3E%3C/g%3E %3Cg transform='translate(118 112) scale(.7)'%3E%3Cpath d='M0-14V14M-12-7 12 7M-12 7 12-7M-4-10 0-6 4-10M-4 10 0 6 4 10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0/160px 160px,linear-gradient(180deg,var(--xm-green-d),#0c2b1b)}
body.xm .footer-di::before{content:"";position:absolute;left:0;right:0;top:-1px;height:24px;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='26' viewBox='0 0 240 26' preserveAspectRatio='none'%3E%3Cpath d='M0 0H240V9Q228 22 210 13Q194 4 176 15Q160 25 140 13Q124 4 106 14Q90 24 70 12Q54 4 36 15Q18 24 0 11Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x 0 0/240px 24px}
body.xm .footer-di h4{color:var(--xm-gold)}
body.xm .footer-di a{color:#fdf8f3}

/* ---------- Accessibilità e stampa ---------- */
@media (prefers-reduced-motion:reduce){
  .xm-lights::before,.xm-lights::after{animation:none;opacity:.7}
  .xm-snow,.xm-snow-btn{display:none!important}
}
@media print{.xm-bar,.xm-lights,.xm-snow,.xm-snow-btn{display:none!important}body.xm .topbar{top:0}body.xm .wp-site-blocks{padding-top:0}}
