/**
 * 开放平台登录页 - 微信扫码登录专属样式 (login_qr.css)
 * 对标 E:\code\api\public\console\assets\css\app.css 架构
 * 遵循 Awwwards 顶级设计水准与 Lucide 矢量图标规范，界面全程禁止使用 Emoji
 */

/* 登录卡片容器增强 */
.login-card-container {
    position: relative !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04) !important;
    background: #ffffff !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 右上角方式切换按钮 (.change_t) */
.change_t {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    cursor: pointer !important;
    z-index: 25 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
}

.change_t:hover {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #2563eb !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}

.change_t .change_t_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.change_t img.code-img-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

/* 账号密码 Tab (.usertab) */
.usertab {
    display: block;
    animation: fadeInTab 0.25s ease-out;
}

/* 二维码扫码 Tab (.codetab) */
.codetab {
    display: none;
    padding: 10px 0 16px 0;
    text-align: center;
    position: relative;
    animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 二维码展示框包装器 */
.qrcode-box-wrapper {
    position: relative;
    width: 202px;
    height: 202px;
    margin: 12px auto 0 auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.qrcode-box-wrapper:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.qrcode-canvas-target {
    width: 188px;
    height: 188px;
    margin: 0 auto;
    position: relative;
    display: block;
}

/* 严禁 canvas 与 img 并存显示，防止 qrcode.js 生成的双元素在容器内被并排撕裂 */
.qrcode-canvas-target canvas {
    display: none !important;
}

.qrcode-canvas-target img {
    width: 188px !important;
    height: 188px !important;
    max-width: 188px !important;
    max-height: 188px !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 4px;
    object-fit: contain;
}

#QrCodeReload {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

/* 遮罩层基类 (.code_mask) */
.code_mask {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(3px);
    border-radius: 7px;
    z-index: 20;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    text-align: center;
    cursor: pointer;
}

.code_mask .mask-icon {
    margin-bottom: 8px;
    display: inline-block;
}

.code_mask .mask-icon svg {
    width: 40px;
    height: 40px;
}

.code_mask .mask-text {
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    display: block !important;
}

/* 扫码成功遮罩 (.code_mask.success) */
.code_mask.success {
    background: rgba(6, 78, 59, 0.88);
}

.code_mask.success .mask-icon {
    color: #34d399;
}

.code_mask.success .mask-icon svg {
    stroke: #34d399;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.6));
}

/* 二维码过期遮罩 (.code_mask.qrcode-expire) */
.code_mask.qrcode-expire {
    background: rgba(30, 41, 59, 0.9);
}

.code_mask.qrcode-expire .mask-icon {
    color: #fbbf24;
}

.code_mask.qrcode-expire .mask-icon svg {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.code_mask.qrcode-expire:hover {
    background: rgba(15, 23, 42, 0.94);
}

.code_mask.qrcode-expire:hover .mask-text {
    color: #60a5fa !important;
}

/* 无权限/拒绝遮罩 (.code_mask.error-denied) */
.code_mask.error-denied {
    background: rgba(136, 19, 55, 0.92);
}

.code_mask.error-denied .mask-icon {
    color: #fb7185;
}

.code_mask.error-denied .mask-icon svg {
    stroke: #fb7185;
    filter: drop-shadow(0 0 8px rgba(251, 113, 133, 0.6));
}

.code_mask.error-denied:hover {
    background: rgba(159, 18, 57, 0.96);
}

.code_mask.error-denied:hover .mask-text {
    color: #fecdd3 !important;
}

/* 底部状态提示文案 */
.qrcode-footer-hint {
    margin-top: 14px;
    text-align: center;
}

.qrcode-footer-hint .show-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.qrcode-footer-hint .sub-text {
    font-size: 12px !important;
    color: #94a3b8 !important;
    display: block;
}

/* 微信图标微型装饰 */
.wechat-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #07c160;
    font-weight: 600;
}
