/* ============================================================
   Popup modal system
   Three layouts: center (modal + backdrop), banner (top strip),
   corner (bottom-right toast). Markup is generated by data-loader.
   ============================================================ */

.popup {
  position: fixed;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.popup.popup-show { opacity: 1; pointer-events: auto; }

.popup-inner {
  position: relative;
  background: #0F1F45;
  border: 1px solid rgba(125, 211, 216, 0.25);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.popup-content { padding: 28px 32px 24px; }
.popup-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: #fff;
}
.popup-subtitle {
  font-size: 13px;
  color: var(--cyan-soft, #7DD3D8);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.popup-body {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 18px;
}
.popup-cta {
  display: inline-block;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
}

.popup-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: background .2s;
}
.popup-close:hover { background: rgba(255, 255, 255, 0.18); }

.popup-dismiss {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 16px 16px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  cursor: pointer;
  transition: color .2s, background .2s;
  font-family: inherit;
}
.popup-dismiss:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.popup-image img {
  width: 100%;
  display: block;
  border-radius: 16px 16px 0 0;
}

/* ===== CENTER modal =====
   Multiple center popups share a single fixed stage so they line up
   side-by-side in the middle of the screen. No backdrop blur — the
   page behind stays crisp and readable. */
.popup-center-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  pointer-events: none;
  flex-wrap: wrap;
}
.popup-center {
  position: relative;
  inset: auto;
  display: block;
  padding: 0;
  pointer-events: auto;
}
.popup-center .popup-inner {
  width: 380px;
  max-width: 100%;
  transform: translateY(20px) scale(0.96);
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
}
.popup-center.popup-show .popup-inner {
  transform: translateY(0) scale(1);
}
/* Faint scrim so the popups feel anchored — but NO blur. */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 28, 0.35);
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s;
}
.popup-backdrop.popup-backdrop-show { opacity: 1; }

/* ===== BANNER (top strip) ===== */
.popup-banner {
  top: 0; left: 0; right: 0;
  transform: translateY(-10px);
  transition: opacity .3s, transform .3s;
}
.popup-banner.popup-show { transform: translateY(0); }
.popup-banner .popup-inner {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}
.popup-banner .popup-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 56px 14px 24px;
  flex-wrap: wrap;
}
.popup-banner .popup-title { font-size: 14px; margin: 0; }
.popup-banner .popup-body  { font-size: 13px; margin: 0; }
.popup-banner .popup-cta   { padding: 7px 14px; font-size: 12px; }
.popup-banner .popup-dismiss { display: none; }

/* ===== CORNER (bottom-right toast) ===== */
.popup-corner {
  bottom: 24px; right: 24px;
  max-width: calc(100vw - 48px);
  width: 360px;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
}
.popup-corner.popup-show { transform: translateY(0); }

/* Responsive */
@media (max-width: 520px) {
  .popup-center-stage { gap: 12px; padding: 16px; }
  .popup-center .popup-inner { width: 100%; }
  .popup-content { padding: 22px 22px 18px; }
  .popup-title { font-size: 18px; }
  .popup-corner {
    left: 16px; right: 16px; bottom: 16px;
    width: auto;
  }
}
