/* 客服聊天窗口样式 - 简约版 */
.customer-service-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 客服聊天窗口 - 居中显示 */
.cs-chat-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.cs-chat-window.active {
    display: flex;
}

/* 遮罩层 */
.cs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
}

.cs-modal-overlay.active {
    display: block;
}

/* 聊天窗口头部 - 简约样式 */
.cs-chat-header {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cs-header-text h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px 0;
}

.cs-header-text p {
    display: none;
}

.cs-service-time {
    display: block !important;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 400;
}

.cs-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cs-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 聊天消息区域 - 简约样式 */
.cs-chat-messages {
    flex: 1;
    padding: 16px 14px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cs-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.cs-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.cs-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 消息气泡 - 简约样式 */
.cs-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cs-message.user {
    flex-direction: row-reverse;
}

.cs-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cs-message.user .cs-message-avatar {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

.cs-message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 68%;
}

.cs-message-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    background: white;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.cs-message.user .cs-message-bubble {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
    border: none;
}

.cs-message-time {
    font-size: 11px;
    color: #a0aec0;
    padding: 0 4px;
}

.cs-message.user .cs-message-time {
    text-align: right;
}

/* 系统消息 */
.cs-system-message {
    text-align: center;
    color: #a0aec0;
    font-size: 12px;
    padding: 8px 0;
}

/* 快捷问题按钮 - 简约样式 */
.cs-quick-questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.cs-quick-question-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.cs-quick-question-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
    border-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

/* 聊天输入区域 - 简约样式 */
.cs-chat-input-area {
    padding: 14px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.cs-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.cs-input-box {
    flex: 1;
}

.cs-input-textarea {
    width: 100%;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    height: 38px;
    line-height: 22px;
    box-sizing: border-box;
    overflow: hidden;
}

.cs-input-textarea:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.cs-input-textarea::placeholder {
    color: #a0aec0;
}

.cs-send-btn {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 38px;
    line-height: 22px;
    box-sizing: border-box;
    flex-shrink: 0;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.cs-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

.cs-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e0;
    box-shadow: none;
}

/* 空状态 */
.cs-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
    font-size: 14px;
}

/* 未读标记 */
.unread-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #f56565;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cs-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 60px);
    }
    
    .cs-quick-questions {
        grid-template-columns: 1fr;
    }
}

