.monthly-offer-popup[hidden] {
  display: none !important;
}

.monthly-offer-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  padding: 3vh 24px;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
}

.monthly-offer-popup__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .58);
  cursor: default;
}

.monthly-offer-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, 94vw);
  max-height: 94vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .34);
  outline: none;
  overscroll-behavior: contain;
}

.monthly-offer-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(31, 31, 31, .58);
  box-shadow: 0 2px 9px rgba(0, 0, 0, .2);
  color: #fff;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.monthly-offer-popup__close:hover,
.monthly-offer-popup__close:focus {
  background: rgba(0, 0, 0, .78);
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.monthly-offer-popup__picture,
.monthly-offer-popup__image {
  display: block;
  width: 100%;
}

.monthly-offer-popup__image {
  height: auto;
}

.monthly-offer-popup__form-frame {
  display: block;
  width: 100%;
  height: 182px;
  border: 0;
  background: #fff;
}

html.monthly-offer-popup-open,
html.monthly-offer-popup-open body {
  overflow: hidden;
}

@media (max-width: 760px) {
  .monthly-offer-popup {
    padding: 16px;
  }

  .monthly-offer-popup__dialog {
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .monthly-offer-popup__close {
    position: sticky;
    top: 8px;
    float: right;
    width: 38px;
    height: 38px;
    margin: 8px 8px -46px 0;
    font-size: 30px;
  }

  .monthly-offer-popup__form-frame {
    height: 225px;
  }
}

@media (max-width: 420px) {
  .monthly-offer-popup {
    padding: 8px;
  }

  .monthly-offer-popup__dialog {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .monthly-offer-popup:not([hidden]) .monthly-offer-popup__dialog {
    animation: monthly-offer-popup-in .22s ease-out;
  }
}

@keyframes monthly-offer-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
