.ohh-popup[hidden] {
  display: none;
}

.ohh-popup {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 64px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ohh-popup.is-visible {
  opacity: 1;
}

.ohh-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 23, 0.79);
  backdrop-filter: blur(7px);
}

.ohh-popup__dialog {
  position: relative;
  width: min(92vw, var(--ohh-popup-width, 900px), 960px);
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  display: block;
  background:
    radial-gradient(circle at 88% 6%, rgba(126, 25, 84, 0.4), transparent 34%),
    linear-gradient(135deg, #07122e 0%, #080a25 58%, #07091d 100%);
  color: #f8f8ff;
  border: 1px solid rgba(151, 111, 190, 0.32);
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.25s ease;
}

.ohh-popup__dialog::-webkit-scrollbar {
  display: none;
}

.ohh-popup__dialog--has-image {
  display: grid;
  grid-template-columns: minmax(320px, 43%) minmax(0, 57%);
}

.ohh-popup.is-visible .ohh-popup__dialog {
  transform: translateY(0) scale(1);
}

.ohh-popup__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(8, 8, 25, 0.68);
  color: #fff;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.12);
  font: 27px/34px Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ohh-popup__close:hover,
.ohh-popup__close:focus-visible {
  background: #000;
  outline: 2px solid #fff;
  outline-offset: 2px;
  transform: rotate(8deg);
}

.ohh-popup__image {
  min-height: 0;
  align-self: center;
  background: rgba(0, 0, 0, 0.08);
}

.ohh-popup__image img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

.ohh-popup__image picture {
  display: block;
}

.ohh-popup__body {
  align-self: center;
  padding: clamp(28px, 3vw, 40px) clamp(24px, 3vw, 38px);
}

.ohh-popup__body h2 {
  max-width: 720px;
  margin: 0 0 16px;
  color: inherit;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: normal;
}

.ohh-popup__eyebrow {
  margin: 0 0 14px;
  padding-right: 46px;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ohh-popup__content,
.ohh-popup__content p {
  color: #e7e8f3;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 500;
  line-height: 1.55;
}

.ohh-popup__content strong {
  color: #fff;
  font-weight: 800;
}

.ohh-popup__content a {
  color: #ff84ad;
  font-weight: 700;
}

.ohh-popup__content blockquote {
  margin: 14px 0;
  padding: 12px 15px;
  border: 0;
  border-left: 5px solid #ff6f9f;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #e7e8f3;
}

.ohh-popup__content blockquote p {
  margin: 0;
}

.ohh-popup__content ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.ohh-popup__content li {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.ohh-popup__content > :last-child {
  margin-bottom: 0;
}

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

/* A deliberately narrow popup uses a readable single-column composition,
   even when it is opened on a wide desktop screen. */
.ohh-popup__dialog--compact {
  display: block;
  border-radius: 20px;
}

.ohh-popup__dialog--compact .ohh-popup__image {
  min-height: 0;
}

.ohh-popup__dialog--compact .ohh-popup__image img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.ohh-popup__dialog--compact .ohh-popup__body {
  padding: clamp(22px, calc(var(--ohh-popup-width) * 0.055), 34px);
}

.ohh-popup__dialog--compact .ohh-popup__body h2 {
  margin-bottom: 18px;
  padding-right: 26px;
  font-size: clamp(27px, calc(var(--ohh-popup-width) * 0.06), 36px);
  line-height: 1.05;
  overflow-wrap: break-word;
}

.ohh-popup__dialog--compact .ohh-popup__eyebrow {
  display: block;
  margin-bottom: 16px;
  padding-right: 55px;
  font-size: clamp(13px, calc(var(--ohh-popup-width) * 0.03), 17px);
  line-height: 1.4;
  visibility: visible;
}

.ohh-popup__dialog--compact .ohh-popup__content,
.ohh-popup__dialog--compact .ohh-popup__content p {
  font-size: clamp(13px, calc(var(--ohh-popup-width) * 0.028), 15px);
}

.ohh-popup__dialog--compact .ohh-popup__close {
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-width: 2px;
  font-size: 27px;
  line-height: 34px;
}

.ohh-popup__dialog--compact .ohh-popup__content ul {
  grid-template-columns: 1fr;
  gap: 8px;
}

.ohh-popup__dialog--compact .ohh-popup__content li {
  min-height: 0;
}

@media (max-width: 780px) {
  .ohh-popup {
    padding: 10px;
  }

  .ohh-popup__dialog,
  .ohh-popup__dialog--has-image {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .ohh-popup__image {
    min-height: 0;
  }

  .ohh-popup__image img,
  .ohh-popup__dialog--compact .ohh-popup__image img {
    width: 100%;
    height: clamp(150px, 27vh, 210px);
    aspect-ratio: auto;
    min-height: 0;
    object-fit: cover;
    object-position: var(--ohh-mobile-image-x, 50%) var(--ohh-mobile-image-y, 42%);
  }

  .ohh-popup__body,
  .ohh-popup__dialog--compact .ohh-popup__body {
    padding: 20px 18px 22px;
  }

  .ohh-popup__body h2,
  .ohh-popup__dialog--compact .ohh-popup__body h2 {
    margin-bottom: 13px;
    padding-right: 10px;
    font-size: clamp(26px, 8vw, 32px);
    line-height: 1.02;
  }

  .ohh-popup__eyebrow,
  .ohh-popup__dialog--compact .ohh-popup__eyebrow {
    margin-bottom: 10px;
    padding-right: 42px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0.12em;
  }

  .ohh-popup__close,
  .ohh-popup__dialog--compact .ohh-popup__close {
    top: 9px;
    right: 9px;
    width: 36px;
    height: 36px;
    border-width: 2px;
    font-size: 24px;
    line-height: 30px;
  }

  .ohh-popup__content,
  .ohh-popup__content p,
  .ohh-popup__dialog--compact .ohh-popup__content,
  .ohh-popup__dialog--compact .ohh-popup__content p {
    font-size: 13px;
    line-height: 1.4;
  }

  .ohh-popup__content p {
    margin-top: 0;
    margin-bottom: 10px;
  }

  .ohh-popup__content ul {
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 11px 0;
  }

  .ohh-popup__content li {
    min-height: 0;
    padding: 7px 8px;
    border-radius: 10px;
  }

  .ohh-popup__content blockquote {
    margin: 11px 0;
    padding: 10px 12px;
    border-left-width: 4px;
    border-radius: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ohh-popup,
  .ohh-popup__dialog {
    transition: none;
  }
}
