.form-dialog {
  position: fixed;
  inset: 0;
  isolation: isolate;
  transform: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  /* fallback: se modale lunga, scrolla SOLO il contenuto */
  height: 100vh;
  /* fallback: assicura che copra tutto lo schermo */
  width: 100%;
  overscroll-behavior: contain;

  /* SUPER z-index per stare sopra a Salient, Elementor, WPBakery, ecc */
  z-index: 2147483647 !important;
  /* massimo valore supportato da CSS */
}

.form-dialog[hidden] {
  display: none;
}

.form-dialog-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 25px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  /* border: solid 5px #FFC32D; */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  color: #181b31;
  position: relative;
  max-height: 90vh;
  /* evita che esca dallo schermo */
  overflow-y: auto;
  /* scroll interno se il contenuto è troppo lungo */
}

.form-dialog-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #181b31 !important;
}

.form-dialog-content p {
  color: #181b31 !important;
  margin: 0.5rem 0 0;
}

.form-dialog-content button {
  margin-top: 1rem;
  padding: 0.5rem 4.2rem;
  background: #DE1E63;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 480px) {
  .form-dialog-content {
    width: 90%;
    /* riduce larghezza su mobile */
    padding: 1rem;
    font-size: 0.95rem;
  }

  .form-dialog-content h3 {
    font-size: 1.1rem;
  }

  .form-dialog-content button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
  }
}