html:has(.limoni-gift-popup[open]) {
  overflow: hidden;
}

.limoni-gift-popup {
  width: min(720px, calc(100vw - 48px), calc((100vh - 40px) * 2.4));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--theme-outer-border-radius, 12px);
  overflow: hidden;
  background: #ffe0af;
  box-shadow: 0 18px 56px #25122155;
}

.limoni-gift-popup[open] {
  animation: limoni-gift-popup-enter 300ms cubic-bezier(.2, .75, .3, 1) both;
}

.limoni-gift-popup picture:focus {
  outline: none;
}

.limoni-gift-popup::backdrop {
  background: #1c131bb3;
  animation: limoni-gift-popup-backdrop 250ms ease-out both;
}

.limoni-gift-popup picture,
.limoni-gift-popup img {
  display: block;
  width: 100%;
  height: auto;
}

.limoni-gift-popup__close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fffaf7;
  color: #381b2b;
  cursor: pointer;
}

.limoni-gift-popup__close:hover {
  background: #fff;
}

.limoni-gift-popup__close:focus-visible {
  outline: 2px solid #702058;
  outline-offset: 2px;
}

@keyframes limoni-gift-popup-enter {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes limoni-gift-popup-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 767px) {
  .limoni-gift-popup {
    width: min(360px, calc(100vw - 32px), calc((100vh - 32px) * .5625));
    width: min(360px, calc(100vw - 32px), calc((100dvh - 32px) * .5625));
  }
}

@media (prefers-reduced-motion: reduce) {
  .limoni-gift-popup[open],
  .limoni-gift-popup::backdrop {
    animation: none;
  }
}
