:root{
  --rbw-primary:#028edc;
  --rbw-overlay: rgba(15,23,42,.55);
  --rbw-close-bg: rgba(17,24,39,.28);
  --rbw-close-bg-hover: rgba(17,24,39,.38);
}

/* Bottone blu */
.rbw-btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.85rem 1.2rem;border:0;border-radius:10px;
  background:var(--rbw-primary);color:#fff;font-weight:700;letter-spacing:.2px;
  box-shadow:0 10px 22px rgba(2,142,220,.25);
  transition:transform .15s ease, filter .15s ease;
}
.rbw-btn:hover{ transform:translateY(-1px); filter:brightness(1.12); }


/* — Modal structure — */
.rbw-modal{ position:fixed; inset:0; display:none; z-index:99999; }
.rbw-modal.is-open{ display:block; }
.rbw-backdrop{ position:absolute; inset:0; background:rgba(15,23,42,.55); }

/* Contenitore del modal: TOTALMENTE TRASPARENTE */




/* se qualche tema appiccica un background al primo figlio: annulla */
/* .rbw-dialog > *{ background:transparent !important; } */



/* — Close button: glass + icon — */
.rbw-close{
  all:unset;
  position:absolute; top:10px; right:10px;
  width:36px; height:36px;
  display:grid; place-items:center;
  border-radius:9999px;
  background:rgba(15,23,42,.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color:#fff; cursor:pointer;
  transition:transform .15s ease, background .15s ease, opacity .15s ease;
}
.rbw-close:hover{ background:rgba(15,23,42,.5); transform:scale(1.05); }
.rbw-close:active{ transform:scale(0.98); opacity:.9; }
.rbw-close svg{ width:18px; height:18px; display:block; }

.rbw-dialog{
  position:relative;
  margin:4vh auto 0;
  width:min(92vw,1000px);
  height:min(92vh,980px);
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  border-radius:0 !important;

  overflow:hidden; /* importante: il box non scrolla, scrolla l'iframe */
}

#rbw-iframe{
  display:block;
  width:100%;
  height:100%;      /* <<< QUESTO È IL PUNTO */
  border:0;
  background:#fff;  /* opzionale: evita trasparenze brutte */
}

/* Mobile full-screen vero */
@media (max-width:640px){
  .rbw-dialog{
    margin:0;
    width:100vw;
    height:100dvh;   /* meglio di 100vh su mobile */
  }
  #rbw-iframe{ height:100%; }
}








/* Body lock (failsafe) */
body[data-rbw-locked="true"]{ touch-action:none; }


/* =========================
   INLINE [rbw_iframe] FIX
   ========================= */

/* IMPORTANT: kill any 16:9 embed rules if you had them */
.rbw-embed{
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 0 !important;   /* <-- ammazza il 56.25% */
  height: auto !important;
}

.rbw-embed iframe{
  position: static !important; /* <-- ammazza absolute inset:0 */
  inset: auto !important;
  display: block;
  width: 100%;
  border: 0;

  /* fallback: così non finisci nel footer WP */
  height: 1100px;
  min-height: 800px;
}

/* extra: su mobile ancora più alto */
@media (max-width: 640px){
  .rbw-embed iframe{
    height: 1400px;
    min-height: 1000px;
  }
}

