.dw-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dw-popup.is-visible {
  display: flex;
}

.dw-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 29, 0.72);
  backdrop-filter: blur(3px);
}

.dw-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  overflow: visible;
}

.dw-popup__close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #000000bd;
  color: #ffffff;
  font-size: 35px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dw-popup__close:hover,
.dw-popup__close:focus-visible {
  background: #000000;
  transform: translateY(-1px);
  outline: unset;
}

.dw-popup__image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

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

@media (max-width: 767px) {
  .dw-popup {
    padding: 16px;
  }

  .dw-popup__dialog {
    width: 100%;
    max-height: calc(100vh - 32px);
  }

  .dw-popup__close {
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .dw-popup__image {
    max-height: calc(100vh - 32px);
    border-radius: 14px;
  }
}
