/* KHA Popup Banner PRO */
.kha-pb-hidden {
  display: none;
}

.kha-pb-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 180ms ease;
  will-change: opacity;
}

.kha-pb-wrap {
  position: fixed;
  z-index: 1000000;
  box-sizing: border-box;
  max-width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 180ms ease;
  will-change: opacity;
}

.kha-pb-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  object-fit: contain;
}

.kha-pb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1d2327;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 22px;
  line-height: 38px;
  text-align: center;
}

.kha-pb-close:focus-visible {
  outline: 3px solid #2271b1;
  outline-offset: 2px;
}

.kha-pb-pos-bottom_right {
  right: 12px;
  bottom: 12px;
}

.kha-pb-pos-bottom_left {
  left: 12px;
  bottom: 12px;
}

.kha-pb-pos-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.kha-pb-pos-top_bar {
  top: 12px;
  left: 50%;
  width: min(980px, calc(100vw - 24px));
  max-width: min(980px, calc(100vw - 24px));
  transform: translateX(-50%);
}

.kha-pb-pos-bottom_bar {
  bottom: 12px;
  left: 50%;
  width: min(980px, calc(100vw - 24px));
  max-width: min(980px, calc(100vw - 24px));
  transform: translateX(-50%);
}

.kha-pb-visible {
  opacity: 1;
}

@media (max-width: 1024px) {
  .kha-pb-wrap {
    width: min(92vw, 720px);
    max-width: min(92vw, 720px);
  }

  .kha-pb-pos-top_bar,
  .kha-pb-pos-bottom_bar {
    width: min(96vw, 980px);
    max-width: min(96vw, 980px);
  }
}

@media (max-width: 480px) {
  .kha-pb-wrap,
  .kha-pb-pos-top_bar,
  .kha-pb-pos-bottom_bar {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .kha-pb-wrap {
    border-radius: 12px;
  }

  .kha-pb-wrap img {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .kha-pb-close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 22px;
    line-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kha-pb-overlay,
  .kha-pb-wrap {
    transition: none;
  }
}
