/* =========================================
   Part 1: 栅格系统与工具类
   ========================================= */

/* 局部盒模型重置 */
.wx-lock-container, .wx-lock-container * {
    box-sizing: border-box;
}

/* 栅格系统基础 */
.cm-grid {
    padding-right: 15px; padding-left: 15px;
    margin-right: 1px; margin-left: 1px; margin-bottom: 1px; padding-top: 1px;
}
.cm-grid:after, .cm-grid:before, .cm-row:after, .cm-row:before {
    content: ""; clear: both; display: table;
}
.cm-row { margin-left: -15px; margin-right: -15px; }
.cm-row [class*=cm-col] {
    position: relative; float: left; min-height: 1px;
    /* 基础列内边距 */
    padding-left: 15px; padding-right: 15px;
}

/* 响应式宽度设定 */
.cm-col-md-4 { width: 33.33333%; }
.cm-col-md-8 { width: 66.66666%; }

/* 手机端栅格适配优化 */
@media (max-width: 768px) {
    .cm-col-md-4, .cm-col-md-8 {
        width: 100%; /* 手机上一行一个 */
        float: none;
    }
    
    /* 手机端列间距优化 */
    .wx-qr-col {
        padding-top: 20px !important;
        padding-bottom: 10px !important;
        display: flex;
        justify-content: center; /* 确保容器本身居中 */
    }
}

/* 提示框与卡片组件 */
.cm-alert {
    border-radius: 3px; padding: 15px;
    margin-bottom: 15px; background-color: #fff;
    box-shadow: 0 .5em 1.5em 0 rgba(0,0,0,.1);
}
.primary.cm-alert { background-color: #7db1f1; color: #fff; }

.cm-card {
    overflow: hidden; margin-bottom: 15px; border-radius: 3px;
    box-shadow: 0 .5em 1.5em 0 rgba(0,0,0,.1);
    background: #fff;
}

/* 按钮基础样式 */
.cm-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border-radius: 3px;
    border: none;
    color: #fff;
}
.success.cm-btn { background-color: #000000c2; }
.cm-btn:hover { opacity: 0.9; }
.cm-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 图片响应式 */
.cm-resp-img { width: 100%; height: auto; }


/* =========================================
   Part 2: 插件核心逻辑样式
   ========================================= */

/* --- 1. 二维码样式 (背景图模式 - 手机端紧凑优化) --- */
/* 使用 div 背景图来显示二维码，物理隔绝灯箱抓取。
*/
.wx-qr-code-bg {
    background-size: contain; /* 确保二维码完整显示 */
    background-repeat: no-repeat;
    background-position: center center;
    margin: 0 auto; /* 水平居中 */
    
    /* 【修改重点 - 手机端改为固定紧凑尺寸】 */
    /* 不再使用 padding-bottom 撑开，而是设定固定大小 */
    width: 220px !important;  /* 设置一个合适的固定宽度 */
    height: 220px !important; /* 设置相同的高度，保证是正方形 */
    max-width: 90% !important; /* 防止在极小屏幕上溢出 */
    padding-bottom: 0 !important; /* 取消之前的比例占位 */
    background-color: transparent; /* 确保没有多余背景色 */
}

/* 【修改重点 - 电脑端覆盖设定】 */
@media (min-width: 768px) {
    .wx-qr-code-bg {
        /* 电脑端恢复填满左侧栅格的自适应模式 */
        width: 100% !important;
        max-width: 100% !important; 
        height: 0 !important; /* 重置高度 */
        padding-bottom: 100% !important; /* 恢复正方形比例占位技巧 */
    }
}

/* --- 兼容旧代码 --- */
.wx-qr-col img { display: none !important; }

/* --- 2. 整体布局对齐 --- */
.wx-flex-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* 垂直居中 */
    justify-content: center;
}

/* --- 3. 右侧内容区域 --- */
.wx-content-col {
    padding: 20px !important;
    /* 手机端顶部去掉 padding，因为它上面已经是二维码了 */
    @media (max-width: 768px) {
        padding-top: 5px !important;
        padding-bottom: 25px !important;
    }
}

/* --- 4. 提示框微调 --- */
.wx-notice-box {
    width: 100%;
    margin-bottom: 20px !important;
    line-height: 1.6;
}

/* --- 5. 输入框组合容器 --- */
.wx-input-group {
    display: flex;
    width: 100%;
    margin-top: 0 !important;
    position: relative;
}

/* --- 6. 输入框样式 --- */
input.wx-input {
    flex-grow: 1; 
    border: 1px solid #dadada !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
    height: 48px !important;
    padding-left: 15px !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-size: 16px !important;
    color: #333 !important;
    background: #fff !important;
    width: auto !important;
}
input.wx-input:focus {
    border-color: #7db1f1 !important;
    outline: none;
}

/* --- 7. 提交按钮样式 --- */
button.wx-btn {
    width: auto !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    margin: 0 !important;
    height: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0 30px !important;
    cursor: pointer;
    font-size: 16px !important;
}

/* --- 8. 错误/成功提示信息 --- */
#wx_msg_tips {
    margin-top: 10px;
    font-size: 13px;
    min-height: 20px;
}

/* --- 9. 强制隐藏 --- */
.wx-lock-container[style*="display:none"],
.wx-lock-container[style*="display: none"] {
    display: none !important;
}

/* =========================================
   加载动画图标
   ========================================= */
.wx-jimu-loading {
    position: relative; display: inline-block; background: #000;
    width: 6px; height: 14px;
    margin-right: 10px; margin-left: 10px;
    vertical-align: middle; text-indent: -9999em;
    animation: wx-jimu-anim 0.8s infinite ease-in-out;
    animation-delay: 0.16s !important;
}
.wx-jimu-loading:before, .wx-jimu-loading:after {
    position: absolute; top: 0; content: ''; background: #000;
    width: 6px; height: 14px;
    animation: wx-jimu-anim 0.8s infinite ease-in-out;
}
.wx-jimu-loading:before { left: -9px; animation-delay: 0s !important; }
.wx-jimu-loading:after { left: 9px; animation-delay: 0.32s !important; }
@keyframes wx-jimu-anim {
    0%, 80%, 100% { opacity: 0.75; box-shadow: 0 0 #000; height: 14px; }
    40% { opacity: 1; box-shadow: 0 -4px #000; height: 18px; }
}