/* ============================================
   扫码授权登录 - PC双栏 + 移动堆叠
   依赖 auth.css（login-card / login-header 等）
   ============================================ */

/* 扫码卡片 - PC 放宽 */
.login-card-qrcode {
    max-width: 720px;
    padding: 2.5rem 2.25rem 2.25rem;
}

/* ========== 主体双栏容器 ========== */
.qrcode-main {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.qrcode-left,
.qrcode-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.qrcode-left {
    padding-right: 2rem;
}

/* ========== 二维码区域 ========== */
.qrcode-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}
.qrcode-box {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid #e8edf2;
    margin-bottom: 1rem;
}
#qrcodeCanvas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4px;
}
.qrcode-status {
    font-size: 0.84rem;
    color: #64748b;
    font-weight: 500;
    margin: 0 0 0.5rem;
}
.qrcode-tips {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
}

/* 过期/扫描成功遮罩 */
.qrcode-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    border-radius: 15px;
}
.qrcode-mask span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.qrcode-refresh-btn {
    margin-top: 0.25rem;
    padding: 0.35rem 1rem;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.qrcode-refresh-btn:hover {
    background: #2563eb;
}
.qrcode-scanned svg {
    animation: scan-success-bounce 0.4s ease-out;
}
@keyframes scan-success-bounce {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* 二维码加载动画 */
.qrcode-loading-icon {
    animation: qrcode-spin 1.5s linear infinite;
}
@keyframes qrcode-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 分隔线（仅 PC 显示） ========== */
.qrcode-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
    flex-shrink: 0;
}
.qrcode-divider-line {
    width: 1px;
    flex: 1;
    min-height: 40px;
    background: linear-gradient(180deg, transparent, #e2e8f0 30%, #e2e8f0 70%, transparent);
}
.qrcode-divider-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
    background: #fff;
    padding: 0.15rem 0;
}

/* ========== 左侧扫码应用文字标签 ========== */
.qrcode-scan-tips {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 0.65rem;
    text-align: center;
}
.qrcode-scan-apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.qrcode-scan-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.15s;
}
.qrcode-scan-tag:hover {
    transform: translateY(-1px);
}
.scan-wx      { background: #e6f9ef; color: #07C160; border: 1px solid #b7ebd0; }
.scan-wework  { background: #e6f9ef; color: #06AE56; border: 1px solid #b7ebd0; }
.scan-geek    { background: #eff6ff; color: #3B82F6; border: 1px solid #bfdbfe; }
.scan-qq      { background: #f0f9ff; color: #12B7F5; border: 1px solid #bae6fd; }
.scan-ding    { background: #eff6ff; color: #0089FB; border: 1px solid #bfdbfe; }
.scan-feishu  { background: #eef4ff; color: #3370FF; border: 1px solid #c7d2fe; }
.scan-alipay  { background: #eff6ff; color: #1677FF; border: 1px solid #bfdbfe; }

/* ========== 右侧 OAuth 入口 ========== */
.qrcode-right {
    padding-left: 2rem;
    justify-content: center;
}

/* OAuth 横版按钮列表 */
.qrcode-oauth-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 260px;
}
.qrcode-oauth-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid #e8edf2;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.qrcode-oauth-btn:hover {
    border-color: #93c5fd;
    background: #f8faff;
    transform: translateX(3px);
    box-shadow: 0 3px 12px rgba(59,130,246,0.08);
}
.qrcode-oauth-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.qrcode-oauth-btn-icon svg {
    width: 18px;
    height: 18px;
}
.qrcode-oauth-btn-text {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

/* ========== 移动端：堆叠布局 ========== */
@media (max-width: 767.98px) {
    .login-card-qrcode {
        max-width: 500px;
        padding: 2rem 1.5rem 1.75rem;
    }
    .qrcode-main {
        flex-direction: column;
        gap: 1.25rem;
    }
    .qrcode-left {
        padding-right: 0;
        align-items: center;
    }
    .qrcode-right {
        padding-left: 0;
        align-items: center;
    }

    /* 分隔线变为水平 */
    .qrcode-divider {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0;
    }
    .qrcode-divider-line {
        width: auto;
        flex: 1;
        min-height: auto;
        height: 1px;
        min-width: 40px;
        background: linear-gradient(90deg, transparent, #e2e8f0 30%, #e2e8f0 70%, transparent);
    }

    /* 移动端 OAuth 按钮自适应 */
    .qrcode-oauth-list {
        max-width: 100%;
    }
    .qrcode-oauth-btn {
        padding: 0.55rem 0.75rem;
    }
    .qrcode-oauth-btn-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .qrcode-oauth-btn-icon svg {
        width: 16px;
        height: 16px;
    }

    /* 扫码文字标签自适应 */
    .qrcode-scan-tag {
        font-size: 0.68rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 479.98px) {
    .login-card-qrcode {
        padding: 1.75rem 1.25rem 1.5rem;
    }
    .qrcode-scan-tag {
        font-size: 0.65rem;
        padding: 0.18rem 0.5rem;
    }
    .qrcode-oauth-btn {
        padding: 0.5rem 0.65rem;
        border-radius: 8px;
    }
    .qrcode-oauth-btn-icon {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }
    .qrcode-oauth-btn-icon svg {
        width: 14px;
        height: 14px;
    }
    .qrcode-oauth-btn-text {
        font-size: 0.72rem;
    }
}
