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

/* 客服链接 */
.kefu-link {
    text-decoration: none;
    color: inherit;
}

.kefu-link:hover {
    text-decoration: none;
}

/* 悬浮按钮容器 */
.kefu-container {
    position: fixed;
    bottom: 80px;
    right: 15px;
    z-index: 9999;
}

/* 悬浮按钮 */
.kefu-button {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    position: relative;
}

.kefu-button::after {
    content: '在线客服';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kefu-button img {
    width: 32px;
    height: 32px;
}

/* 客服图标（如果没有图片，使用 CSS 绘制） */
.kefu-button-icon {
    font-size: 28px;
    color: white;
}

/* 弹窗遮罩层 */
.kefu-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: kefu-fade-in 0.3s ease;
}

.kefu-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗内容 */
.kefu-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: kefu-slide-up 0.3s ease;
    color: #333;
}

/* 关闭按钮 */
.kefu-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.kefu-close:hover {
    color: #333;
}

/* 标题 */
.kefu-content h3 {
    margin: 0;
    padding: 20px 20px 15px;
    font-size: 20px;
    color: #333;
    text-align: center;
    border-bottom: 1px solid #eee;
}

/* 客服项 */
.kefu-item {
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.kefu-item:last-child {
    border-bottom: none;
}

.kefu-item h4 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.kefu-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 客服电话 */
.kefu-phone {
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 一键拨打按钮 */
.kefu-btn-call {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.kefu-btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.kefu-btn-call:active {
    transform: translateY(0);
}

/* 微信二维码区域 */
.kefu-wechat-qr {
    text-align: center;
    margin: 15px 0;
}

.kefu-wechat-qr img {
    width: 180px;
    height: 180px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    background: white;
}

/* 服务时间 */
.kefu-service-time {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.kefu-service-time p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 淡入动画 */
@keyframes kefu-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 上滑动画 */
@keyframes kefu-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .kefu-container {
        bottom: 60px;
        right: 10px;
    }

    .kefu-button {
        width: 50px;
        height: 50px;
    }

    .kefu-button img {
        width: 28px;
        height: 28px;
    }

    .kefu-content {
        width: 85%;
        max-width: 340px;
    }

    .kefu-phone {
        font-size: 20px;
    }

    .kefu-btn-call {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .kefu-content {
        background: #1a1a1a;
        color: #fff;
    }

    .kefu-content h3 {
        color: #fff;
        border-bottom-color: #333;
    }

    .kefu-item {
        border-bottom-color: #333;
    }

    .kefu-item h4 {
        color: #fff;
    }

    .kefu-item p {
        color: #ccc;
    }

    .kefu-service-time {
        background: #2a2a2a;
    }
}
