/* ==========================================================
   DRIVEIN MOBILE APP MODULE  v20.0-mobile-clean
   Theme: Drive In
   Auto-attivo via media query <= 768px.
   Sostituisce TUTTE le precedenti regole mobile (v18-v19.4)
   ========================================================== */
:root {
  --mapp-header-h: 56px;
  --mapp-tabbar-h: 56px;
  --mapp-fab-bottom: calc(var(--mapp-tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  --mapp-z-content: 1;
  --mapp-z-sticky: 50;
  --mapp-z-fixed: 100;
  --mapp-z-fab: 999;
  --mapp-z-drawer: 9000;
  --mapp-z-modal: 9500;
  --mapp-z-toast: 9700;
  --mapp-bg: #ffffff;
  --mapp-ink: #1F2937;
  --mapp-bd: rgba(0,0,0,0.06);
  --mapp-accent: #E8487F;
  --mapp-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* ============= MOBILE ONLY ============= */
@media (max-width: 768px) {

  /* RESET ROOT */
  html, body {
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }
  html { height: 100%; }
  body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: var(--mapp-bg);
    color: var(--mapp-ink);
  }
  body.mapp-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }

  /* Hide desktop chrome that previously bled into mobile */
  .lb, .lb-ov, .di-ovly, .lb-mob-only-trigger { display: none !important; }

  body.mapp-shell {
    padding-top: calc(var(--mapp-header-h) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--mapp-tabbar-h) + env(safe-area-inset-bottom, 0px));
  }

  .mapp-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(var(--mapp-header-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    z-index: var(--mapp-z-fixed);
    background: var(--mapp-bg);
    border-bottom: 1px solid var(--mapp-bd);
    display: flex;
    align-items: center;
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
  }

  .mapp-header__brand {
    flex: 1;
    font-weight: 700;
    font-size: 16px;
    color: var(--mapp-ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mapp-header__brand img,
  .mapp-header__brand svg { height: 28px; width: auto; }
  .mapp-header__action {
    background: transparent;
    border: none;
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mapp-ink);
    border-radius: 50%;
  }
  .mapp-header__action:active { background: rgba(0,0,0,0.06); }
  .mapp-header__action svg { width: 22px; height: 22px; }

  /* ============= TAB BAR (fixed bottom) ============= */
  .mapp-tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--mapp-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: var(--mapp-z-fixed);
    background: var(--mapp-bg);
    border-top: 1px solid var(--mapp-bd);
    display: flex;
    align-items: stretch;
    box-shadow: 0 -1px 0 rgba(0,0,0,0.02);
  }
  .mapp-tabbar > a,
  .mapp-tabbar > button {
    /* v22.0-bazarai-flow-fix: tabbar height 56px, compact items */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #6B7280;
    background: transparent;
    border: none;
    padding: 4px 0 2px;
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: .2px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    min-height: 44px;
  }

  .mapp-tabbar > a.is-active,
  .mapp-tabbar > button.is-active { color: var(--mapp-accent); }
  .mapp-tabbar > a:active,
  .mapp-tabbar > button:active { background: rgba(0,0,0,0.04); }
  .mapp-tabbar svg { width: 22px; height: 22px; }
  .mapp-main { min-height: calc(100vh - var(--mapp-header-h) - var(--mapp-tabbar-h)); }

  .mapp-drawer {
    position: fixed;
    inset: 0;
    z-index: var(--mapp-z-drawer);
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity .22s ease-out, visibility .22s ease-out;
  }
  .mapp-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }
  .mapp-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .mapp-drawer__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 86vw);
    background: var(--mapp-bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .22s ease-out;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    padding: 56px 16px 24px;
  }
  .mapp-drawer.is-open .mapp-drawer__panel { transform: translateX(0); }
  .mapp-drawer__close {
    position: absolute;
    top: 8px; right: 8px;
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--mapp-ink);
    border-radius: 50%;
  }
  .mapp-drawer__close:active { background: rgba(0,0,0,0.06); }

  /* ============= MODAL FULLSCREEN ============= */
  .mapp-modal {
    position: fixed;
    inset: 0;
    z-index: var(--mapp-z-modal);
    background: var(--mapp-bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: transform .25s ease-out, opacity .2s ease-out, visibility .25s;
  }
  .mapp-modal.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .mapp-modal__close {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 8px;
    width: 44px; height: 44px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: calc(var(--mapp-z-modal) + 1);
  }

  /* ============= BAZARAI CHAT WIDGET ============= */
  .mapp-bazarai-fab {
    position: fixed;
    right: 16px;
    bottom: var(--mapp-fab-bottom);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #E8487F);
    color: #fff;
    border: none;
    box-shadow: var(--mapp-shadow);
    cursor: pointer;
    z-index: var(--mapp-z-fab);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mapp-bazarai-fab svg { width: 26px; height: 26px; }
  .mapp-bazarai-fab:active { transform: scale(0.95); }

  .mapp-bazarai {
    position: fixed;
    inset: 0;
    z-index: var(--mapp-z-modal);
    background: var(--mapp-bg);
    transform: translateY(100%);
    transition: transform .25s ease-out;
    display: flex;
    flex-direction: column;
    visibility: hidden;
  }

  .mapp-bazarai.is-open {
    transform: translateY(0);
    visibility: visible;
  }
  .mapp-bazarai__head {
    height: calc(var(--mapp-header-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--mapp-bg);
    border-bottom: 1px solid var(--mapp-bd);
    display: flex;
    align-items: center;
    padding-left: 16px;
    padding-right: 8px;
    flex-shrink: 0;
  }
  .mapp-bazarai__title {
    flex: 1;
    font-weight: 700;
    font-size: 16px;
    color: var(--mapp-ink);
  }
  .mapp-bazarai__close {
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--mapp-ink);
    border-radius: 50%;
    flex-shrink: 0;
  }
  .mapp-bazarai__close:active { background: rgba(0,0,0,0.06); }

  .mapp-bazarai__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background: #F9FAFB;
  }
  .mapp-bazarai__foot {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--mapp-bd);
    background: var(--mapp-bg);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
  }
  .mapp-bazarai__input {
    flex: 1;
    border: 1px solid var(--mapp-bd);
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 16px;
    background: #F3F4F6;
    color: var(--mapp-ink);
    -webkit-appearance: none;
  }
  .mapp-bazarai__send {
    width: 44px; height: 44px;
    background: var(--mapp-accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
  }

  /* ============= COMPATIBILITY OVERRIDES (legacy widget tags) ============= */
  /* Forza la chiusura sui vecchi BazarAI widget esistenti */
  .di-craft-chat-panel,
  .bazarai-panel,
  .di-bazarai-panel { display: none !important; }
  .di-craft-chat__close,
  .bazarai-close,
  [data-bazarai-close] {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* ============= GLOBAL TOUCH/UX RULES ============= */
  a, button,
  input[type="submit"],
  input[type="button"],
  .btn, .cta {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  textarea,
  select { font-size: 16px !important; }

  /* CARD GRIDS → STACK */
  .card-grid,
  .product-grid,
  .pricing-cards,
  .di-cards-grid,
  .di-grid-3,
  .di-grid-4,
  .di-services-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* HIDE DESKTOP-ONLY / SHOW MOBILE-ONLY */
  .desktop-only,
  .di-desktop-only,
  .hide-mobile { display: none !important; }
  .mobile-only,
  .di-mobile-only,
  .show-mobile { display: revert !important; }

  /* SCROLL FIX: garantisce che main / front-page / pagine WP scrollino */
  main, .site-main, .di-app, .app, #content, #primary {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.modello-c { overflow-y: auto !important; height: auto !important; }
  body.lb-mob { overflow-y: auto !important; height: auto !important; position: static !important; }
  body.sb-on { overflow: hidden !important; }

  .lk-cb, .di-cookie-banner { z-index: var(--mapp-z-toast) !important; }
  .bnav, .di-bnav { display: none !important; }

  .site-header, .di-topbar, .di-header, .di-header-wired, .lb-mob-bar { display: none !important; }

  h1 { font-size: 28px !important; line-height: 1.2; }
  h2 { font-size: 22px !important; line-height: 1.25; }
  h3 { font-size: 18px !important; line-height: 1.3; }
  p, li { font-size: 15px; line-height: 1.55; }
  iframe { max-width: 100% !important; }
}

@media (min-width: 769px) {
  .mapp-header, .mapp-tabbar, .mapp-bazarai-fab,
  .mapp-bazarai, .mapp-drawer, .mapp-modal { display: none !important; }
}
/* === END MOBILE APP MODULE v20.0 === */

/* ============= POST-LOGIN APP CONTAINER (modello-c) MOBILE ============= */
@media (max-width: 768px) {
  body.modello-c .app {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    padding-top: calc(var(--mapp-header-h) + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(var(--mapp-tabbar-h) + 60px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.modello-c .lb,
  body.modello-c .lb-ov,
  body.modello-c .sb { display: none !important; }
  body.modello-c .ctr {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (max-width: 768px) {
  body.modello-c .in-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--mapp-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 95 !important;
    background: var(--mapp-bg) !important;
    border-top: 1px solid var(--mapp-bd) !important;
    padding: 8px 12px !important;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04) !important;
  }
  body.modello-c .ch-scroll {
    height: auto !important;
    padding-bottom: 100px !important;
  }
}
/* === DRIVEIN MOBILE APP v21.0 — BAZARAI COHERENCE PATCH (FIX 1,3,6,7,2,4) === */
:root{--mapp-ink-2:#6B7280;--mapp-bd-2:rgba(0,0,0,0.10);--mapp-accent-2:#7c3aed;--mapp-bazarai-dk1:#1a0030;--mapp-bazarai-dk2:#2d0050;--mapp-shadow-lg:0 24px 60px -20px rgba(0,0,0,0.32)}
@media (max-width:768px){
.mapp-bazarai{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;height:78dvh!important;max-height:720px!important;border-radius:18px 18px 0 0!important;box-shadow:0 -12px 40px rgba(0,0,0,.25)!important;transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1);visibility:hidden;display:flex;flex-direction:column;overflow:hidden;background:#fff;z-index:9500}
.mapp-bazarai.is-open{transform:translateY(0);visibility:visible}
.mapp-bazarai-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:9499;opacity:0;visibility:hidden;transition:opacity .22s,visibility .22s}
.mapp-bazarai-backdrop.is-open{opacity:1;visibility:visible}
.mapp-bazarai__handle{position:relative;height:18px;flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:pan-y}
.mapp-bazarai__handle::before{content:"";width:40px;height:4px;border-radius:2px;background:rgba(255,255,255,.3)}
.mapp-bazarai__head{height:auto!important;padding:6px 16px 12px!important;background:linear-gradient(135deg,#1a0030,#2d0050)!important;color:#fff!important;border-bottom:1px solid rgba(255,255,255,.08)!important;display:flex!important;align-items:center;gap:10px;flex-shrink:0}
.mapp-bazarai__icon{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#E8487F,#ff7aaf);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px rgba(232,72,127,.35)}
.mapp-bazarai__icon svg{width:20px;height:20px;color:#fff}
.mapp-bazarai__title-wrap{flex:1;min-width:0}
.mapp-bazarai__title{font-weight:700;font-size:16px;color:#fff;line-height:1.1;letter-spacing:-.01em}
.mapp-bazarai__sub{font-size:11.5px;color:rgba(255,255,255,.7);margin-top:2px}
.mapp-bazarai__close{width:36px!important;height:36px!important;background:rgba(255,255,255,.08)!important;border:none;font-size:22px;line-height:1;cursor:pointer;color:#fff!important;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;transition:background .12s}
.mapp-bazarai__close:active{background:rgba(255,255,255,.18)!important}
.mapp-bazarai__body{flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:14px 14px 12px;background:#fbfbfd;scroll-behavior:smooth}
.mapp-bazarai__msg{display:block;border-radius:14px;padding:12px 14px;max-width:86%;margin-bottom:8px;font-size:14px;line-height:1.45;word-wrap:break-word;box-shadow:0 1px 2px rgba(0,0,0,.04);animation:mapp-msgin .22s ease both}
@keyframes mapp-msgin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.mapp-bazarai__msg--bot{background:#fff;color:#1F2937;border:1px solid rgba(0,0,0,.06);margin-right:auto;border-top-left-radius:4px}
.mapp-bazarai__msg--user{background:linear-gradient(135deg,#1a0030,#2d0050);color:#fff;margin-left:auto;border-top-right-radius:4px}
.mapp-bazarai__chips{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 14px;margin-right:auto;max-width:92%;animation:mapp-msgin .26s ease both}
.mapp-bazarai__chips>button{border:1px solid #E8487F;color:#E8487F;background:rgba(232,72,127,.06);font-size:13px;font-weight:600;border-radius:999px;padding:8px 14px;cursor:pointer;font-family:inherit;min-height:36px;transition:background .12s,transform .08s;line-height:1.2}
.mapp-bazarai__chips>button:active{background:#E8487F;color:#fff;transform:scale(.97)}
.mapp-bazarai__chips--stacked{flex-direction:column;align-items:stretch}
.mapp-bazarai__chips--stacked>button{width:100%;padding:12px 16px;font-size:14px;min-height:44px}
.mapp-bazarai__send{background:linear-gradient(135deg,#1a0030,#E8487F)!important}
.mapp-bazarai-fab{background:linear-gradient(135deg,#1a0030,#2d0050)!important;border:2px solid rgba(232,72,127,.35)!important;box-shadow:0 12px 32px -10px rgba(232,72,127,.5),0 4px 12px rgba(0,0,0,.18)!important;position:relative}
.mapp-bazarai-fab::after{content:"";position:absolute;inset:-3px;border-radius:50%;background:radial-gradient(circle,rgba(232,72,127,.35),transparent 70%);z-index:-1;animation:mapp-pulse 2.4s ease-in-out infinite}
@keyframes mapp-pulse{0%,100%{opacity:.6;transform:scale(1)}50%{opacity:.95;transform:scale(1.08)}}
.di-craft-chat,.di-craft-chat-panel{display:none!important}
}
/* === FIX 6 — DRAWER APP-QUALITY === */
@media (max-width:768px){
.mapp-drawer__panel{width:min(280px,86vw)!important;padding:0!important;display:flex;flex-direction:column;transition:transform .26s cubic-bezier(.2,.8,.2,1)!important;box-shadow:-8px 0 32px rgba(0,0,0,.20)!important}
.mapp-drawer__hdr{background:linear-gradient(135deg,#fafafa,#f3f4f6);padding:18px 16px 16px;padding-top:calc(18px + env(safe-area-inset-top,0px));padding-right:56px;border-bottom:1px solid rgba(0,0,0,.06);display:flex;align-items:center;gap:12px}
.mapp-drawer__avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#7c3aed,#E8487F);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;flex-shrink:0;box-shadow:0 2px 8px rgba(232,72,127,.25)}
.mapp-drawer__hdr-text{flex:1;min-width:0}
.mapp-drawer__hdr-name{font-weight:700;font-size:15px;color:#1F2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mapp-drawer__hdr-sub{font-size:12px;color:#6B7280;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mapp-drawer__nav{display:flex!important;flex-direction:column!important;padding:8px 0 24px!important;gap:0!important}
.mapp-drawer__section{padding:8px 0}
.mapp-drawer__section + .mapp-drawer__section{border-top:1px solid rgba(0,0,0,.06)}
.mapp-drawer__sect-title{padding:10px 16px 6px;font-size:11px;font-weight:700;color:#6B7280;text-transform:uppercase;letter-spacing:.06em}
.mapp-drawer__item{display:flex!important;align-items:center;gap:12px;padding:12px 16px!important;color:#1F2937!important;text-decoration:none;font-weight:500;font-size:15px;transition:background .12s,transform .08s;min-height:48px;border:none;background:transparent!important;cursor:pointer;width:100%;text-align:left;font-family:inherit;border-radius:0!important}
.mapp-drawer__item:active{background:rgba(0,0,0,.04)!important;transform:scale(.985)}
.mapp-drawer__item.is-active{background:rgba(232,72,127,.08)!important;color:#E8487F!important;font-weight:600}
.mapp-drawer__item.is-active .mapp-drawer__item-ic{color:#E8487F}
.mapp-drawer__item-ic{width:22px;height:22px;flex-shrink:0;color:#6B7280;display:inline-flex;align-items:center;justify-content:center}
.mapp-drawer__item-ic svg{width:22px;height:22px}
.mapp-drawer__item-lbl{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mapp-drawer__item-chev{width:16px;height:16px;color:rgba(0,0,0,.18);flex-shrink:0}
.mapp-drawer__item-badge{background:#E8487F;color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:10px;flex-shrink:0}
.mapp-drawer__item--danger{color:#b91c1c!important}
.mapp-drawer__item--danger .mapp-drawer__item-ic{color:#b91c1c}
body.mapp-drawer-open .mapp-header__action[data-mapp-drawer-open] svg{transform:rotate(90deg);transition:transform .25s ease}
}
/* === FIX 3 — IFRAME SCROLL CONTAINMENT === */
@media (max-width:768px){
body.hf-embed,body.hf-embed html{overflow:hidden!important;height:100dvh!important}
body.hf-embed #app{height:100dvh;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding-bottom:88px}
body.hf-embed .preview-pane{position:static!important}
body.hf-embed iframe.iframe{height:56dvh!important;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
iframe[src*="/hello/"]{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
}
/* === FIX 2/4 — HF PRICING BAR COMPACT + FRECCE INTEGRATE === */
.hf-pricing-bar{position:sticky;bottom:0;left:0;right:0;z-index:70;background:linear-gradient(135deg,#1a0030,#2d0050);color:#fff;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));box-shadow:0 -8px 24px -8px rgba(0,0,0,.4);min-height:64px;max-height:80px;font-family:inherit;border-radius:14px 14px 0 0}
.hf-pricing-bar__nav{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18);color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s,transform .1s}
.hf-pricing-bar__nav:active:not(:disabled){background:rgba(255,255,255,.22);transform:scale(.94)}
.hf-pricing-bar__nav:disabled{opacity:.35;cursor:not-allowed}
.hf-pricing-bar__nav svg{width:20px;height:20px}
.hf-pricing-bar__center{display:flex;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.05}
.hf-pricing-bar__price{font-size:22px;font-weight:700;letter-spacing:-.02em;color:#fff}
.hf-pricing-bar__meta{font-size:11px;font-weight:500;color:rgba(255,255,255,.65);margin-top:2px;display:flex;gap:6px;align-items:center}
.hf-pricing-bar__meta strong{color:rgba(255,255,255,.85);font-weight:600}
.hf-pricing-bar__cta{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,#E8487F,#ff7aaf);color:#fff;border:none;font-weight:700;font-size:14px;padding:11px 16px;border-radius:22px;cursor:pointer;font-family:inherit;min-height:44px;box-shadow:0 6px 18px -6px rgba(232,72,127,.55);transition:transform .1s}
.hf-pricing-bar__cta:disabled{opacity:.5;cursor:not-allowed}
.hf-pricing-bar__cta:active:not(:disabled){transform:scale(.97)}
.hf-pricing-bar__cta svg{width:16px;height:16px}
.hf-pricing-bar__cta-label{display:inline}
@media (max-width:768px){
.hf-pricing-bar{grid-template-columns:40px 1fr 40px;gap:8px;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px))}
.hf-pricing-bar__nav{width:40px;height:40px}
.hf-pricing-bar__price{font-size:20px}
.hf-pricing-bar__cta{width:40px;height:40px;padding:0;border-radius:50%;justify-content:center}
.hf-pricing-bar__cta-label{display:none}
.hf-pricing-bar__cta svg{width:18px;height:18px}
}
@media (min-width:769px){
.hf-pricing-bar{max-width:720px;margin:18px auto 0;border-radius:20px;position:sticky;bottom:18px}
}
/* === END v21.0 === */
/* === FIX C/D — HOME SCROLL + HEADER PADDING === */
@media (max-width:768px){
html,body{overflow-y:auto!important;height:auto!important}
body.modello-c,body.lb-mob,body.sb-on{overflow-y:auto!important;height:auto!important;position:static!important}
.app,.ctr,.ch-scroll,.ch-inner,#primary,#content,.site-main{height:auto!important;min-height:0!important;overflow:visible!important;position:static!important}
body.mapp-shell{padding-top:calc(var(--mapp-header-h,56px) + 8px + env(safe-area-inset-top,0px))!important}
.di-bc,.di-craft-banner,.di-craft-banner--app{margin-top:8px!important}
}
/* === FIX A — Logo solo icona === */
@media (max-width:768px){
.mapp-header__brand span{display:none!important}
.mapp-header__brand img{height:32px!important;width:32px!important;object-fit:contain}
.mapp-header__brand{flex:0 0 auto!important;gap:0!important}
}
/* === FIX B — Sparkles inutile reso funzionale BazarAI === */
@media (max-width:768px){
.magnetic-decor,.sparkles-deco{display:none!important}
}
/* === FIX E — Drawer link.lan.ga pattern === */
@media (max-width:768px){
.mapp-drawer__brand{display:flex;align-items:center;gap:10px;flex:1}
.mapp-drawer__brand img{width:28px;height:28px}
.mapp-drawer__brand-name{font-family:"Instrument Serif",serif;font-size:18px;color:#1F2937}
.mapp-drawer__lang{display:flex;gap:4px;background:rgba(0,0,0,.04);border-radius:10px;padding:4px;margin:6px 16px}
}
@media (max-width:768px){
.mapp-drawer__lang button{flex:1;padding:8px 0;border:none;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer;background:transparent;color:#6B7280;transition:all .15s}
.mapp-drawer__lang button.is-on{background:#fff;color:#1F2937;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.mapp-drawer__status{margin:12px 16px 0;padding:10px 12px;background:rgba(34,197,94,.08);border:1px solid rgba(34,197,94,.2);border-radius:10px;color:#166534;font-size:12px;display:flex;align-items:center;gap:8px}
.mapp-drawer__cta{margin:14px 16px calc(20px + env(safe-area-inset-bottom,0px));display:block;text-align:center;padding:14px 18px;background:linear-gradient(135deg,#1a0030,#E8487F);color:#fff;text-decoration:none;font-weight:700;border-radius:999px;font-size:14px}
}
/* === END v21.0 PATCH === */
/* === v21.1-final FIX 1 HEADER + FIX 2 FOOTER === */
@media (max-width:768px){
.home-nav{display:none!important}
.home-wrap{height:auto!important;min-height:100dvh;overflow:visible!important}
.home-page,body.home-page{overflow-y:auto!important;height:auto!important}
.home-footer-top,.home-footer-divider,.home-footer-mid .home-footer-links{display:none!important}
.home-footer{padding:0!important;background:transparent!important;border:none!important;flex-shrink:0}
.home-footer-mid{padding:12px 16px calc(80px + env(safe-area-inset-bottom,0px))!important;justify-content:center!important;text-align:center!important;flex-direction:column!important;gap:4px!important}
.home-footer-center{font-size:11px!important;color:#9ca3af!important;text-align:center!important;white-space:normal!important}
.di-craft-chat,.di-craft-chat-btn,.di-craft-chat-panel{display:none!important;visibility:hidden!important;pointer-events:none!important}
#lai-fab,#lai-panel{display:none!important;visibility:hidden!important;pointer-events:none!important}
.lk-cb,.di-cookie-banner{z-index:9990!important}
}
/* === v21.1-final FIX 3 BAZARAI PALETTE BAZAR RED === */
@media (max-width:768px){
.mapp-bazarai__head{background:linear-gradient(135deg,#EF4444,#b91c1c)!important}
.mapp-bazarai__icon{background:linear-gradient(135deg,#fff,#fee2e2)!important;box-shadow:0 4px 12px rgba(239,68,68,.45)!important}
.mapp-bazarai__icon svg{color:#b91c1c!important}
.mapp-bazarai__msg--user{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;color:#fff!important}
.mapp-bazarai__chips>button{border-color:#EF4444!important;color:#EF4444!important;background:rgba(239,68,68,.06)!important}
.mapp-bazarai__chips>button:active{background:#EF4444!important;color:#fff!important}
.mapp-bazarai__send{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;color:#fff!important}
.mapp-bazarai-fab{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;border:2px solid rgba(239,68,68,.45)!important;box-shadow:0 12px 32px -10px rgba(239,68,68,.55),0 4px 12px rgba(0,0,0,.18)!important}
.mapp-bazarai-fab::after{background:radial-gradient(circle,rgba(239,68,68,.35),transparent 70%)!important}
.mapp-drawer__avatar{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;box-shadow:0 2px 8px rgba(239,68,68,.25)!important}
.mapp-drawer__item.is-active{background:rgba(239,68,68,.08)!important;color:#EF4444!important}
.mapp-drawer__item.is-active .mapp-drawer__item-ic{color:#EF4444!important}
.mapp-drawer__item-badge{background:#EF4444!important}
.mapp-drawer__cta{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;color:#fff!important}
}
/* === v21.1-final FIX 4 IFRAME HELLO MOBILE === */
@media (max-width:768px){
body.hf-embed iframe.iframe,body.hf-embed iframe[src*="/hello/"],body.hf-embed .preview-pane iframe{width:100%!important;height:60dvh!important;max-height:60vh!important;display:block!important;visibility:visible!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;border:1px solid rgba(0,0,0,.10)!important;border-radius:8px!important;touch-action:pan-y!important;background:#fff!important}
body.hf-embed .preview-pane,body.hf-embed .iframe-wrap,body.hf-embed .preview-iframe-wrap{display:block!important;visibility:visible!important;overflow:visible!important;height:auto!important;min-height:60dvh!important;position:static!important}
body.hf-embed #app{overflow:hidden!important;height:100dvh!important}
}
/* === END v21.1-final === */

/* === v21.3-cleanup PATCH === */
@media (max-width:768px){
.mapp-header{display:flex!important;align-items:center;justify-content:space-between!important;gap:8px;padding:0 16px!important}
.mapp-header__brand{flex:0 0 auto!important;display:inline-flex;align-items:center}
.mapp-header__spacer{flex:1 1 auto!important}
.mapp-header__action{flex:0 0 auto!important;margin-left:0!important}
}

/* Hello pill */
@media (max-width:768px){
.mapp-header__hello{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;background:linear-gradient(135deg,#EF4444,#b91c1c);color:#fff!important;text-decoration:none;border-radius:999px;font-weight:600;font-size:14px;line-height:1;box-shadow:0 4px 14px -6px rgba(239,68,68,.55);margin-right:4px;white-space:nowrap;min-height:36px}
.mapp-header__hello:active{transform:scale(.97)}
.mapp-header__hello-arrow{margin-left:2px}
.mapp-header__hello-label{color:#fff;font-weight:600}
}

/* Drawer Info clean (no icons) */
@media (max-width:768px){
.mapp-drawer__section--info .mapp-drawer__item.mapp-drawer__item--clean{padding:14px 16px!important;font-size:16px;font-weight:500;display:flex!important;align-items:center;gap:10px;min-height:48px}
.mapp-drawer__section--info .mapp-drawer__item-lbl{flex:1 1 auto;color:#1F2937;font-weight:500}
.mapp-drawer__section--info .mapp-drawer__item-chev{color:rgba(0,0,0,.25);width:14px;height:14px}
}

/* Lang select */
@media (max-width:768px){
.mapp-drawer__lang-wrap{position:relative;margin:6px 16px 14px;display:block}
.mapp-drawer__lang-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;width:100%;font-size:16px;font-weight:500;color:#1F2937;background:#fbfbfd;border:1px solid rgba(0,0,0,.10);border-radius:8px;padding:12px 38px 12px 14px;font-family:inherit;line-height:1.2;cursor:pointer;outline:none}
.mapp-drawer__lang-select:focus{border-color:#EF4444;box-shadow:0 0 0 3px rgba(239,68,68,.15)}
.mapp-drawer__lang-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:#6B7280}
}

/* FIX 6: bubble FAB visibile bottom-right */
@media (max-width:768px){
.mapp-bazarai-fab{position:fixed!important;right:16px!important;left:auto!important;bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;width:56px!important;height:56px!important;border-radius:50%!important;display:flex!important;align-items:center;justify-content:center;visibility:visible!important;opacity:1!important;z-index:9600!important;background:linear-gradient(135deg,#EF4444,#b91c1c)!important;border:2px solid rgba(239,68,68,.45)!important;box-shadow:0 4px 16px rgba(0,0,0,.15),0 12px 32px -10px rgba(239,68,68,.55)!important;color:#fff!important;cursor:pointer}
.mapp-bazarai-fab__inner{display:inline-flex;align-items:center;justify-content:center;color:#fff}
.mapp-bazarai-fab svg{width:24px;height:24px;color:#fff}
}

/* FIX 5: Sector meta chip alignment (Hello config front-page) */
.di-sector-meta{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:8px;padding:0 4px;align-items:center;line-height:1.3}
.di-sector-meta span{display:inline-flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:500;padding:3px 9px;border-radius:12px;border:1px solid;opacity:.85;white-space:nowrap;letter-spacing:.01em;min-height:22px;line-height:1}
@media (max-width:768px){
.di-sector-meta{gap:5px;justify-content:flex-start}
.di-sector-meta span{font-size:10px;padding:3px 8px;min-height:20px}
}

/* CRIT 2: copy-desktop / copy-mobile toggle */
.copy-desktop{display:inline}
.copy-mobile{display:none}
@media (max-width:768px){
.copy-desktop{display:none!important}
.copy-mobile{display:inline!important}
}

/* CRIT 3+4: BazarAI banner + CTA proposta — palette BAZAR red */
.di-craft-chat,.di-craft-chat-btn,.di-craft-chat-panel,.di-bazarai-prompt,.di-bazarai-prompt-bar{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;color:#fff!important;border-color:#EF4444!important}
.bai,.di-bc-btn.bai,a.di-bc-btn.bai,.bai svg,.bai *{color:#fff!important}
a.di-bc-btn.bai{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;border:none!important}
.sg.ai,button.sg.ai{background:linear-gradient(135deg,#EF4444,#b91c1c)!important;color:#fff!important;border:none!important}
.sg.ai:hover,button.sg.ai:hover{background:linear-gradient(135deg,#dc2626,#991b1b)!important}

/* CRIT 1: hide any legacy hamburger left-cluster on mobile shell */
@media (max-width:768px){
body.mapp-shell .lb-tog,
body.mapp-shell .bnav-toggle,
body.mapp-shell .menu-toggle,
body.mapp-shell .hamburger,
body.mapp-shell .lb-mob-toggle,
body.mapp-shell .di-craft-banner__menu,
body.mapp-shell aside.lb,
body.mapp-shell .lb,
body.mapp-shell .lb-ov{display:none!important;visibility:hidden!important;pointer-events:none!important}
}
/* === END v21.3-cleanup === */

/* ═══ DRIVE IN v21.5-finale — sector adaptive + FAB efruit pattern ═══ */
:root {
  --hello-pill-color: #EF4444;
  --hello-pill-color-dark: #b91c1c;
  --sector-accent: #EF4444;
}
body[data-sector="industria"]      { --hello-pill-color:#1F3A5F; --hello-pill-color-dark:#0f1d30; --sector-accent:#1F3A5F; }
body[data-sector="logistica"]      { --hello-pill-color:#F57C00; --hello-pill-color-dark:#b85f00; --sector-accent:#F57C00; }
body[data-sector="medicale"]       { --hello-pill-color:#0288D1; --hello-pill-color-dark:#01579b; --sector-accent:#0288D1; }
body[data-sector="agroalimentare"] { --hello-pill-color:#43A047; --hello-pill-color-dark:#2e7d32; --sector-accent:#43A047; }
body[data-sector="design"]         { --hello-pill-color:#7B1FA2; --hello-pill-color-dark:#4a148c; --sector-accent:#7B1FA2; }
body[data-sector="artigianato"]    { --hello-pill-color:#6D4C41; --hello-pill-color-dark:#4e342e; --sector-accent:#6D4C41; }
body[data-sector="servizi"]        { --hello-pill-color:#455A64; --hello-pill-color-dark:#263238; --sector-accent:#455A64; }
body[data-sector="turismo"]        { --hello-pill-color:#C62828; --hello-pill-color-dark:#8e0000; --sector-accent:#C62828; }

/* === Hello pill: adaptive color per sector === */
.mapp-header__hello,
body .mapp-header__hello {
  background: linear-gradient(135deg, var(--hello-pill-color), var(--hello-pill-color-dark)) !important;
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--hello-pill-color) 55%, transparent) !important;
  transition: background .35s ease, box-shadow .35s ease !important;
}

/* === Brand logo full-size adaptive (overrides previous 32x32 fav) === */
body .mapp-header__brand,
body .mapp-header__brand.di-brand-logo {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  height: auto !important;
}
body .mapp-header__brand img,
body #mapp-header__logo,
body .di-brand-logo__img {
  height: 34px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain !important;
  display: block !important;
  transition: opacity .35s ease, filter .35s ease !important;
}

/* === BazarAI FAB — efruit pattern adapted with BAZAR red (NON-adaptive) === */
#di-bazarblob-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9700;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
@media (max-width: 1023px) {
  #di-bazarblob-wrap {
    bottom: calc(var(--mapp-tabbar-h, 60px) + 12px + env(safe-area-inset-bottom, 0px));
  }
}
#di-bazarblob-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a4c93, #EF4444);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(106,76,147,.45);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  color: #fff;
}
#di-bazarblob-btn:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(106,76,147,.6); }
#di-bazarblob-btn:active { transform: scale(.95); }
.di-bazarblob-btn__pulse {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(106,76,147,.4);
  animation: diBlobPulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes diBlobPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: .5; }
}
#di-bazarblob-panel {
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  background: linear-gradient(160deg, #0a0014, #0d0018);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(106,76,147,.25);
  display: flex;
  flex-direction: column;
  animation: diPanelUp .25s cubic-bezier(.22,1,.36,1);
}
@keyframes diPanelUp { from { opacity:0; transform:translateY(12px) scale(.97) } to { opacity:1; transform:none } }
.di-bazarblob-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(239,68,68,.15);
  flex-shrink: 0;
}
.di-bazarblob-panel__title { display: flex; align-items: center; gap: 10px; }
.di-bazarblob-panel__dot {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0; position: relative; overflow: hidden;
}
.di-bazarblob-panel__dot canvas { width: 100%; height: 100%; display: block; }
.di-bazarblob-panel__name { font-size: .88rem; font-weight: 700; color: #fff; line-height: 1.1; }
.di-bazarblob-panel__sub { font-size: .68rem; letter-spacing: .06em; margin-top: 1px; color: rgba(255,255,255,.55); }
.di-bazarblob-panel__close {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); transition: background .15s, color .15s;
}
.di-bazarblob-panel__close:hover { background: rgba(255,255,255,.14); color: #fff; }
.di-bazarblob-panel__msgs {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: none; min-height: 100px; max-height: 240px;
}
.di-bazarblob-panel__msgs::-webkit-scrollbar { display: none; }
.di-bazarblob-msg { display: flex; }
.di-bazarblob-msg--ai { justify-content: flex-start; }
.di-bazarblob-msg--user { justify-content: flex-end; }
.di-bazarblob-msg__bubble {
  max-width: 85%; padding: 9px 13px;
  font-size: .82rem; line-height: 1.5;
  animation: diPanelUp .2s ease;
}
.di-bazarblob-msg--ai .di-bazarblob-msg__bubble {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(239,68,68,.2);
  color: rgba(255,255,255,.9);
  border-radius: 4px 12px 12px 12px;
}
.di-bazarblob-msg--user .di-bazarblob-msg__bubble {
  background: linear-gradient(135deg, #6a4c93, #EF4444);
  color: #fff;
  border-radius: 12px 4px 12px 12px;
}
.di-bazarblob-msg--loading .di-bazarblob-msg__bubble {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.4);
  font-style: italic;
  border-radius: 4px 12px 12px 12px;
}
.di-bazarblob-panel__input-row {
  display: flex; gap: 8px; padding: 10px 14px 14px;
  border-top: 1px solid rgba(239,68,68,.15);
  flex-shrink: 0; align-items: center;
}
.di-bazarblob-panel__inp {
  flex: 1; background: rgba(255,255,255,.07);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 20px; padding: 8px 14px;
  font-size: .82rem; color: #fff;
  outline: none; transition: border-color .15s;
}
.di-bazarblob-panel__inp::placeholder { color: rgba(255,255,255,.35); }
.di-bazarblob-panel__inp:focus { border-color: rgba(106,76,147,.5); }
.di-bazarblob-panel__send {
  width: 41px; height: 41px; border-radius: 50%;
  background: linear-gradient(135deg, #6a4c93, #EF4444);
  border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity .15s;
}
.di-bazarblob-panel__send:hover { opacity: .85; }

/* === Form option chips: aligned + centered === */
.hf-tag-chips, .di-form-chips, .ch-opts, .ch-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 12px 0 !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
.hf-tag-chip, .di-form-chip, .ch-opts > button, .ch-opt, .ch-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  background: #fff !important;
  color: #1a1a1a !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  transition: all .15s ease !important;
  text-align: center !important;
}
.hf-tag-chip:hover, .di-form-chip:hover, .ch-opts > button:hover, .ch-opt:hover, .ch-chip:hover {
  border-color: var(--sector-accent, #EF4444) !important;
  background: #fafafa !important;
}
.hf-tag-chip.selected, .hf-tag-chip[aria-pressed="true"],
.di-form-chip.selected, .di-form-chip[aria-pressed="true"],
.ch-opts > button.selected, .ch-opt.selected, .ch-chip.selected {
  background: var(--sector-accent, #EF4444) !important;
  color: #fff !important;
  border-color: var(--sector-accent, #EF4444) !important;
}
body.dark .hf-tag-chip, body.dark .di-form-chip, body.dark .ch-opts > button, body.dark .ch-opt, body.dark .ch-chip {
  background: #181828 !important;
  color: #e4e4ee !important;
  border-color: #252540 !important;
}

/* === CTA gap fix: max 20px padding-bottom on chat scroll === */
@media (max-width: 1023px) {
  body .ch-scroll, body.modello-c .ch-scroll,
  body .ch-inner, body.modello-c .ch-inner {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
/* Banner BazarAI fissato in basso sopra la tab bar (non più nel flow) */
@media (max-width: 1023px) {
  .di-craft-chat, .di-bazarai-prompt, .di-bazarai-prompt-bar {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(var(--mapp-tabbar-h, 60px) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 9650 !important;
    margin: 0 !important;
  }
}

/* === Hide brown bubble icon "?" near bot msg (legacy avatar/info) === */
.ch-msg__avatar,
.ch-msg-avatar,
.ch-msg::before,
.ch-msg__icon--info,
.ch-msg__info,
.ch-bot-avatar,
.di-craft-chat-panel .ch-msg::after { display: none !important; }

/* === Auto-scroll smooth helper class for new bot msgs === */
.ch-scroll, .ch-inner, .di-bazarblob-panel__msgs { scroll-behavior: smooth; }
/* === END v21.5-finale === */

/* === v21.5-finale supplemento: hide brown ? avatar/info icons near msgs === */
.msg-sys::before, .msg-sys::after,
.msg-usr::before, .msg-usr::after,
.msg-bub::before, .msg-bub::after,
.di-craft-chat-msg::before, .di-craft-chat-msg::after,
.msg-sys > .avatar, .msg-sys > .icon,
.msg-sys .msg-icon, .msg-sys .msg-avatar,
.di-craft-chat-msg .avatar { display: none !important; content: none !important; }
.msg-from .avatar, .msg-from .icon-help,
[data-msg-help], [data-msg-info] { display: none !important; }

/* ============================================================
   v21.6 — Hello PREMIUM POLISH (CTA pulse + mobile padding + z-index)
   ============================================================ */
/* CTA "Vediamola insieme" pulsating */
@keyframes hf-cta-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 4px 16px rgba(106,76,147,.40); }
  50%     { transform: scale(1.035); box-shadow: 0 8px 28px rgba(232,72,127,.55); }
}
.di-cta-craft.hf-cta-pulse,
button.di-cta-craft[data-pulse="1"] {
  animation: hf-cta-pulse 2s ease-in-out infinite;
  position: relative;
}
.di-cta-craft.hf-cta-pulse:hover { animation-play-state: paused; }

/* v21.8 logo width + burger nuclear */
@media (max-width: 768px) {
  .mapp-header__brand.di-brand-logo,
  .mapp-header__brand { max-width: 140px !important; flex: 0 1 140px !important; overflow: hidden; }
  .mapp-header__brand img,
  .mapp-header__brand svg,
  .di-brand-logo__img { max-width: 100% !important; max-height: 32px !important; height: auto !important; width: auto !important; object-fit: contain !important; display: block; }
  .mapp-header__spacer { flex: 1 1 auto; min-width: 0; }
  .lb, .lb-ic, .lb-mob, .lb-ov, .lb-mob-only-trigger, .di-ovly, .di-burger, .menu-toggle, .hamburger { display: none !important; visibility: hidden !important; }
}

/* v21.8 BLOG grid 1-col mobile */
@media (max-width: 768px) {
  .blog-grid, .blog-grid--portfolio, .di-blog-grid, .post-grid, .news-grid, .articles-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .blog-card, .di-blog-card, .post-card, .article-card { padding: 14px !important; border-radius: 14px !important; }
}

/* v21.8 Fidelity tier badges (eNews) */
.bk-tier { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; }
.bk-tier-free     { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.bk-tier-silver   { background: linear-gradient(135deg,#e5e7eb,#cbd5e1); color: #1e293b; }
.bk-tier-gold     { background: linear-gradient(135deg,#fde68a,#f59e0b); color: #78350f; }
.bk-tier-platinum { background: linear-gradient(135deg,#a5b4fc,#6366f1); color: #fff; }

/* v21.8 Ambassador banner mobile */
@media (max-width: 768px) {
  .ambassador-banner, .di-ambassador-cta, .di-ambassador-banner, .ambassador-cta {
    display: flex !important; flex-direction: column !important; align-items: center !important;
    gap: 12px !important; padding: 16px !important; text-align: center !important;
    width: 100% !important; box-sizing: border-box;
  }
}

/* v21.8 Ambassador banner mobile typography + cta */
@media (max-width: 768px) {
  .ambassador-banner__title, .di-ambassador-cta__title, .ambassador-banner h2, .ambassador-banner h3 {
    font-size: 16px !important; line-height: 1.3 !important;
    word-wrap: normal !important; word-break: normal !important;
    max-width: 100% !important; white-space: normal !important; margin: 0 !important;
  }
  .ambassador-banner__cta, .di-ambassador-cta__btn, .ambassador-banner .cta, .ambassador-banner button {
    width: 100% !important; min-height: 44px !important;
  }
}

/* v21.8 Marketing imprese: chip + h1 alignment */
.di-page-chip, .di-section-chip, .chip-section, [class*="page-chip"] {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(232,72,127,.08); color: #be185d;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 12px 0;
}
@media (max-width: 768px) {
  .di-page-chip, .di-section-chip, .chip-section, [class*="page-chip"] { margin: 0 0 8px 0; font-size: 11px; padding: 3px 10px; }
}

/* v21.8 FAB BazarAI z-index hierarchy + banner overlap fix */
#di-bazarblob-wrap { z-index: 9700 !important; }
.di-craft-banner, .di-bazarai-prompt, .di-bazarai-prompt-bar { z-index: 50 !important; }
.di-craft-chat { z-index: 9500 !important; }
@media (max-width: 768px) {
  /* When FAB is visible, attenuate the BazarAI banner so they don't fight */
  body:has(#di-bazarblob-wrap) .di-bazarai-prompt-bar,
  body:has(#di-bazarblob-wrap) .di-bazarai-prompt {
    opacity: 0.85;
    transform: translateY(2px);
  }
  /* Banner Demo top: more compact */
  .di-craft-banner, .hf-craft-banner {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    line-height: 1.35 !important;
  }
}

/* v21.8 Pricing footer */
.hf-pricing-bar {
  position: sticky; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; height: 64px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.98) 22%);
  backdrop-filter: blur(14px); border-top: 1px solid rgba(0,0,0,.06); z-index: 60;
}

.hf-pricing-bar__nav { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d2d2d7; background: #fff; color: #6e6e73; cursor: pointer; }
.hf-pricing-bar__nav[disabled] { opacity: 0.35; cursor: not-allowed; }
.hf-pricing-bar__center { flex: 1 1 auto; min-width: 0; text-align: center; }
.hf-pricing-bar__price { font-size: 17px; font-weight: 700; color: #1d1d1f; line-height: 1.1; }
.hf-pricing-bar__meta { font-size: 11.5px; color: #6e6e73; line-height: 1.2; margin-top: 2px; }

.hf-pricing-bar__cta { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; min-height: 44px; min-width: 44px; background: linear-gradient(135deg,#6a4c93,#E8487F); color: #fff; border: none; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.hf-pricing-bar__cta[disabled] { opacity: 0.4; cursor: not-allowed; }
.hf-pricing-bar__cta svg { width: 16px; height: 16px; }
@media (max-width: 380px) { .hf-pricing-bar { padding: 8px 10px; } .hf-pricing-bar__cta { padding: 9px 14px; font-size: 13px; } }

/* v21.8 Hello mobile padding */
@media (max-width: 768px) {
  body.hf-embed #app, .hello-app .app, body.hf-wired .form-pane, body.hf-wired .preview-pane { padding-left: 12px !important; padding-right: 12px !important; }
  body.hf-wired .form-pane { padding: 16px 12px !important; }
  body.hf-wired .section { margin-bottom: 16px !important; }
  body.hf-wired .row { grid-template-columns: 1fr !important; gap: 10px !important; }
  body.hf-wired .field { margin-bottom: 10px !important; }
}

@media (max-width: 768px) {
  body.hf-wired .welcome { padding: 32px 12px !important; }
  body.hf-wired .welcome h1 { font-size: 26px !important; }
  body.hf-wired .welcome .lede { font-size: 14px !important; margin-bottom: 24px !important; }
  body.hf-wired .hf-craft-how { padding: 18px 12px !important; gap: 10px !important; }
  body.hf-wired .hf-craft-step { padding: 16px 14px !important; }
}

/* === v21.9-catbatch — DRIVEIN UX BATCH FIX === */
@media (max-width: 768px) {
html body .lb-tog,html body .bnav-toggle,html body .lt-mobile-toggle,html body .lt-burger,html body .lt-mobile-burger,html body .menu-toggle,html body .hamburger,html body .lb-mob-toggle,html body .lb-mob-only-trigger,html body .di-burger,html body .di-craft-banner__menu,html body .di-mobile-menu-toggle,html body .st-mob-burger,html body .st-mob-toggle,html body .lk-mob-burger,html body aside.lb,html body .lb,html body .lb-ov{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;overflow:hidden!important}
html body header.mapp-header > button:not(.mapp-header__action):not(.mapp-header__hello),html body header.mapp-header > a:not(.mapp-header__brand):not(.mapp-header__hello),html body .di-extra-burger,html body [data-burger]:not([data-mapp-drawer-open]),html body button[aria-label="Apri menu"]:not(.mapp-header__action),html body button[aria-label="Open menu"]:not(.mapp-header__action),html body button[aria-label="Menu"]:not(.mapp-header__action){display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;overflow:hidden!important}
html body header.mapp-header > *:not(.mapp-header__brand):not(.mapp-header__spacer):not(.mapp-header__hello):not(.mapp-header__action){display:none!important}
}
/* #2 LOGO BRAND adaptive */
@media (max-width:768px){
body .mapp-header__brand,body .mapp-header__brand.di-brand-logo{flex:1 1 auto!important;min-width:0!important;max-width:calc(100vw - 200px)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body .mapp-header__brand img,body #mapp-header__logo,body .di-brand-logo__img{height:30px!important;max-height:32px!important;width:auto!important;max-width:100%!important;object-fit:contain!important;object-position:left center!important;display:block!important}
}
@media (max-width:480px){
body .mapp-header__brand img,body #mapp-header__logo,body .di-brand-logo__img{height:26px!important;max-height:28px!important}
body .mapp-header__hello{padding:6px 11px!important;font-size:13px!important;min-height:32px!important}
body .mapp-header__hello-arrow{display:none!important}
}
@media (max-width:360px){
body .mapp-header__brand img,body #mapp-header__logo,body .di-brand-logo__img{height:22px!important;max-height:24px!important}
}
/* #3 HELLO PILL DEFAULT ROSSA forced */
:root{--hello-pill-color:#EF4444;--hello-pill-color-dark:#b91c1c;--sector-accent:#EF4444}
body:not([data-sector]),body[data-sector=""]{--hello-pill-color:#EF4444!important;--hello-pill-color-dark:#b91c1c!important;--sector-accent:#EF4444!important}
body[data-sector="industria"]{--hello-pill-color:#1F3A5F!important;--hello-pill-color-dark:#0f1d30!important;--sector-accent:#1F3A5F!important}
body[data-sector="logistica"]{--hello-pill-color:#F57C00!important;--hello-pill-color-dark:#b85f00!important;--sector-accent:#F57C00!important}
body[data-sector="medicale"]{--hello-pill-color:#0288D1!important;--hello-pill-color-dark:#01579b!important;--sector-accent:#0288D1!important}
body[data-sector="agroalimentare"]{--hello-pill-color:#43A047!important;--hello-pill-color-dark:#2e7d32!important;--sector-accent:#43A047!important}
body[data-sector="design"]{--hello-pill-color:#7B1FA2!important;--hello-pill-color-dark:#4a148c!important;--sector-accent:#7B1FA2!important}
body[data-sector="artigianato"]{--hello-pill-color:#6D4C41!important;--hello-pill-color-dark:#4e342e!important;--sector-accent:#6D4C41!important}
body[data-sector="servizi"]{--hello-pill-color:#455A64!important;--hello-pill-color-dark:#263238!important;--sector-accent:#455A64!important}
body[data-sector="turismo"]{--hello-pill-color:#C62828!important;--hello-pill-color-dark:#8e0000!important;--sector-accent:#C62828!important}
/* #4 BANNER DEMO dismiss */
.di-craft-banner.di-craft-banner--app{position:relative!important;padding-right:36px!important}
.di-craft-banner__dismiss{position:absolute!important;top:50%;right:8px;transform:translateY(-50%);width:22px;height:22px;border:none;background:rgba(255,255,255,.18);border-radius:50%;color:#fff;font-size:16px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-weight:700;padding:0;transition:background .15s,transform .12s}
.di-craft-banner__dismiss:hover{background:rgba(255,255,255,.32);transform:translateY(-50%) scale(1.06)}
.di-craft-banner__dismiss:active{transform:translateY(-50%) scale(.94)}
.di-craft-banner.is-dismissed{display:none!important}
/* #5 BREADCRUMB MOBILE COMPACT */
@media (max-width:768px){
.di-bc{font-size:11px!important;line-height:1.2!important;padding:4px 10px!important;height:28px!important;min-height:28px!important;max-height:28px!important;display:flex!important;align-items:center!important;gap:5px!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;flex-wrap:nowrap!important}
.di-bc-link,.di-bc-current{font-size:11px!important;padding:2px 7px!important;border-radius:10px!important;background:rgba(0,0,0,.04)!important;color:#6B7280!important;text-decoration:none!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:96px!important;line-height:1.6!important;display:inline-block!important}
.di-bc-current{background:rgba(239,68,68,.08)!important;color:var(--sector-accent,#EF4444)!important;font-weight:600!important}
.di-bc-sep{width:8px!important;height:8px!important;opacity:.35!important;stroke-width:1.4!important;flex-shrink:0!important}
.di-bc-sector{font-size:11px!important;padding:2px 6px!important;background:rgba(232,72,127,.10)!important;border-radius:10px!important;display:inline-flex!important;align-items:center!important;gap:3px!important;line-height:1.4!important}
.di-bc-x{font-size:13px!important;line-height:1!important;cursor:pointer;padding:0 2px;opacity:.65}
.di-bc-actions{display:none!important}
}
/* #6 FAB BAZARAI overlap */
@media (max-width:1023px){
#di-bazarblob-wrap{bottom:calc(var(--mapp-tabbar-h,64px) + 16px + env(safe-area-inset-bottom,0px))!important;z-index:9700!important;transition:bottom .25s ease!important}
body.di-has-pricing-footer #di-bazarblob-wrap{bottom:calc(var(--mapp-tabbar-h,64px) + 16px + 60px + env(safe-area-inset-bottom,0px))!important}
body.di-has-bazarai-banner #di-bazarblob-wrap{bottom:calc(var(--mapp-tabbar-h,64px) + 16px + 70px + env(safe-area-inset-bottom,0px))!important}
}
/* #14 LANG CHIPS GRID */
@media (max-width:768px){
.mapp-drawer__lang-grid{display:grid!important;grid-template-columns:repeat(6,1fr)!important;gap:6px!important;margin:6px 16px 14px!important}
.mapp-drawer__lang-chip{appearance:none;border:1.5px solid rgba(0,0,0,.10);background:#fbfbfd;color:#1F2937;font-family:inherit;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:9px 0;border-radius:8px;cursor:pointer;transition:all .15s ease;line-height:1;text-align:center;user-select:none}
.mapp-drawer__lang-chip:hover{background:#fff;border-color:var(--sector-accent,#EF4444);color:var(--sector-accent,#EF4444)}
.mapp-drawer__lang-chip.is-active{background:var(--sector-accent,#EF4444);border-color:var(--sector-accent,#EF4444);color:#fff;box-shadow:0 2px 6px -2px var(--sector-accent,#EF4444)}
.mapp-drawer__lang-chip:active{transform:scale(.95)}
}
/* #15 DRAWER INFO Lucide icons */
@media (max-width:768px){
.mapp-drawer__section--info .mapp-drawer__item.mapp-drawer__item--clean{padding:12px 16px!important;display:flex!important;align-items:center!important;gap:12px!important}
.mapp-drawer__section--info .mapp-drawer__item--clean .mapp-drawer__item-ic{display:inline-flex!important;width:22px!important;height:22px!important;flex-shrink:0!important;color:#6B7280!important;align-items:center;justify-content:center}
.mapp-drawer__section--info .mapp-drawer__item--clean .mapp-drawer__item-ic svg{width:20px!important;height:20px!important;stroke-width:1.6!important}
}
/* === END v21.9-catbatch === */

/* ════ v22.0-bazarai-flow-fix — START ════════════════════════════════ */
/* tabbar height 56px + iOS Safari dvh viewport + backdrop blur */
:root{--mapp-tabbar-h:56px;--mapp-tabbar-h-effective:calc(56px + env(safe-area-inset-bottom,0px))}
html,body{min-height:100vh}
@supports(min-height:100dvh){html,body{min-height:100dvh}}
@media(max-width:768px){body.mapp-shell{padding-bottom:var(--mapp-tabbar-h-effective)!important}}
@media(max-width:768px){
  .mapp-tabbar{
    position:fixed!important;
    bottom:0!important;left:0!important;right:0!important;
    height:var(--mapp-tabbar-h-effective)!important;
    padding-bottom:env(safe-area-inset-bottom,0px)!important;
    background:rgba(255,255,255,.94)!important;
    -webkit-backdrop-filter:saturate(180%) blur(20px)!important;
    backdrop-filter:saturate(180%) blur(20px)!important;
    border-top:1px solid rgba(0,0,0,.08)!important;
    box-shadow:0 -2px 12px rgba(0,0,0,.06)!important;
    z-index:9700!important;
    transform:none!important;
    contain:layout paint;
    isolation:isolate;
  }
  .mapp-tabbar svg{width:22px!important;height:22px!important}
}
/* Chat container: leave room for tabbar+banner+gap so options are not covered */
@media(max-width:768px){
  body .ch-scroll, body.modello-c .ch-scroll{
    padding-bottom:calc(var(--mapp-tabbar-h-effective) + 16px)!important;
  }
  body .ch-inner, body.modello-c .ch-inner{
    padding-bottom:calc(var(--mapp-tabbar-h-effective) + 96px)!important;
  }
  body.bazarai-banner-collapsed .ch-inner{
    padding-bottom:calc(var(--mapp-tabbar-h-effective) + 24px)!important;
  }
}
/* Inline BazarAI banner: smooth collapse on dismiss (no orphan empty space) */
.in-bar{
  transition:max-height .28s ease, padding .28s ease, border-color .28s ease, opacity .2s ease;
  overflow:hidden;
  max-height:120px;
}
.in-bar.is-collapsed,
body.bazarai-banner-collapsed .in-bar{
  max-height:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  border-top-color:transparent!important;
  opacity:0!important;
  pointer-events:none!important;
}
/* Magnetic FAB: smooth transform animation (gated by hover-capable devices) */
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  #di-bazarblob-btn.magnetic-btn{
    transition:transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
    will-change:transform;
  }
  #di-bazarblob-btn.magnetic-btn.is-hover{
    box-shadow:0 6px 24px rgba(0,0,0,.18),0 18px 40px -12px rgba(239,68,68,.65)!important;
  }
}
/* Floating FAB position respects new tabbar height */
#di-bazarblob-wrap{
  bottom:calc(var(--mapp-tabbar-h-effective) + 16px)!important;
}
/* ════ v22.0-bazarai-flow-fix — END ════════════════════════════════ */

/* ════ v22.1-magnetic-input-fix — START ═══════════════════════════ */
/* Problem 7: replace conflicting :hover scale with magnetic-friendly transform */
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  /* Disable hover/active scale that fights JS magnetic translate3d.
     Magnetic uses --mx/--my CSS vars; combine into single transform. */
  #di-bazarblob-btn { transform: translate3d(var(--mx,0px), var(--my,0px), 0) scale(var(--mscale,1)); }
  #di-bazarblob-btn:hover  { transform: translate3d(var(--mx,0px), var(--my,0px), 0) scale(1.05) !important; }
  #di-bazarblob-btn:active { transform: translate3d(var(--mx,0px), var(--my,0px), 0) scale(.96)  !important; }
}
/* Problem 8: prevent iOS Safari auto-zoom on input focus (font<16px triggers zoom) */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
  #di-bazarblob-inp,
  #di-site-url,
  .di-bazarblob-panel__inp,
  .mapp-bazarai__input,
  .mapp-drawer__search input,
  .ch-inner input,
  .ch-inner textarea {
    font-size: 16px !important;
  }
}
/* ════ v22.1-magnetic-input-fix — END ═════════════════════════════════ */

/* v22.2-promo-banner-responsive */
@media (max-width: 768px) {
  .di-promo-banner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  .di-promo-banner__icon { margin: 0 auto; }
  .di-promo-banner__btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
  }
  .di-promo-banner__title { font-size: 14px; }
  .di-promo-banner__text { font-size: 12px; }
  .di-promo-actions { gap: 6px; margin: 20px 0; }
  .di-promo-action { padding: 12px; }
  .di-promo-action__icon { width: 32px; height: 32px; }
  .di-promo-action__text strong { font-size: 13px; }
  .di-promo-action__text span { font-size: 11px; }
  .di-auto-cta__btns { flex-direction: column; }
  .di-auto-cta__btns .blog-cta-btn { text-align: center; justify-content: center; }
  .di-auto-cta__item { padding: 10px 12px; }
  .di-auto-cta__name { font-size: 12px; }
  .di-auto-cta__price { font-size: 12px; }
}
/* v22.2-promo-banner-responsive END */
