/* ============================================
   微信客服悬浮按钮组件样式
   ============================================ */

/* 悬浮按钮 */
.wechat-float-btn {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 56px;
    height: 56px;
    background: #1aad19;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(29, 173, 25, 0.4);
    transition: all 0.3s ease;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-float-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(29, 173, 25, 0.5);
    background: linear-gradient(135deg, #2dc653 0%, #1aad19 100%);
}

.wechat-float-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 脉冲动画 */
.wechat-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(29, 173, 25, 0.3);
    transform: translate(-50%, -50%);
    animation: wechat-pulse 2s infinite;
    pointer-events: none;
}

@keyframes wechat-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* 弹窗背景 */
.wechat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.wechat-modal.show {
    opacity: 1;
}

/* 弹窗对话框 */
.wechat-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wechat-modal.show .wechat-dialog {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.wechat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 100%);
}

.wechat-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wechat-title i {
    font-size: 1.5rem;
}

.wechat-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.wechat-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.wechat-close:hover {
    background: #f3f4f6;
    color: #374151;
    transform: rotate(90deg);
}

/* 弹窗内容 */
.wechat-body {
    padding: 24px;
    text-align: center;
}

/* 二维码容器 */
.qr-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wechat-qr {
    width: 180px;
    height: 180px;
    display: block;
    border-radius: 12px;
}

.qr-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

/* 信息区域 */
.wechat-info {
    margin-top: 20px;
}

.wechat-tip {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wechat-tip i {
    color: #1aad19;
    font-size: 1.125rem;
}

/* 服务信息 */
.service-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6b7280;
}

.service-item i {
    color: #1aad19;
    font-size: 1rem;
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板设备 */
@media (max-width: 768px) {
    .wechat-float-btn {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 1.375rem;
    }
    
    .wechat-dialog {
        max-width: 360px;
        margin: 0 16px;
    }
    
    .wechat-header {
        padding: 16px 20px 12px;
    }
    
    .wechat-body {
        padding: 20px;
    }
    
    .wechat-qr {
        width: 160px;
        height: 160px;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .wechat-float-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .wechat-dialog {
        max-width: calc(100vw - 32px);
        margin: 0 16px;
    }
    
    .wechat-header {
        padding: 16px 16px 12px;
    }
    
    .wechat-body {
        padding: 16px;
    }
    
    .wechat-qr {
        width: 140px;
        height: 140px;
    }
    
    .wechat-title h3 {
        font-size: 1.125rem;
    }
    
    .service-info {
        padding: 12px;
    }
    
    .service-item {
        font-size: 0.8125rem;
    }
}

/* 超小屏幕 */
@media (max-width: 360px) {
    .wechat-modal {
        padding: 16px;
    }
    
    .wechat-qr {
        width: 120px;
        height: 120px;
    }
    
    .wechat-body {
        padding: 12px;
    }
}

/* ============================================
   深色模式支持
   ============================================ */
@media (prefers-color-scheme: dark) {
    .wechat-dialog {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .wechat-header {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-bottom-color: #374151;
    }
    
    .wechat-title h3 {
        color: #f9fafb;
    }
    
    .wechat-close {
        color: #9ca3af;
    }
    
    .wechat-close:hover {
        background: #374151;
        color: #f3f4f6;
    }
    
    .wechat-tip {
        color: #f9fafb;
    }
    
    .service-info {
        background: #374151;
        border-color: #4b5563;
    }
    
    .service-item {
        color: #d1d5db;
    }
}

/* ============================================
   动画增强
   ============================================ */

/* 按钮呼吸效果 */
@keyframes wechat-breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* 弹窗进入动画 */
@keyframes wechat-slide-up {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 二维码加载动画 */
.wechat-qr {
    animation: qr-fade-in 0.5s ease-out 0.3s both;
}

@keyframes qr-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}