.easy-popup {
  --easy-popup-width: 640px;
  --easy-popup-padding: clamp(1rem, 4vw, 2rem);
  --easy-popup-background: var(--wp--preset--color--base, var(--wp--preset--color--paper, Canvas));
  box-sizing: border-box;
  width: min(calc(100% - 2rem), var(--easy-popup-width));
  max-width: 100%;
  max-height: min(calc(100% - 2rem), calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: .6rem;
  background: var(--easy-popup-background);
  color: var(--wp--preset--color--contrast, var(--wp--preset--color--ink, CanvasText));
  font-family: inherit;
}

.easy-popup::backdrop { background: rgb(0 0 0 / 65%); }
.easy-popup:not([open]) { display: none; }
.easy-popup--small { --easy-popup-width: 440px; }
.easy-popup--large { --easy-popup-width: 920px; }
.easy-popup-bg--neutral { --easy-popup-background: #fff; color: #1d2327; }
.easy-popup-bg--contrast { --easy-popup-background: #1d2327; color: #fff; }
.easy-popup-pad--compact { --easy-popup-padding: 1rem; }
.easy-popup-pad--roomy { --easy-popup-padding: clamp(1.5rem, 5vw, 3rem); }
.easy-popup-pad--none { --easy-popup-padding: 0px; }
.easy-popup__surface { display: flow-root; padding: var(--easy-popup-padding); }
.easy-popup-pad--none .easy-popup__close {
  height: 44px;
  margin: .5rem .75rem -52px auto;
  inset-block-start: .5rem;
  border-radius: 999px;
}
.easy-popup__close {
  position: sticky;
  inset-block-start: .25rem;
  z-index: 1;
  display: block;
  min-width: 44px;
  min-height: 44px;
  margin: 0 0 1rem auto;
  padding: .25rem .65rem;
  border: 1px solid currentColor;
  border-radius: .35rem;
  background: var(--easy-popup-background);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.easy-popup__close span { font-size: 1.5em; line-height: 1; }
.easy-popup__close:focus-visible,
.easy-popup-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
button.easy-popup-trigger { font-family: inherit; cursor: pointer; }
button.easy-popup-trigger:disabled { opacity: .55; cursor: default; }
html.easy-popup-is-open { overflow: hidden; }
.easy-popup__content > :first-child { margin-block-start: 0; }
.easy-popup__content > :last-child { margin-block-end: 0; }

@media (max-width: 560px) {
  .easy-popup { width: min(calc(100% - 1rem), var(--easy-popup-width)); max-height: calc(100dvh - 1rem); }
  .easy-popup-mobile--full { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .easy-popup-motion--gentle[open] { animation: easy-popup-enter .18s ease-out both; }
  @keyframes easy-popup-enter {
    from { opacity: 0; transform: translateY(.3rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}
