/* ============================================================
 * Toonies 首页 - WhatsApp 咨询弹窗 (261127)
 * 由 /Public/static/js/pbuy/toonies/whatsapp-popup.js 动态挂载到 <body>
 * 统一前缀 wa-pop- , 不与主题样式 (style.css / bootstrap) 冲突
 * 布局参考 ct-01.jpg; 二维码来自 ct-02.jpg
 * ============================================================ */

.wa-pop-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(236, 238, 246, .74);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.wa-pop-overlay.is-open { opacity: 1; visibility: visible; }

/* 外层包裹: 承载圆形徽章与关闭按钮。
   卡片自身 overflow-y:auto 会裁掉溢出的绝对定位元素, 故徽章挂在 wrap 上。 */
.wa-pop-wrap {
    position: relative;
    box-sizing: border-box;
    width: 820px;
    max-width: 100%;
}

/* ---------- 卡片 ---------- */
.wa-pop-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 52px 48px 26px;
    border-radius: 18px;
    background: linear-gradient(155deg, #fcfcff 0%, #f3f4fb 58%, #eef0f9 100%);
    box-shadow: 0 26px 72px rgba(28, 32, 62, .22), 0 3px 10px rgba(28, 32, 62, .07);
    transform: translateY(16px) scale(.975);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    color: #1b1d24;
}
.wa-pop-overlay.is-open .wa-pop-card { transform: translateY(0) scale(1); }

/* ---------- 顶部圆形徽章 ---------- */
.wa-pop-badge {
    position: absolute;
    top: -52px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 22px rgba(38, 42, 74, .13);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
}
.wa-pop-badge-logo {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #e62e7b;
}
.wa-pop-badge-logo i { font-style: normal; font-size: 9px; font-weight: 700; color: #e62e7b; }
.wa-pop-badge-sub {
    margin-top: 4px;
    font-size: 7px;
    letter-spacing: .2px;
    color: #9aa0b4;
    white-space: nowrap;
}

/* ---------- 关闭按钮 ---------- */
.wa-pop-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(28, 32, 62, .06);
    z-index: 3;
    color: #6b7080;
    font-size: 20px;
    line-height: 34px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.wa-pop-close:hover { background: rgba(28, 32, 62, .12); color: #1b1d24; transform: rotate(90deg); }
.wa-pop-close:focus-visible { outline: 2px solid #1fb25d; outline-offset: 2px; }

/* ---------- 主体两栏 ---------- */
.wa-pop-grid {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 34px;
    align-items: center;
}
.wa-pop-left { text-align: center; }
.wa-pop-qr {
    display: block;
    width: 196px;
    height: 196px;
    margin: 0 auto;
    border-radius: 6px;
    background: #fff;
}
.wa-pop-qr-cap {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    color: #22242c;
    white-space: nowrap;
}

/* ---------- 右栏文案 ---------- */
.wa-pop-title {
    margin: 0 0 10px;
    font-size: 29px;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -.6px;
    color: #16181f;
}
.wa-pop-sub {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.5;
    color: #6d7280;
}
.wa-pop-number {
    margin: 0 0 3px;
    font-size: 19px;
    font-weight: 700;
    color: #16181f;
    white-space: nowrap;
}
.wa-pop-hint {
    margin: 0 0 26px;
    font-size: 12px;
    color: #7c8290;
}
.wa-pop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 196px;
    padding: 14px 34px;
    border-radius: 999px;
    background: #1fb25d;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(31, 178, 93, .34), 0 0 0 9px rgba(31, 178, 93, .10);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.wa-pop-btn:hover {
    background: #1aa452;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(31, 178, 93, .40), 0 0 0 9px rgba(31, 178, 93, .12);
}
.wa-pop-btn:active { transform: translateY(0); }
.wa-pop-btn:focus-visible { outline: 3px solid #0d7a3c; outline-offset: 3px; }
.wa-pop-btn svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- 底部说明 ---------- */
.wa-pop-foot {
    margin: 26px 0 0;
    padding-top: 4px;
    text-align: center;
    font-size: 14px;
    color: #22242c;
}

/* ---------- 中等宽度: 右栏变窄, 略缩标题保证单行 ---------- */
@media (max-width: 900px) {
    .wa-pop-title { font-size: 25px; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 780px) {
    .wa-pop-overlay { padding: 16px; }
    .wa-pop-card { padding: 48px 22px 22px; border-radius: 16px; }
    .wa-pop-badge { top: -42px; width: 88px; height: 88px; }
    .wa-pop-badge-logo { font-size: 13px; }
    .wa-pop-badge-logo i { font-size: 8px; }
    .wa-pop-badge-sub { font-size: 6px; }
    .wa-pop-grid { grid-template-columns: 1fr; gap: 18px; }
    .wa-pop-qr { width: 168px; height: 168px; }
    .wa-pop-qr-cap { margin-top: 10px; font-size: 13px; }
    .wa-pop-right { text-align: center; }
    .wa-pop-title { font-size: 22px; }
    .wa-pop-sub { margin-bottom: 14px; font-size: 13px; }
    .wa-pop-number { font-size: 17px; }
    .wa-pop-hint { margin-bottom: 18px; }
    .wa-pop-btn { min-width: 180px; padding: 12px 28px; font-size: 16px; }
    .wa-pop-foot { margin-top: 18px; font-size: 12px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .wa-pop-overlay, .wa-pop-card, .wa-pop-close, .wa-pop-btn { transition: none !important; }
}
