/* YHSM 微信登录插件样式 */

/* 微信登录按钮容器 */
.yhsm-wechat-login-container {
    margin: 20px 0;
    text-align: center;
}

/* 微信登录按钮 */
.yhsm-wechat-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #07C160;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

.yhsm-wechat-login-button:hover {
    background-color: #06AD56;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

.yhsm-wechat-login-button:active {
    background-color: #059B4C;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.3);
}

/* 微信图标 */
.yhsm-wechat-login-button .wechat-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    background-image: url('../images/wechat-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* PC端微信二维码容器 */
.yhsm-wechat-qrcode-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.yhsm-wechat-qrcode-container.show {
    display: flex;
}

.yhsm-wechat-qrcode-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    width: 350px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(0);
    animation: yhsm-wechat-fadeIn 0.3s ease-out;
}

@keyframes yhsm-wechat-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yhsm-wechat-qrcode-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.yhsm-wechat-qrcode-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.yhsm-wechat-qrcode-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.yhsm-wechat-qrcode-tips {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.yhsm-wechat-qrcode-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background-color: transparent;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yhsm-wechat-qrcode-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .yhsm-wechat-qrcode-content {
        width: 90%;
        max-width: 320px;
        margin: 20px;
        padding: 25px 20px;
    }
    
    .yhsm-wechat-qrcode-image {
        width: 180px;
        height: 180px;
    }
    
    .yhsm-wechat-login-button {
        width: 100%;
        padding: 10px 0;
        font-size: 15px;
    }
    
    .yhsm-wechat-login-container {
        margin: 15px 0;
    }
}

/* 登录表单中的微信登录分割线 */
.yhsm-wechat-login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

.yhsm-wechat-login-divider::before,
.yhsm-wechat-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
}

.yhsm-wechat-login-divider::before {
    margin-right: 15px;
}

.yhsm-wechat-login-divider::after {
    margin-left: 15px;
}

/* 加载动画 */
.yhsm-wechat-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: yhsm-wechat-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

@keyframes yhsm-wechat-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 登录状态提示 */
.yhsm-wechat-login-status {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.yhsm-wechat-login-status.success {
    display: block;
    background-color: #f0f9ff;
    color: #0073aa;
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.yhsm-wechat-login-status.error {
    display: block;
    background-color: #fdf2e9;
    color: #d63638;
    border-color: #d63638;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.1);
}

.yhsm-wechat-login-status.info {
    display: block;
    background-color: #e7f3ff;
    color: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .yhsm-wechat-qrcode-content {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .yhsm-wechat-qrcode-title {
        color: #ffffff;
    }
    
    .yhsm-wechat-qrcode-tips {
        color: #b0b0b0;
    }
    
    .yhsm-wechat-qrcode-image {
        background-color: #2a2a2a;
        border-color: #404040;
    }
    
    .yhsm-wechat-login-divider {
        color: #707070;
    }
    
    .yhsm-wechat-login-divider::before,
    .yhsm-wechat-login-divider::after {
        background-color: #404040;
    }
    
    .yhsm-wechat-qrcode-close:hover {
        background-color: #333333;
        color: #ffffff;
    }
}