.nxpo-site-popup {
  z-index: 1060;
}

.nxpo-site-popup__dialog {
  width: calc(100% - 2rem);
  max-width: 960px;
  margin: 1rem auto;
}

.nxpo-site-popup__content {
  border: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
}

.nxpo-site-popup__header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  border: 0;
}

.nxpo-site-popup__close {
  color: #fff;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  font-size: 2rem;
  line-height: 1;
  margin: 0;
  padding: 0 0.35rem;
}

.nxpo-site-popup__close:hover,
.nxpo-site-popup__close:focus {
  color: #fff;
  opacity: 1;
}

.nxpo-site-popup__body {
  position: relative;
}

.nxpo-site-popup__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.nxpo-site-popup__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nxpo-site-popup__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.nxpo-site-popup__link.d-none {
  display: none !important;
}

@media (max-width: 575.98px) {
  .nxpo-site-popup__dialog {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  .nxpo-site-popup__close {
    font-size: 1.75rem;
  }
}

@supports not (aspect-ratio: 16 / 9) {
  .nxpo-site-popup__media {
    height: 0;
    padding-top: 56.25%;
  }

  .nxpo-site-popup__image {
    position: absolute;
    inset: 0;
  }
}

/* Preview tag (หน้าแรก + ?preview=) */
.nxpo-site-popup-preview-tag {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.45rem 0.75rem;
  background: rgba(31, 48, 68, 0.92);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

.nxpo-site-popup-preview-tag a {
  color: #ff9425;
  text-decoration: underline;
}

.nxpo-site-popup-preview-tag a:hover {
  color: #ffb366;
}
