.gs-popup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, var(--gs-popup-overlay-opacity, 0.55));
  backdrop-filter: blur(var(--gs-popup-blur, 8px));
  -webkit-backdrop-filter: blur(var(--gs-popup-blur, 8px));
  z-index: var(--gs-popup-z, 999999);
}

.gs-popup-overlay.is-visible {
  display: flex;
}

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

.gs-popup-modal {
  position: relative;
  width: min(92vw, 760px);
  max-height: 92vh;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  animation: gsPopupFadeIn 0.22s ease-out;
}

.gs-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.85);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}

.gs-popup-close:hover {
  background: #000;
}

.gs-popup-image,
.gs-popup-ad-link {
  display: block;
}

.gs-popup-image {
  width: 100%;
  height: auto;
  max-height: calc(92vh - 28px);
  object-fit: contain;
  border-radius: 12px;
}

@keyframes gsPopupFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 767px) {
  .gs-popup-modal {
    width: min(94vw, 520px);
    padding: 10px;
    border-radius: 14px;
  }

  .gs-popup-close {
    width: 34px;
    height: 34px;
    font-size: 24px;
    line-height: 1;
  }
}
