/* e64 Side Popup - fixed, independent of theme/container geometry */
#e64-side-popup.e64-side-popup {
  position: fixed !important;
  box-sizing: border-box;
  z-index: 2147483000;
  top: auto;
  left: 14px;
  bottom: var(--e64-desktop-bottom, 35px);
  width: min(var(--e64-desktop-width, 360px), 42vw);
  max-height: 86vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(-135%, 0, 0) rotate(-24deg) scale(.78);
  transform-origin: 10% 75%;
  transition: opacity .28s ease, visibility .28s, transform .8s cubic-bezier(.18, 1.14, .27, 1.04);
}
#e64-side-popup.e64-side-popup.is-visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
}
#e64-side-popup.e64-side-popup.is-dismissed {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-135%, 0, 0) rotate(-18deg) scale(.8);
}
#e64-side-popup .e64-popup-banner {
  display: block !important;
  width: 100%;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 5px 24px rgba(0,0,0,.25);
}
#e64-side-popup picture, #e64-side-popup img {
  display: block !important;
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 86vh !important;
  object-fit: contain;
}
#e64-side-popup .e64-popup-close {
  appearance: none;
  position: absolute;
  top: -14px;
  right: -11px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ed2636;
  color: white;
  cursor: pointer;
  font: 700 27px/27px Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
#e64-side-popup .e64-popup-close:focus-visible {
  outline: 3px solid #00ddef;
  outline-offset: 3px;
}
@media (min-width: 768px) {
  #e64-side-popup.e64-side-popup.e64-popup-hide-desktop { display: none !important; }
}
@media (max-width: 767px) {
  #e64-side-popup.e64-side-popup.e64-popup-hide-mobile { display: none !important; }
  #e64-side-popup.e64-side-popup {
    width: min(var(--e64-mobile-width, 320px), calc(100vw - 34px));
    left: 12px;
    top: auto;
    bottom: calc(var(--e64-mobile-bottom, 18px) + env(safe-area-inset-bottom, 0px));
    max-height: 76vh;
    max-height: 76dvh;
    transform: translate3d(-135%, 0, 0) rotate(-20deg) scale(.78);
  }
  #e64-side-popup.e64-side-popup.is-visible {
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
  #e64-side-popup.e64-side-popup.is-dismissed {
    transform: translate3d(-135%, 0, 0) rotate(-18deg) scale(.8);
  }
  #e64-side-popup picture, #e64-side-popup img {
    max-height: 76vh !important;
    object-fit: contain;
  }
}
@media (prefers-reduced-motion: reduce) {
  #e64-side-popup.e64-side-popup { transition: opacity .15s ease, visibility .15s; }
  #e64-side-popup.e64-side-popup.is-visible { transform: translate3d(0, 0, 0) !important; }
  @media (max-width: 767px) {
    #e64-side-popup.e64-side-popup.is-visible { transform: translate3d(0, 0, 0) !important; }
  }
}
