/* SweetAlert2 全局置顶 — 高于 layui layer / 抽屉 / 固定顶栏 */

:root {
    --wm-swal-z: 2147483647;
}

html body .swal2-container,
body .swal2-container,
body .swal2-container.wm-swal-top-layer {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--wm-swal-z) !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body .swal2-container.swal2-backdrop-show,
body .swal2-container.swal2-noanimation {
    pointer-events: auto;
}

body.swal2-shown .swal2-container,
body.swal2-shown:not(.swal2-toast-shown) .swal2-container,
body.swal2-shown .swal2-container.swal2-top,
body.swal2-shown .swal2-container.swal2-top-end,
body.swal2-shown .swal2-container.swal2-top-start {
    z-index: var(--wm-swal-z) !important;
}

body .swal2-container .swal2-popup {
    z-index: 1;
    position: relative;
}

/* 客服二维码弹窗 */
.wm-cs-swal-popup {
    border-radius: 16px !important;
    width: min(340px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 0 0 0.5rem !important;
}

.wm-cs-swal-popup .swal2-title {
    font-size: 17px !important;
    padding: 1rem 1rem 0.5rem !important;
}

.wm-cs-swal-html {
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 1rem !important;
}

.wm-cs-swal-popup .swal2-actions {
    margin: 0.75rem 0 0.5rem !important;
    padding: 0 1rem !important;
}

.wm-cs-swal-popup .swal2-confirm {
    min-width: 120px;
    border-radius: 999px !important;
    font-weight: 600 !important;
}

.wm-cs-qr-modal {
    text-align: center;
}

.wm-cs-qr-modal__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.wm-cs-qr-modal__img {
    display: block;
    width: 220px;
    height: 220px;
    max-width: min(220px, calc(100vw - 96px));
    max-height: min(220px, calc(100vw - 96px));
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.wm-cs-qr-modal__wechat {
    margin: 0 0 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.wm-cs-qr-modal__label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.wm-cs-qr-modal__id {
    font-size: 16px;
    color: #1d4ed8;
    word-break: break-all;
}

.wm-cs-qr-modal__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 8px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wm-cs-qr-modal__copy:active {
    opacity: 0.85;
}

.wm-cs-qr-modal__hint {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.6;
}
