:root{
  --site-fab-offset: 14px;
}

.switch-fab{
  position: fixed;
  left: var(--site-fab-offset);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 12050;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.fab-btn{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
  text-decoration:none;
  background: rgba(255,255,255,.96);
  color: #111;
  border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.fab-btn.active{
  background:#d72626;
  color:#fff;
  border-color: rgba(215,38,38,.35);
}

.fab-btn:active{
  transform: scale(.95);
}

.cookie-banner:not([style*="display: none"]) ~ #mobileSwitchFab,
.cookie-banner:not([style*="display:none"]) ~ #mobileSwitchFab{
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.offline-banner{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20000;
  background: #d72626;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 12px;
  transform: translateY(-100%);
  transition: transform .25s ease;
}

.offline-banner.is-visible{
  transform: translateY(0);
}

.bau-chat-panel{
  display:none;
}

.bau-chat-panel.open{
  display:flex;
  flex-direction:column;
}
 /* switch sito/pwa più in alto */
  .switch-fab{
    right: 14px;
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    z-index: 12050;
  }

  /* BAU resta più in basso */
  #bau-widget{
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 12060;
  }

  /* se il pannello chat si apre, resta sopra tutto */
  .bau-chat-panel{
    z-index: 12070;
  }
}
@media (max-width: 820px){
  .switch-fab{
    left: 14px;
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  #bau-widget{
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
/* =========================
   FOOTER v2 — CLEAN
   ========================= */
.v2-footer {
    width: 100%;
    background: #0b0c10;
    color: rgba(255,255,255,.88);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 36px 0 18px;
    overflow-x: clip; /* difesa overflow */
}

.v2-footer, .v2-footer * {
    box-sizing: border-box;
}

    .v2-footer .v2-wrap {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 20px;
    }

.v2-footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 1fr;
    gap: 28px;
    justify-items: start;
    text-align: left;
}

.v2-footer-title {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(255,255,255,.92);
}

.v2-mt {
    margin-top: 18px;
}

.v2-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

    .v2-footer-links a {
        color: rgba(255,255,255,.82);
        text-decoration: none;
        font-weight: 750;
        font-size: 14px;
        overflow-wrap: anywhere; /* spezza email/url */
        word-break: break-word;
    }

        .v2-footer-links a:hover {
            color: #fff;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

.v2-footer-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(255,255,255,.72);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.v2-footer-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
    align-items: flex-start;
}

.v2-social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    font-weight: 850;
    font-size: 14px;
}

    .v2-social-link:hover {
        color: #fff;
    }

.v2-social-ico {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
}

    .v2-social-ico svg {
        width: 18px;
        height: 18px;
        display: block;
    }

.v2-footer-bottom {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

.v2-footer-brand {
    font-weight: 950;
    color: rgba(255,255,255,.88);
}

.v2-dot {
    opacity: .55;
}

@media (max-width: 980px) {
    .v2-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .v2-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   COOKIE BANNER — CLEAN
   ========================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    color: #fff;
    z-index: 9999;
    padding: 16px 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,.25);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.5;
    opacity: .92;
}

    .cookie-text a {
        color: #ff4d4d;
        font-weight: 800;
        text-decoration: none;
    }

        .cookie-text a:hover {
            text-decoration: underline;
            text-underline-offset: 3px;
        }

.cookie-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.4);
    background: transparent;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
}

    .cookie-btn.primary {
        background: #d72626;
        border-color: #d72626;
    }

    .cookie-btn:hover {
        opacity: .85;
    }

.cookie-link {
    color: #fff;
    opacity: .85;
    font-weight: 800;
    text-decoration: underline;
}

    .cookie-link:hover {
        opacity: 1;
    }

@media (max-width: 768px) {
    .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   PWA MODAL — (come avevi)
   ========================= */
.pwa-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    background: rgba(0,0,0,.55);
    padding: 18px;
}

    .pwa-modal.is-open {
        display: grid;
        place-items: center;
    }

.pwa-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    overflow: hidden;
}

.pwa-head {
    padding: 16px 18px 10px;
    border-bottom: 1px solid rgba(0,0,0,.06);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.pwa-title {
    font-weight: 900;
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
}

.pwa-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
}

    .pwa-close:hover {
        opacity: 1;
    }

.pwa-body {
    padding: 14px 18px 2px;
}

    .pwa-body p {
        margin: 0 0 10px;
        color: rgba(0,0,0,.78);
        line-height: 1.45;
        font-size: 14px;
    }

.pwa-note {
    background: rgba(215,38,38,.08);
    border: 1px solid rgba(215,38,38,.18);
    border-radius: 14px;
    padding: 10px 12px;
    margin: 10px 0 0;
    font-size: 13px;
    color: rgba(0,0,0,.78);
}

.pwa-actions {
    padding: 14px 18px 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pwa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 900;
    font-size: 13.5px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #111;
}

    .pwa-btn:hover {
        background: rgba(0,0,0,.03);
    }

    .pwa-btn.primary {
        background: #d72626;
        border-color: rgba(215,38,38,.35);
        color: #fff;
    }

        .pwa-btn.primary:hover {
            filter: brightness(.98);
        }

    .pwa-btn.ghost {
        background: transparent;
    }

.pwa-mini {
    font-size: 12px;
    color: rgba(0,0,0,.55);
    padding: 0 18px 16px;
}
/* ===========================
   PROFESSIONAL CTA STICKY PRO
   =========================== */

.pro-cta-sticky {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    animation: proFadeUp .5s ease-out;
}

@keyframes proFadeUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pro-cta-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    border: 1px solid rgba(0,0,0,.08);
    max-width: 460px;
    position: relative;
}

.pro-cta-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.35;
}

    .pro-cta-text strong {
        font-size: 15px;
    }

    .pro-cta-text span {
        color: rgba(0,0,0,.65);
    }

.pro-cta-btn {
    background: #d72626;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

    .pro-cta-btn:hover {
        filter: brightness(0.95);
    }

.pro-cta-close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    opacity: .6;
}

    .pro-cta-close:hover {
        opacity: 1;
    }

/* MOBILE */

@media (max-width: 768px) {

    .pro-cta-sticky {
        bottom: 0;
        right: 0;
        left: 0;
    }

    .pro-cta-inner {
        border-radius: 0;
        justify-content: space-between;
        max-width: 100%;
    }

    .pro-cta-text {
        font-size: 13px;
    }
}
:root {
    --site-fab-offset: 14px;
}

.switch-fab {
    position: fixed;
    left: var(--site-fab-offset);
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 12050;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.fab-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    background: rgba(255,255,255,.96);
    color: #111;
    border: 1px solid rgba(0,0,0,.14);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

    .fab-btn.active {
        background: #d72626;
        color: #fff;
        border-color: rgba(215,38,38,.35);
    }

    .fab-btn:active {
        transform: scale(.95);
    }

.cookie-banner:not([style*="display: none"]) ~ #mobileSwitchFab,
.cookie-banner:not([style*="display:none"]) ~ #mobileSwitchFab {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20000;
    background: #d72626;
    color: #fff;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 12px;
    transform: translateY(-100%);
    transition: transform .25s ease;
}

    .offline-banner.is-visible {
        transform: translateY(0);
    }

/* switch sito/pwa più in alto */
.switch-fab {
    right: 14px;
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    z-index: 12050;
}
/* =========================
   BAU WIDGET
   ========================= */

#bau-widget {
    position: fixed;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 12060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.bau-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.bau-quick-btn {
    border: none;
    background: #fff;
    border: 1px solid #e2e5ec;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
}

    .bau-quick-btn:hover {
        background: #f1f3f7;
    }
.bau-mascot img {
    width: 150px;
    height: auto;
    display: block;
    cursor: pointer;
}

#bau-chat-toggle {
    cursor: pointer;
    transition: transform .2s ease;
}

    #bau-chat-toggle:hover {
        transform: scale(1.05);
    }

.bau-chat-panel {
    position: fixed;
    right: 14px;
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 520px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
    border: 1px solid #ececec;
    overflow: hidden;
    display: none;
    z-index: 12070;
}

    .bau-chat-panel.open {
        display: flex;
        flex-direction: column;
    }

.bau-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(135deg,#ff2b2b 0%, #d91515 100%);
    color: #fff;
}

.bau-chat-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bau-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.bau-chat-sub {
    font-size: 13px;
    opacity: .9;
}

.bau-chat-close {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.bau-chat-messages {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #f6f7fb;
}

.bau-msg {
    display: flex;
    margin-bottom: 12px;
}

.bau-msg-bot {
    justify-content: flex-start;
}

.bau-msg-user {
    justify-content: flex-end;
}

.bau-msg-system {
    justify-content: center;
}

.bau-bubble-msg {
    max-width: 84%;
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.45;
    font-size: 15px;
}

.bau-msg-bot .bau-bubble-msg {
    background: #e9edf3;
    color: #1b1b1b;
    border-bottom-left-radius: 6px;
}

.bau-msg-user .bau-bubble-msg {
    background: #111;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.bau-msg-system .bau-bubble-msg {
    background: #fff7d6;
    color: #333;
    border: 1px solid #f1df8a;
}

.bau-chat-inputbar {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #ececec;
    background: #fff;
}

    .bau-chat-inputbar input {
        flex: 1;
        height: 46px;
        border: 1px solid #dcdfe6;
        border-radius: 999px;
        padding: 0 16px;
        font-size: 15px;
        outline: none;
    }

    .bau-chat-inputbar button {
        border: none;
        border-radius: 999px;
        padding: 0 18px;
        background: #ff2b2b;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
    }

/* uploader foto */
.bau-uploader-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.bau-upload-box {
    background: #fff;
    border: 1px solid #e2e5ec;
    border-radius: 14px;
    padding: 12px;
}

.bau-upload-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #222;
}

.bau-upload-input {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.bau-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bau-upload-btn,
.bau-upload-skip {
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.bau-upload-btn {
    background: #ff2b2b;
    color: #fff;
}

.bau-upload-skip {
    background: #f1f3f7;
    color: #222;
}

.bau-upload-status {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

@media (max-width: 640px) {
    .bau-chat-panel {
        right: 10px;
        left: 10px;
        bottom: 88px;
        width: auto;
        height: 70vh;
        border-radius: 18px;
    }

    #bau-widget {
        right: 12px;
        bottom: 12px;
    }

    .bau-mascot img {
        width: 90px;
    }
}
/* ===== BAU reset button ===== */
#bau-chat-reset {
    appearance: none;
    border: 0;
    outline: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

    #bau-chat-reset:hover {
        background: rgba(255,255,255,.28);
    }

    #bau-chat-reset:active {
        transform: translateY(1px);
    }

    #bau-chat-reset:focus-visible {
        box-shadow: 0 0 0 3px rgba(255,255,255,.25);
    }

    #bau-chat-reset[disabled] {
        opacity: .55;
        cursor: not-allowed;
    }

/* se sta dentro la top bar del chatbot */
.bau-chat-head,
.bau-chat-header {
    display: flex;
    align-items: center;
}

    .bau-chat-head .bau-head-actions,
    .bau-chat-header .bau-head-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

/* mobile */
@media (max-width: 480px) {
    #bau-chat-reset {
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
        margin-right: 6px;
    }
}
