﻿#chat-widget {
    width: 300px;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    font-size: 14px;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.message {
    margin: 5px 0;
    padding: 6px 10px;
    border-radius: 8px;
    max-width: 80%;
    opacity: 1;
    transform: translateY(5px);
    animation: fadeInUp 0.3s ease forwards;
}

.user {
    background: #007bff;
    color: #fff;
    margin-left: auto;
}

.assistant {
    background: #f1f1f1;
    color: #000;
    margin-right: auto;
}

.input-area {
    display: flex;
    border-top: 1px solid #ddd;
    align-items: center;
    gap: 8px;
}

#chat-input {
    flex: 1;
    padding: 8px;
    border: none;
    outline: none;
    font-size: 14px;
}

#chat-send {
    padding: 8px 12px;
    border: none;
    background: #007bff;
    color: white;
    cursor: pointer;
}

.quick-questions-icon {
    padding: 8px;
    border: none;
    background: #6c757d;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.quick-questions-icon:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.quick-questions-icon.active {
    background: #007bff;
}

/* hiệu ứng typing "..." */
.thinking {
    display: inline-block;
    font-style: italic;
    font-weight: 400;
}

.thinking::after {
    content: "";
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: dots 1.5s steps(3, end) infinite;
}

.samples {
    position: relative;
    padding: 6px 8px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.quick-questions-trigger {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.quick-questions-trigger:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.quick-questions-trigger i {
    font-size: 12px;
    transition: transform 0.2s;
}

.quick-questions-trigger.open i {
    transform: rotate(180deg);
}

.quick-questions-dropdown {
    position: absolute;
    top: 100%;
    left: 8px;
    right: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.quick-questions-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-questions-dropdown::-webkit-scrollbar {
    width: 6px;
}

.quick-questions-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.quick-questions-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.quick-questions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sample-badge {
    display: block;
    background: #f8f9fa;
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.sample-badge:last-child {
    border-bottom: none;
}

.sample-badge:hover {
    background: #e9ecef;
    color: #007bff;
}

.sample-badge:active {
    background: #dee2e6;
}

@@keyframes dots {
    0% {
        content: "";
    }

    33% {
        content: ".";
    }

    66% {
        content: "..";
    }

    100% {
        content: "...";
    }
}

/* fade-in animation */
@@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}