html.aeros-popup-lock,
body.aeros-popup-lock {
  overflow: hidden;
}

.aeros-popups {
  position: relative;
  z-index: 220;
}

.aeros-site-popup {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 10, 16, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s linear;
}

.aeros-site-popup.is-top {
  place-items: start center;
  padding-top: max(24px, 4vh);
}

.aeros-site-popup.is-bottom {
  place-items: end center;
  padding-bottom: max(24px, 4vh);
}

.aeros-site-popup.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.aeros-site-popup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(var(--aeros-popup-w, 560px), 100%);
  max-height: var(--aeros-popup-h, 86vh);
  overflow: hidden;
  background: var(--aeros-popup-bg, #fff);
  color: var(--aeros-popup-text, #121820);
  border-radius: var(--aeros-popup-radius, 24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.96);
  filter: blur(6px);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.aeros-site-popup.is-anim-fade .aeros-site-popup-card {
  transform: none;
  filter: none;
}

.aeros-site-popup.is-anim-slide .aeros-site-popup-card {
  transform: translate3d(0, 48px, 0);
  filter: none;
}

.aeros-site-popup.is-on .aeros-site-popup-card {
  opacity: 1;
  transform: none;
  filter: none;
}

.aeros-site-popup.is-layout-side .aeros-site-popup-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.aeros-site-popup-media {
  min-height: 160px;
  background: #f4f6f9;
  overflow: hidden;
}

.aeros-site-popup-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
}

.aeros-site-popup.is-layout-top .aeros-site-popup-media {
  max-height: min(42vh, 320px);
  min-height: 160px;
  flex: 0 0 auto;
}
.aeros-site-popup.is-media-only .aeros-site-popup-card {
  padding: 0;
}
.aeros-site-popup.is-media-only .aeros-site-popup-scroller {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 22px 12px 12px;
}
.aeros-site-popup .chair-bar {
  top: 52px;
  right: 8px;
  bottom: 14px;
  overflow: hidden;
}
.aeros-site-popup.is-media-only .aeros-site-popup-scroll.chair-scroll {
  max-height: var(--aeros-popup-h, 78vh);
}
.aeros-site-popup.is-media-only .aeros-site-popup-media {
  max-height: none;
  min-height: 0;
  height: auto;
  background: transparent;
}
.aeros-site-popup.is-media-only .aeros-site-popup-media img {
  height: auto;
  max-height: none;
  object-fit: contain;
}
html[data-theme="dark"] .aeros-site-popup-media {
  background: #0b1220;
}

.aeros-site-popup.is-layout-side .aeros-site-popup-media {
  min-height: 100%;
}

.aeros-site-popup-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 28px 24px 22px;
  overflow: hidden;
}
.aeros-site-popup-scroller {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 16px;
}
.aeros-site-popup-scroller:not(.is-scrollable) .chair-bar {
  opacity: 0.35;
}
.aeros-site-popup .aeros-site-popup-scroll.chair-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
  max-height: var(--aeros-popup-h, 70vh);
}
.aeros-site-popup-body .aeros-site-popup-scroll.chair-scroll {
  max-height: var(--aeros-popup-h, 48vh);
}
.aeros-site-popup-actions {
  flex: 0 0 auto;
}

.aeros-site-popup-kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aeros-popup-accent, #f47b1f);
}

.aeros-site-popup-title {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.aeros-site-popup-subtitle {
  margin: 0;
  color: color-mix(in srgb, var(--aeros-popup-text, #121820) 68%, transparent);
  font-size: 15px;
  line-height: 1.55;
}

.aeros-site-popup-content {
  font-size: 15px;
  line-height: 1.65;
}

.aeros-site-popup-content > *:first-child {
  margin-top: 0;
}

.aeros-site-popup-content > *:last-child {
  margin-bottom: 0;
}

.aeros-site-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.aeros-site-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--aeros-popup-accent, #f47b1f);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
}

.aeros-site-popup-btn:hover {
  filter: brightness(1.05);
}

.aeros-site-popup-optout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: color-mix(in srgb, var(--aeros-popup-text, #121820) 70%, transparent);
  cursor: pointer;
  user-select: none;
}

.aeros-site-popup-optout input {
  width: 16px;
  height: 16px;
  accent-color: var(--aeros-popup-accent, #f47b1f);
}

.aeros-site-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--aeros-popup-bg, #fff) 88%, #8a93a3);
  color: inherit;
  cursor: pointer;
  z-index: 6;
  padding: 0;
  transition: background-color 0.28s ease, color 0.28s ease, transform 0.28s ease;
}

.aeros-site-popup-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.aeros-site-popup-close:hover {
  background: var(--aeros-popup-accent, #f47b1f);
  color: #fff;
  transform: rotate(90deg);
}

html[data-theme="dark"] .aeros-site-popup-card {
  background: var(--aeros-popup-bg, #121b2b);
  color: var(--aeros-popup-text, #f4f6f9);
}

@media (max-width: 720px) {
  .aeros-site-popup.is-layout-side .aeros-site-popup-card {
    grid-template-columns: 1fr;
  }
  .aeros-site-popup.is-layout-side .aeros-site-popup-media {
    max-height: 180px;
    min-height: 140px;
  }
  .aeros-site-popup-body {
    padding: 22px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aeros-site-popup,
  .aeros-site-popup-card,
  .aeros-site-popup-close {
    transition: none;
  }
}
