.stp-modal-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(13, 14, 16, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden; transition: opacity .18s ease;
}
.stp-modal-overlay.stp-open { opacity: 1; visibility: visible; }
.stp-modal-dialog {
  position: relative; background: #fff; border-radius: 12px;
  border: 1px solid #000;
  width: 100%; max-width: 640px; max-height: 94vh;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(8px); transition: transform .18s ease;
}
.stp-modal-overlay.stp-open .stp-modal-dialog { transform: none; }
.stp-modal-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.06); color: #111827; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.stp-modal-close:hover, .stp-modal-close:focus-visible { background: rgba(0,0,0,.12); }
/* Desktop: JS sets an explicit height from the form's content so the whole form
   shows without inner scroll. Mobile: the media query below makes it fill the screen. */
.stp-modal-frame { border: 0; width: 100%; height: 640px; min-height: 480px; background: #fff; }
.stp-modal-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #6b7280; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.stp-modal-lock { overflow: hidden; }
@media (max-width: 600px) {
  .stp-modal-overlay { padding: 0; }
  .stp-modal-dialog { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .stp-modal-frame { height: auto; min-height: 0; flex: 1 1 auto; }
}
