/**
 * Баннер-попап акции (include_areas/footer/promo-popup.php).
 * Стили общие для любого баннера, размеры задаёт размер картинки.
 */
.promo-popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  overscroll-behavior: contain;
}

.promo-popup.promo-popup_open {
  display: flex;
}

.promo-popup__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.promo-popup__dialog {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.promo-popup__link {
  display: block;
  line-height: 0;
}

.promo-popup__img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 30px);
  max-height: calc(100dvh - 30px);
}

.promo-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.promo-popup__close:hover,
.promo-popup__close:focus-visible {
  color: #000;
  background-color: #fff;
}

.promo-popup__close:focus-visible {
  outline: 2px solid #5b9118;
  outline-offset: 2px;
}

.promo-popup__close svg {
  display: block;
  width: 20px;
  height: 20px;
}

html.promo-popup-lock,
html.promo-popup-lock body {
  overflow: hidden;
}

@media (max-width: 767px) {
  .promo-popup__close {
    top: 8px;
    right: 8px;
  }
}
