/*AI 客服*/

.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,102,255,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-icon:hover {
    transform: scale(1.1);
}

.chat-icon i {
    color: white;
    font-size: 24px;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 90%;
    height: 65vh;
    max-width: 360px;
    max-height: 600px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-window.minimized {
    height: auto;
}

.chat-window.minimized .chat-body,
.chat-window.minimized .chat-input {
    display: none;
}

.chat-header {
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-title img {
    width: 30px;
    height: 30px;
}

.chat-header-actions {
    display: flex;
    gap: 15px;
}

.chat-header-actions i {
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.chat-header-actions i:hover {
    color: var(--primary);
}

.chat-body {
    height: calc(100% - 130px);
    overflow-y: auto;
    padding: 15px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    letter-spacing: 0;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    width: 100%;
}

.message-container {
    max-width: 90%;
}

.message-user {
    background-color:var(--primary);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message-ai {
    background-color: #e6f4fa;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-section h5 {
    margin-bottom: 10px;
}

.faq-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faq-buttons .btn {
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    text-align: left;
}

.faq-buttons .btn:hover {
    background-color: #e6f4fa;
    border-color:var(--primary);
    color:var(--primary);
}

.chat-input {
    position: absolute;
    width: 100%;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #eee;
}

.chat-input .input-group .form-control {
    border-radius: 8px 0 0 8px;
    padding: 10px 20px;
    border: 1px solid #eee;
}

.chat-input .input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.chat-input .input-group .btn {
    width: 60px;
    padding: 0;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    border: none;
    transition: all 0.3s ease;
}

.chat-input .input-group .btn:hover i {
    transform: scale(1.1);
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 8px 12px;
    background: #e6f4fa;
    border-radius: 15px;
    width: fit-content;
    margin-bottom: 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}