/* BTPX 電郵送達檢測 pop-up（非侵入式）
   只在使用本檔的頁面生效；與右下 Chatbot 錯開：桌面左下、手機往上抬。 */
#epPopup {
  position: fixed; left: 20px; bottom: 20px;
  width: 372px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 16px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 14px 44px rgba(0,0,0,.20);
  z-index: 9998; overflow: hidden;
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  color: #1d2127;
  opacity: 0; transform: translateY(18px) scale(.98);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s ease;
}
#epPopup.is-open { opacity: 1; transform: none; pointer-events: auto; }

#epPopup .ep-head {
  background: linear-gradient(120deg,#031b4e,#0165a8);
  color: #fff; padding: 15px 18px 14px; position: relative;
}
#epPopup .ep-tag {
  display: inline-block; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  font-size: .66rem; letter-spacing: .6px;
  padding: 3px 9px; border-radius: 20px; margin-bottom: 9px;
}
#epPopup .ep-head h2 { margin: 0; font-size: 1.06rem; line-height: 1.45; font-weight: 700; padding-right: 30px; }
#epPopup .ep-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 10px;
}
#epPopup .ep-close:hover { background: rgba(255,255,255,.16); }

#epPopup .ep-body { padding: 15px 18px 17px; }
#epPopup .ep-body p { margin: 0 0 12px; font-size: .86rem; line-height: 1.75; color: #40495a; }
#epPopup .ep-body p b { color: #1d2127; }
#epPopup .ep-list { list-style: none; margin: 0 0 15px; padding: 0; }
#epPopup .ep-list li { font-size: .82rem; color: #3a4556; padding: 5px 0 5px 24px; position: relative; line-height: 1.5; }
#epPopup .ep-list li::before { content: "\2713"; position: absolute; left: 0; top: 5px; color: #0184b5; font-weight: 800; }
#epPopup .ep-cta {
  display: block; background: #01a7e5; color: #fff; text-align: center;
  padding: 12px; border-radius: 9px; font-size: .92rem; font-weight: 700;
  text-decoration: none; letter-spacing: .3px;
}
#epPopup .ep-cta:hover { background: #0184b5; }
#epPopup .ep-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; font-size: .76rem; }
#epPopup .ep-sub a { color: #0184b5; text-decoration: underline; }
#epPopup .ep-sub button { border: 0; background: none; color: #6b7280; cursor: pointer; font-size: .76rem; padding: 6px; }
#epPopup .ep-foot { background: #f7f9fb; border-top: 1px solid #e5e5e5; padding: 8px 18px; font-size: .7rem; color: #8a94a3; text-align: center; }

@media (max-width: 640px) {
  /* 手機：貼底但往上抬，右下留給既有 Chatbot，兩者不重疊 */
  #epPopup { left: 12px; right: 12px; bottom: 76px; width: auto; max-width: none; }
  #epPopup .ep-head { padding: 10px 44px 10px 14px; }
  #epPopup .ep-tag { font-size: .62rem; margin-bottom: 6px; padding: 2px 8px; }
  #epPopup .ep-head h2 { font-size: .92rem; line-height: 1.4; }
  #epPopup .ep-close { top: 6px; right: 6px; }
  #epPopup .ep-body { padding: 10px 14px 11px; }
  #epPopup .ep-body p { font-size: .78rem; line-height: 1.6; margin-bottom: 9px; }
  #epPopup .ep-p2 { display: none; }
  #epPopup .ep-list { margin-bottom: 10px; }
  #epPopup .ep-list li { font-size: .76rem; padding: 2px 0 2px 20px; }
  #epPopup .ep-list li:nth-child(2), #epPopup .ep-list li:nth-child(3) { display: none; }
  #epPopup .ep-cta { padding: 10px; font-size: .86rem; }
  #epPopup .ep-sub { margin-top: 9px; }
  #epPopup .ep-foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #epPopup { transition: none; }
}
