body.wpsk-popup-open {
  overflow: hidden;
}

.wpsk-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, var(--overlay-opacity, 0.44));
}

.wpsk-popup-overlay.is-open {
  display: flex;
}

.wpsk-popup-container {
  position: relative;
  width: var(--popup-size, 640px);
  min-width: var(--popup-min-width, 0);
  max-width: var(--popup-max-width, 92%);
  background: var(--popup-bg, #f9f9f9);
  border: var(--popup-border-width, 5px) solid var(--popup-border-color, #2d335b);
  border-radius: var(--popup-border-radius, 0);
  /* overflow: visible keeps the close button able to bleed outside the box */
  overflow: visible;
}

.wpsk-popup-content {
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 980px) {
  .wpsk-popup-container {
    width: var(--popup-size-tablet, var(--popup-size, 90%));
  }
}

@media (max-width: 767px) {
  .wpsk-popup-container {
    width: var(--popup-size-mobile, var(--popup-size, 100%));
  }
}

.wpsk-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  z-index: 9999;
}

/* -- Gravity Forms inside popups ------------------------------------------- */
.wpsk-popup-container .gform_validation_container,
.wpsk-popup-container .gform-validation-container {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9000px !important;
}

/* Prevent Divi's theme input CSS (dark navy backgrounds) from leaking into
   GF forms rendered inside our popup. GF's own stylesheet normally wins this
   specificity battle, but only when it is loaded. */
.wpsk-popup-container .gform_wrapper input[type="text"],
.wpsk-popup-container .gform_wrapper input[type="email"],
.wpsk-popup-container .gform_wrapper input[type="tel"],
.wpsk-popup-container .gform_wrapper input[type="number"],
.wpsk-popup-container .gform_wrapper input[type="url"],
.wpsk-popup-container .gform_wrapper textarea,
.wpsk-popup-container .gform_wrapper select {
  background-color: #fff;
  color: #112337;
  border: 1px solid #686e77;
}

/* -- Gravity Forms layout tweaks inside popups ----------------------------- */
.wpsk-popup-overlay form[id*=gform_] .gform_fields {
  grid-column-gap: 16px;
  grid-row-gap: 6px;
}

.wpsk-popup-overlay .ginput_recaptcha > div {
  width: unset !important;
}

.wpsk-popup-overlay .et_pb_section .et_pb_row{
    width: 100% !important;
}

.wpsk-popup-overlay .wpsk-popup-close {
    color: #fff;
    background-color: #232a4a;
    border-radius: 200px;
    height: 34px;
    width: 34px;
    line-height: .5;
    font-weight: 600;
    border: 2px solid #fff;
    top: -0.75em;
    right: -0.75em;
}
/* -- Close button styling -------------------------------------------------- */
