/*!
 * 合格投资者认定弹窗（Investor Gate）
 * 适用：金葵花资本 PbootCMS 站点
 * 说明：所有样式均限定在 #investorGate 内，避免影响站点 Bootstrap 样式。
 */

#investorGate,
#investorGate *,
#investorGate *::before,
#investorGate *::after {
  box-sizing: border-box;
}

#investorGate[hidden] {
  display: none !important;
}

#investorGate {
  position: fixed;
  top: 0;
  left: 0;
  /* 用 100vw 而非 inset:0：页面自身存在横向溢出时，遮罩仍与可视视口等宽 */
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 17, 30, 0.74);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  backdrop-filter: blur(8px) saturate(130%);
  opacity: 0;
  transition: opacity 0.22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.75;
  color: #4a5568;
}

#investorGate.ig-visible {
  opacity: 1;
}

#investorGate .ig-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(4, 10, 20, 0.38), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.24s ease;
  outline: none;
}

#investorGate.ig-visible .ig-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#investorGate .ig-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c9a24b 0%, #e3c680 45%, #c9a24b 100%);
  z-index: 1;
}

/* 仅供读屏的说明文字 */
#investorGate .ig-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 头部 ---------- */
#investorGate .ig-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 30px 18px;
  border-bottom: 1px solid #eef1f5;
  background: linear-gradient(180deg, #fdfcf9 0%, #ffffff 100%);
}

#investorGate .ig-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

#investorGate .ig-brand {
  min-width: 0;
}

#investorGate .ig-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b08a3e;
  font-weight: 600;
}

#investorGate .ig-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
  color: #16233a;
  letter-spacing: 0.02em;
}

#investorGate .ig-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8b95a5;
}

/* ---------- 正文 ---------- */
#investorGate .ig-content-wrap {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

#investorGate .ig-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 30px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14px;
  color: #4a5568;
  scrollbar-width: thin;
  scrollbar-color: #cbd3dd transparent;
}

#investorGate .ig-content:focus {
  outline: none;
}

#investorGate .ig-content::-webkit-scrollbar {
  width: 6px;
}

#investorGate .ig-content::-webkit-scrollbar-thumb {
  background: #cbd3dd;
  border-radius: 3px;
}

#investorGate .ig-scroll-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.65) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

#investorGate .ig-content-wrap.ig-has-more .ig-scroll-fade {
  opacity: 1;
  visibility: visible;
}

#investorGate .ig-scroll-tip {
  margin: 0 0 8px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: #b08a3e;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#investorGate .ig-actions.ig-read-done .ig-scroll-tip {
  opacity: 0;
  visibility: hidden;
}

#investorGate .ig-content p {
  margin: 0 0 12px;
  text-align: justify;
}

#investorGate .ig-lead {
  font-size: 14.5px;
  color: #2f3b4d;
}

#investorGate .ig-callout {
  margin: 16px 0 20px;
  padding: 14px 18px;
  background: #fbf6e9;
  border-left: 3px solid #c9a24b;
  border-radius: 0 8px 8px 0;
  color: #4b3d1e;
  font-size: 14px;
}

#investorGate .ig-callout strong {
  color: #8a6a2f;
  font-weight: 600;
}

#investorGate .ig-section-title {
  margin: 20px 0 8px;
  padding-left: 11px;
  border-left: 3px solid #c9a24b;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  color: #16233a;
}

#investorGate .ig-list {
  margin: 0 0 6px;
  padding-left: 20px;
  /* 站点 aoyun.css 全局重置了 li{list-style:none}，这里显式恢复 */
  list-style: disc outside none;
}

#investorGate .ig-list li {
  display: list-item;
  margin: 0 0 6px;
  padding-left: 2px;
  list-style: disc outside none;
}

#investorGate .ig-list li::marker {
  color: #c9a24b;
}

#investorGate .ig-em {
  color: #16233a;
  font-weight: 600;
}

#investorGate .ig-fine {
  font-size: 12.5px;
  line-height: 1.7;
  color: #8b95a5;
}

#investorGate .ig-risk {
  margin: 18px 0 12px;
  padding: 12px 16px;
  background: #f7f8fa;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #6b7688;
}

/* ---------- 底部操作区 ---------- */
#investorGate .ig-actions {
  flex: 0 0 auto;
  padding: 16px 30px 20px;
  border-top: 1px solid #eef1f5;
  background: #ffffff;
}

#investorGate .ig-btn {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease,
    color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

#investorGate .ig-btn:focus-visible {
  outline: 2px solid #c9a24b;
  outline-offset: 2px;
}

#investorGate .ig-btn-primary {
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1d304c 0%, #122033 100%);
  box-shadow: 0 8px 20px rgba(18, 32, 51, 0.22);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

#investorGate .ig-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(18, 32, 51, 0.3);
  background: linear-gradient(180deg, #24405f 0%, #16283f 100%);
}

#investorGate .ig-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(18, 32, 51, 0.2);
}

#investorGate .ig-btn-ghost {
  height: 38px;
  margin-top: 6px;
  background: transparent;
  color: #8b95a5;
  font-size: 13px;
}

#investorGate .ig-btn-ghost:hover {
  color: #5b6779;
  text-decoration: underline;
}

#investorGate .ig-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: #a0a9b7;
}

/* ---------- 页面滚动锁 ---------- */
body.ig-lock {
  overflow: hidden !important;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  #investorGate {
    align-items: flex-end;
    padding: 0;
  }

  #investorGate .ig-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(28px);
  }

  #investorGate .ig-top {
    padding: 22px 20px 14px;
  }

  #investorGate .ig-logo {
    height: 38px;
    max-width: 160px;
  }

  #investorGate .ig-title {
    font-size: 19px;
  }

  #investorGate .ig-content {
    padding: 18px 20px 24px;
    font-size: 14px;
  }

  #investorGate .ig-actions {
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  #investorGate .ig-btn-primary {
    height: 47px;
    font-size: 14.5px;
  }
}

/* 小屏手机（320~380px）进一步压缩头部，避免标题与 logo 争抢空间 */
@media (max-width: 380px) {
  #investorGate .ig-top {
    gap: 10px;
    padding: 18px 18px 14px;
  }

  #investorGate .ig-logo {
    height: 30px;
    max-width: 118px;
  }

  #investorGate .ig-eyebrow {
    display: none;
  }

  #investorGate .ig-title {
    font-size: 17px;
  }

  #investorGate .ig-subtitle {
    font-size: 11px;
  }

  #investorGate .ig-content {
    padding: 16px 18px 20px;
  }

  #investorGate .ig-actions {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-height: 560px) {
  #investorGate {
    align-items: flex-start;
    padding: 8px;
  }

  #investorGate .ig-dialog {
    max-height: calc(100vh - 16px);
  }

  #investorGate .ig-top {
    padding: 14px 22px 10px;
  }

  #investorGate .ig-logo {
    height: 32px;
  }

  #investorGate .ig-eyebrow,
  #investorGate .ig-subtitle {
    display: none;
  }

  #investorGate .ig-title {
    font-size: 18px;
  }

  #investorGate .ig-content {
    padding: 12px 22px 18px;
    font-size: 13.5px;
  }

  #investorGate .ig-actions {
    padding: 10px 22px 12px;
  }

  #investorGate .ig-scroll-tip {
    margin-bottom: 4px;
  }

  #investorGate .ig-btn-primary {
    height: 42px;
    font-size: 14px;
  }

  #investorGate .ig-btn-ghost {
    height: 32px;
    margin-top: 2px;
  }

  #investorGate .ig-note {
    display: none;
  }
}

/* ---------- 动效与打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  #investorGate,
  #investorGate .ig-dialog {
    transition: none;
  }
}

@media print {
  #investorGate {
    display: none !important;
  }
}
