/* ============================================================
   弹窗公告 - 前台样式 v1.0.0
   样式1 横版公告卡 / 样式2 竖版促销卡 / 样式3 右下角通知卡
   ============================================================ */

.pn-mask {
  position: fixed; inset: 0; z-index: 2147482000;
  background: rgba(15, 30, 50, .45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.pn-mask.pn-show { opacity: 1; visibility: visible; }
.pn-lock { overflow: hidden !important; }

/* ---------- 通用卡片 ---------- */
.pn-pop {
  position: fixed; z-index: 2147482001;
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 40, 80, .28);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  text-align: left;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1.2, .36, 1), visibility .3s ease;
}
.pn-pop.pn-show { opacity: 1; visibility: visible; }

.pn-close {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .82); color: #5A6B7E;
  font-size: 15px; line-height: 32px; text-align: center;
  cursor: pointer; transition: background .2s, color .2s;
  box-shadow: 0 2px 8px rgba(20, 40, 70, .14);
}
.pn-close:hover { background: #fff; color: #F05D68; }
.pn-close .fa { font-size: 14px; }

.pn-btn {
  display: inline-block; border: 0; border-radius: 8px;
  padding: 9px 22px; font-size: 14px; line-height: 1.4;
  cursor: pointer; text-decoration: none !important;
  transition: opacity .2s, transform .2s, box-shadow .2s;
}
.pn-btn:hover { opacity: .88; transform: translateY(-1px); }
.pn-btn-primary { background: #3C84F8; color: #fff !important; box-shadow: 0 4px 14px rgba(60, 132, 248, .35); }
.pn-btn-ghost { background: #fff; color: #3C84F8 !important; border: 1px solid #3C84F8; }

/* ---------- 样式1：横版公告卡 ---------- */
.pn-s1 {
  left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.96);
  width: 640px; max-width: 92vw;
  max-height: 86vh; overflow: hidden auto;
  background: linear-gradient(180deg, #EDF5FF 0%, #FFFFFF 130px);
}
.pn-s1.pn-show { transform: translate(-50%, -50%) scale(1); }
.pn-s1-banner {
  position: relative; width: 100%; max-height: 300px; overflow: hidden;
  background: linear-gradient(135deg, #DBEAFE 0%, #EDF5FF 100%);
}
.pn-s1-banner img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; }
.pn-s1-body { padding: 26px 34px 30px; }
.pn-s1-title {
  margin: 0 0 16px; font-size: 21px; font-weight: 700; color: #1F2E3F;
  text-align: center; line-height: 1.5;
}
.pn-s1-text { margin: 0 0 14px; font-size: 14.5px; color: #42566B; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.pn-s1-sign { margin-top: 22px; font-size: 13px; color: #8293A6; line-height: 1.9; white-space: pre-wrap; text-align: right; }
.pn-s1.pn-image { background: #fff; overflow: hidden; }
.pn-s1.pn-image .pn-s1-banner { max-height: none; }
.pn-s1.pn-image .pn-s1-banner img { max-height: none; }
.pn-s1.pn-image a.pn-img-link { display: block; }
/* 背景图平铺模式：图铺满整个弹窗，文案叠在图上 */
.pn-s1.pn-cover { background: #fff; }
.pn-s1-cover {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(135deg, #DBEAFE 0%, #EDF5FF 100%);
}
.pn-s1-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pn-s1.pn-cover .pn-s1-body {
  position: relative; z-index: 1;
  padding: 42px 44px 38px; min-height: 360px;
  display: flex; flex-direction: column; justify-content: center;
}
.pn-s1.pn-cover .pn-s1-title { font-size: 23px; color: #1F2E3F; }
.pn-s1.pn-cover .pn-s1-text { font-size: 15px; color: #24364B; }
.pn-s1.pn-cover .pn-s1-sign { color: #42566B; }

/* ---------- 样式2：竖版促销卡 ---------- */
.pn-s2 {
  left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.96);
  width: 360px; max-width: 88vw; overflow: hidden;
  border-radius: 12px;
}
.pn-s2.pn-show { transform: translate(-50%, -50%) scale(1); }
.pn-s2-head {
  position: relative; height: 150px;
  background: linear-gradient(135deg, #FF6B8B 0%, #FF8E6E 100%);
  overflow: hidden;
}
.pn-s2-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-s2-head .pn-s2-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.pn-s2-head .pn-s2-fallback .fa { font-size: 44px; color: rgba(255, 255, 255, .92); text-shadow: 0 4px 18px rgba(180, 40, 80, .35); }
.pn-s2-head .pn-close { top: 8px; right: 8px; }
.pn-s2-body { padding: 18px 22px 20px; }
.pn-s2-title {
  margin: 0 0 14px; font-size: 17px; font-weight: 700; color: #1F2E3F;
  text-align: center; line-height: 1.5;
}
.pn-s2-lines { margin: 0 0 16px; }
.pn-s2-lines p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.75; color: #42566B; word-break: break-word; }
.pn-s2-lines p:last-child { margin-bottom: 0; }
.pn-s2-lines a { color: inherit; text-decoration: underline; }
.pn-s2-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- 样式3：右下角通知卡 ---------- */
.pn-s3 {
  right: 22px; bottom: 22px;
  transform: translateY(30px) scale(.97);
  width: 340px; max-width: calc(100vw - 32px);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(45, 100, 160, .22), 0 0 0 1px rgba(60, 132, 248, .08);
}
.pn-s3.pn-show { transform: translateY(0) scale(1); }
.pn-s3-head {
  position: relative; height: 118px; overflow: hidden;
  background: linear-gradient(135deg, #3C84F8 0%, #5EA0FA 100%);
}
.pn-s3-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-s3-head .pn-close { background: rgba(255, 255, 255, .85); }
.pn-s3-body { padding: 16px 20px 18px; }
.pn-s3-row { display: flex; align-items: flex-start; gap: 12px; }
.pn-s3-icon {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
  background: #EDF5FF; color: #3C84F8;
  font-size: 16px; line-height: 38px; text-align: center;
}
.pn-s3-main { flex: 1; min-width: 0; }
.pn-s3-title { margin: 2px 0 8px; font-size: 15.5px; font-weight: 700; color: #1F2E3F; line-height: 1.5; }
.pn-s3-text { margin: 0; font-size: 13px; color: #5A6B7E; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.pn-s3-act { margin-top: 14px; text-align: right; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .pn-s1 { width: 92vw; }
  .pn-s1-body { padding: 20px 20px 24px; }
  .pn-s1-title { font-size: 18px; }
  .pn-s2 { width: 86vw; }
  .pn-s3 {
    left: 12px; right: 12px; bottom: 12px; width: auto;
    transform: translateY(30px);
  }
  .pn-s3.pn-show { transform: translateY(0); }
}
