/* 在线客服组件样式 */

/* 客服按钮容器 */
.customer-service {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

/* 客服主按钮 */
.cs-main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cs-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.cs-main-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 未读消息提示 */
.cs-unread {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 客服面板 */
.cs-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.cs-panel.open {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

/* 客服面板头部 */
.cs-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cs-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.cs-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 客服面板内容 */
.cs-panel-content {
    padding: 20px;
}

/* 欢迎消息 */
.cs-welcome {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.cs-welcome p {
    margin: 0 0 10px;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
}

.cs-welcome small {
    color: var(--text-light);
    font-size: 12px;
}

/* 联系方式列表 */
.cs-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cs-contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.cs-contact-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateX(5px);
}

.cs-contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 15px;
    flex-shrink: 0;
}

.cs-contact-icon.wechat {
    background: #07c160;
    color: white;
}

.cs-contact-icon.whatsapp {
    background: #25d366;
    color: white;
}

.cs-contact-icon.email {
    background: #ea4335;
    color: white;
}

.cs-contact-icon.phone {
    background: #1e40af;
    color: white;
}

.cs-contact-info {
    flex: 1;
}

.cs-contact-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.cs-contact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.cs-contact-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--success-color);
}

.cs-contact-status.online:before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* 二维码区域 */
.cs-qr-section {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-top: 15px;
}

.cs-qr-section h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: var(--text-dark);
}

.cs-qr-code {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.cs-qr-code img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.cs-qr-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}

/* 工作时间提示 */
.cs-hours {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-hours-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cs-hours-text {
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* 快速回复按钮 */
.cs-quick-replies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.cs-quick-btn {
    padding: 12px 15px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-quick-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .customer-service {
        bottom: 80px;
        right: 20px;
    }
    
    .cs-panel {
        width: 300px;
    }
    
    .cs-main-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}

/* 多语言支持 */
.cs-panel[data-lang="en"] .cs-welcome p {
    content: "Hello! How can we help you today?";
}

.cs-panel[data-lang="ja"] .cs-welcome p {
    content: "こんにちは！どのようにお手伝いできますか？";
}

.cs-panel[data-lang="de"] .cs-welcome p {
    content: "Hallo! Wie können wir Ihnen heute helfen?";
}
