/* Wrapper fisso in basso a sinistra */
.reab-widget {
  position: fixed;
  bottom: 40px;
  left: 20px;
  z-index: 9999;
}
/* Sovrapponi pulsante e pannello nello stesso punto */
.reab-fab, .reab-panel {
  position: absolute;
  bottom: 0;
  left: 0;
}
/* Z-index interno per mostrare il pannello sopra al pulsante */
.reab-fab {
  z-index: 1;
}
.reab-panel {
  z-index: 2;
}
.reab-fab:hover {
  transition: color .25s ease, background .25s ease;
}
.reab-fab .icona-pulsante {
  margin-right: 5px;
}
/* Pulsante (resta com’era) */
.reab-fab {
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
  transition: opacity .20s ease, transform .20s ease, color .25s ease, background .25s ease;
  ;
  width: max-content;
}
.reab-panel-header {
  margin: -8px -10px 15px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  padding: 5px;
}
.reab-panel-title, .reab-close {
  display: inline-flex;
  padding-left: 10px;
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
}
.reab-panel-title {}
.reab-close {
  background-color: transparent;
  border: none;
  color: white;
  cursor: pointer;
}
/* Pannello con transizione (niente display:none) */
.reab-panel {
  width: 420px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 10px 12px 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  will-change: transform, opacity;
}
/* Stato aperto */
.reab-open .reab-fab {
  opacity: 0;
  transform: scale(.96);
  pointer-events: none;
}
.reab-open .reab-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity .25s ease, transform .25s ease, visibility 0s;
}
.reab-panel-body * {
  font-size: 0.8rem !important;
}
.reab-panel-body input {
  padding: 3px;
}
.reab-panel-body .vc_column_container > .vc_column-inner:first-of-type {
  padding-left: 15px;
  padding-right: 7px;
}
.reab-panel-body .vc_column_container > .vc_column-inner:last-of-type {
  padding-left: 7px;
  padding-right: 15px;
}
/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
  .reab-fab, .reab-panel {
    transition: none !important;
  }
}
/* Blocca lo scroll della pagina quando il pannello è aperto */
html.reab-no-scroll, body.reab-no-scroll {
  overflow: hidden;
  height: 100%;
}
/* Fullscreen per mobile */
@media (max-width: 768px) {
  .reab-widget {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  .reab-fab, .reab-panel {
    left: 16px;
    bottom: 16px; /* margine dal bordo */
  }
  .reab-panel-body .vc_column_container > .vc_column-inner {
    margin-bottom: 0;
    padding-right: 0;
  }
  /* Pannello a schermo intero */
  .reab-panel {
    position: fixed; /* esce dal wrapper */
    inset: 0; /* = top/right/bottom/left: 0 */
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    border: 0;
    padding: 12px 16px 16px;
    box-shadow: none;
    z-index: 99999;
    /* transizione da fondo */
    transform: translateY(12px) scale(1);
  }
  .reab-panel input:not([type="checkbox"]) {
    width: 100%;
  }
  /* Header sticky con Chiudi */
  .reab-panel-header {
    position: sticky;
    top: 0;
    padding-top: env(safe-area-inset-top);
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 1;
  }
  .reab-close {
    font-size: 28px;
  }
  /* Corpo scrollabile che evita l'area sicura inferiore */
  .reab-panel-body {
    height: calc(100vh - 70px - env(safe-area-inset-bottom));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}