/* WeChat QR Code Login - Frontend Styles */

.wql-login-container {
    display: inline-block;
    vertical-align: middle;
}

/* Login Button */
.wql-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.wql-login-btn:hover {
    background: #06AD56;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

.wql-login-btn .wql-wechat-icon {
    flex-shrink: 0;
}

/* Login Box (inline mode) */
.wql-login-box {
    max-width: 300px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.wql-qr-container {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.wql-qr-container iframe {
    width: 100%;
    min-height: 300px;
    border: none;
    border-radius: 4px;
}

.wql-qr-placeholder {
    color: #999;
    font-size: 14px;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 4px;
    width: 100%;
}

.wql-qr-placeholder p {
    margin: 0;
}

.wql-qr-status {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    min-height: 20px;
}

.wql-qr-status.scanning {
    color: #07C160;
}

.wql-qr-status.scanned {
    color: #1890ff;
}

.wql-qr-status.success {
    color: #07C160;
    font-weight: 500;
}

.wql-qr-status.expired {
    color: #ff4d4f;
}

.wql-qr-status.error {
    color: #ff4d4f;
}

.wql-qr-tips {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.wql-get-qrcode-btn {
    padding: 8px 20px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wql-get-qrcode-btn:hover {
    background: #06AD56;
}

/* Modal Overlay */
.wql-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wql-fade-in 0.3s ease;
}

@keyframes wql-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wql-modal {
    background: #fff;
    border-radius: 12px;
    width: 360px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: wql-slide-up 0.3s ease;
}

@keyframes wql-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wql-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.wql-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wql-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.wql-modal-close:hover {
    color: #333;
}

.wql-modal-body {
    padding: 24px 20px;
    text-align: center;
}

.wql-modal-body .wql-qr-container {
    min-height: 240px;
}

.wql-modal-body .wql-qr-placeholder {
    padding: 80px 20px;
}

/* QR Code loading spinner */
.wql-qr-loading {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #07C160;
    border-radius: 50%;
    animation: wql-spin 0.8s linear infinite;
}

@keyframes wql-spin {
    to { transform: rotate(360deg); }
}

/* QR Code refresh overlay */
.wql-qr-refresh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
}

.wql-qr-refresh-icon {
    font-size: 40px;
    color: #07C160;
    margin-bottom: 8px;
}

.wql-qr-refresh-text {
    color: #666;
    font-size: 14px;
}

/* Bind Account Page */
.wql-bind-page {
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

.wql-bind-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.wql-bind-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.wql-bind-box h2 {
    margin: 0 0 20px;
    color: #333;
    font-size: 22px;
}

.wql-bind-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.wql-bind-nickname {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.wql-bind-box form p {
    text-align: left;
    margin-bottom: 16px;
}

.wql-bind-box label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.wql-bind-box input[type="text"],
.wql-bind-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.wql-bind-box input[type="text"]:focus,
.wql-bind-box input[type="password"]:focus {
    border-color: #07C160;
    outline: none;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.wql-bind-submit {
    width: 100%;
    padding: 12px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wql-bind-submit:hover {
    background: #06AD56;
}

.wql-bind-message {
    margin-top: 16px;
    font-size: 14px;
    color: #ff4d4f;
    min-height: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .wql-modal {
        width: 95%;
    }
    
    .wql-modal-body .wql-qr-container {
        min-height: 200px;
    }
    
    .wql-bind-box {
        padding: 24px 20px;
    }
}
