/**
 * 生物识别二维码组件样式
 * 版本：v1.0.0
 * 创建时间：2025-12-03
 */

/* 二维码容器 */
.qr-code-wrapper {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* 二维码画布 */
.qr-code-canvas {
    display: inline-block;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-code-canvas img {
    display: block;
    margin: 0 auto;
}

/* 二维码提示 */
.qr-tips {
    margin-bottom: 20px;
}

.qr-tips-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.qr-tips-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.qr-timer {
    font-size: 14px;
    color: #999;
}

.qr-timer span {
    font-weight: 600;
    color: #667eea;
}

/* 状态指示器 */
.qr-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f5f5f5;
}

/* 等待状态 */
.qr-status-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
}

.qr-pulse {
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* 成功状态 */
.qr-status-success {
    color: #4caf50;
}

.qr-checkmark {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-size: 24px;
    margin-bottom: 10px;
}

.qr-status-desc {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* 过期状态 */
.qr-status-expired {
    color: #ff9800;
}

.qr-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.qr-refresh-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.qr-refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 加载状态 */
.qr-loading {
    text-align: center;
    padding: 40px 20px;
}

.qr-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qr-loading p {
    color: #666;
    font-size: 14px;
}

/* 错误状态 */
.qr-error {
    text-align: center;
    padding: 40px 20px;
}

.qr-error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.qr-error-message {
    color: #f44336;
    font-size: 14px;
    margin-bottom: 20px;
}

.qr-retry-btn {
    padding: 10px 24px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.qr-retry-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .qr-code-wrapper {
        padding: 15px;
    }
    
    .qr-code-canvas {
        padding: 15px;
    }
    
    .qr-tips-title {
        font-size: 14px;
    }
    
    .qr-tips-desc {
        font-size: 13px;
    }
}

/* 快捷按钮样式 */
.quick-biometric-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.quick-biometric-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.quick-biometric-btn i {
    font-size: 18px;
}

/* 快捷登录/注册区域 */
.quick-biometric-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.quick-biometric-section h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 10px;
}

.quick-biometric-section p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.quick-biometric-section .qr-container {
    max-width: 300px;
    margin: 20px auto 0;
}

/* 隐藏类 */
.qr-hidden {
    display: none;
}

/* 显示类 */
.qr-visible {
    display: block;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-code-wrapper {
    animation: fadeIn 0.3s ease-out;
}
