/* ============================================================================
   Lumina Gut — 订阅弹窗（Brevo 集成 · 任务 1）
   规格：brevo-website-integration-spec.md
   文案逐字固定，勿改。
   ============================================================================ */

#lg-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 31, 31, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
#lg-popup-overlay.lg-open { opacity: 1; }
#lg-popup-overlay[hidden] { display: none; }

#lg-popup {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #FAF8F5;
  border: 1px solid #E2D6ED;
  border-radius: 1.25rem;
  box-shadow: 0 12px 35px -5px rgba(94, 58, 133, 0.22), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  padding: 2.25rem 1.75rem 1.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1F1F1F;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.3s ease;
}
#lg-popup-overlay.lg-open #lg-popup { transform: translateY(0); }

/* 右上角关闭 X —— 移动端同样存在且可点（≥40px 触控目标） */
#lg-popup-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: #4A4A4A;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
#lg-popup-close:hover,
#lg-popup-close:focus-visible { background: #F6F2FA; color: #5E3A85; outline: none; }

#lg-popup-title {
  font-size: 1.75rem;          /* 28px ≥ 移动端要求的 24px */
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: #1F1F1F;
}

#lg-popup-sub {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #4A4A4A;
  margin: 0 0 1.4rem;
}

#lg-popup-form { display: block; }

#lg-popup-email {
  width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  border: 1px solid #E2D6ED;
  border-radius: 0.75rem;
  background: #FFFFFF;
  font-size: 1rem;
  color: #1F1F1F;
  margin-bottom: 0.75rem;
}
#lg-popup-email:focus {
  outline: none;
  border-color: #5E3A85;
  box-shadow: 0 0 0 3px rgba(203, 183, 223, 0.45);
}
#lg-popup-email::placeholder { color: #9A9A9A; }

#lg-popup-submit {
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: #5E3A85;
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
#lg-popup-submit:hover:not(:disabled) { background: #4B2E6B; }
#lg-popup-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* honeypot：视觉与辅助技术均不可见 */
#lg-popup-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#lg-popup-msg {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.75rem 0 0;
  min-height: 1px;
}
#lg-popup-msg.lg-err { color: #B45309; }
#lg-popup-msg.lg-ok { color: #3B6B4D; font-weight: 600; }

#lg-popup-success { font-size: 0.9375rem; line-height: 1.6; color: #3B6B4D; font-weight: 600; }

#lg-popup-download {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8125rem 1.25rem;
  border-radius: 0.75rem;
  background: #3B6B4D;
  color: #FFFFFF;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
#lg-popup-download:hover { background: #2F563E; }

#lg-popup-fine {
  font-size: 0.75rem;
  color: #7A7A7A;
  margin: 1.15rem 0 0;
}

/* 弹窗打开时锁定背景滚动 */
body.lg-popup-locked { overflow: hidden; }

@media (max-width: 480px) {
  #lg-popup { padding: 2rem 1.25rem 1.5rem; border-radius: 1rem; }
  #lg-popup-title { font-size: 1.5rem; }  /* 24px，规格下限 */
}
