/* 侧边栏客服样式 - 通用组件 */
.sidebar-customer-service {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 9999;
}

.cs-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cs-btn {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a6fb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cs-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 166, 251, 0.3);
}

.cs-btn i {
    font-size: 20px;
}

.cs-btn span {
    position: absolute;
    right: 60px;
    background: #00a6fb;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cs-btn:hover span {
    opacity: 1;
}

.cs-btn.cs-top {
    display: none;
    background: linear-gradient(135deg, #00a6fb 0%, #0082c8 100%);
    color: white;
}

/* 聊天框样式 */
.chat-box {
    position: fixed;
    right: 20px;
    bottom: 150px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 10000;
}

.chat-box.active {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #00a6fb 0%, #0082c8 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chat-close:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    background: #f8f9fa;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
    padding: 30px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.message.bot-message {
    align-items: flex-start;
}

.message.user-message {
    justify-content: flex-end;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: #e6f5ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar i {
    color: #00a6fb;
    font-size: 18px;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-message .message-content {
    background: #00a6fb;
    color: white;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.message-content p + p {
    margin-top: 8px;
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-questions button {
    padding: 8px 12px;
    background: white;
    border: 1px solid #00a6fb;
    color: #00a6fb;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-questions button:hover {
    background: #00a6fb;
    color: white;
}

.chat-footer {
    padding: 16px;
    border-top: 1px solid #e8e8e8;
    background: white;
    border-radius: 0 0 12px 12px;
}

.chat-input-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-input-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

.chat-input-form input:focus {
    border-color: #00a6fb;
}

.chat-input-form button {
    width: 36px;
    height: 36px;
    background: #00a6fb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input-form button:hover {
    background: #0082c8;
}

.quick-contact {
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.quick-contact p {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.quick-contact-form {
    display: flex;
    gap: 8px;
}

.quick-contact-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 13px;
}

.quick-contact-form button {
    padding: 8px 20px;
    background: #00a6fb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-contact-form button:hover {
    background: #0082c8;
}

/* 信息弹窗样式 */
.info-popup {
    position: fixed;
    right: 80px;
    bottom: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 10001;
    display: none;
}

.info-popup.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    position: relative;
}

.popup-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #00a6fb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #1a1c3d;
}

.popup-content h4 i {
    color: #00a6fb;
}

.phone-number {
    font-size: 24px;
    font-weight: 600;
    color: #00a6fb;
    margin-bottom: 8px;
}

.phone-time {
    font-size: 14px;
    color: #666;
}

.wechat-qr {
    width: 150px;
    height: 150px;
    padding: 8px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 12px;
}

.info-popup p {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 成功提示样式 */
.success-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10002;
}

.success-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.success-toast i {
    color: #52c41a;
    font-size: 24px;
}

.success-toast span {
    font-size: 16px;
    color: #1a1c3d;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .sidebar-customer-service {
        right: 10px;
        bottom: 60px;
    }
    
    .cs-btn {
        width: 45px;
        height: 45px;
    }
    
    .cs-btn span {
        display: none;
    }
    
    .chat-box {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 10px;
        height: 60vh;
        max-height: 500px;
    }
    
    .info-popup {
        right: 10px;
        left: 10px;
        width: auto;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}