/* QPLUSLOTTO AD POPUP V1 — isolated from the existing theme and loader. */
html.qplus-ad-popup-lock,
body.qplus-ad-popup-lock {
  overflow: hidden !important;
}

#qplus-ad-popup-v1 {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px 18px;
  background: rgba(12, 3, 28, 0.88);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
}

#qplus-ad-popup-v1.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#qplus-ad-popup-v1 .qplus-ad-popup-v1__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 460px, calc((100vh - 72px) * 0.75));
  max-height: calc(100vh - 48px);
}

#qplus-ad-popup-v1 .qplus-ad-popup-v1__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 65px rgba(0, 0, 0, 0.65), 0 0 28px rgba(185, 76, 255, 0.28);
}

#qplus-ad-popup-v1 .qplus-ad-popup-v1__close {
  position: absolute;
  z-index: 2;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 3px solid #f5d36c;
  border-radius: 999px;
  background: #fff;
  color: #32105c;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5);
  font: 700 32px/1 Arial, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#qplus-ad-popup-v1 .qplus-ad-popup-v1__close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@supports (height: 100dvh) {
  #qplus-ad-popup-v1 .qplus-ad-popup-v1__panel {
    width: min(92vw, 460px, calc((100dvh - 72px) * 0.75));
    max-height: calc(100dvh - 48px);
  }
  #qplus-ad-popup-v1 .qplus-ad-popup-v1__image {
    max-height: calc(100dvh - 48px);
  }
}

@media (max-width: 480px) {
  #qplus-ad-popup-v1 {
    padding: 20px 16px;
  }
  #qplus-ad-popup-v1 .qplus-ad-popup-v1__close {
    top: -11px;
    right: -11px;
    width: 43px;
    height: 43px;
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #qplus-ad-popup-v1 {
    transition: none;
  }
}
