.chat-widget {
    transition: all 0.3s ease;
    z-index: 1000;
    height: 500px;
}

.chat-widget.collapsed {
    height: 40px;
}

.chat-widget.collapsed .chat-body {
    display: none;
}

.chat-widget .chat-header {
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}

.chat-widget.collapsed .chat-header {
    border-radius: 8px;
}

.chat-toggle-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    margin-top: 4px;
}

.chat-toggle-indicator svg {
    transition: transform 0.3s ease;
}

.collapsed .chat-toggle-indicator svg {
    transform: rotate(180deg);
}

.chat-collapsed-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.collapsed .chat-collapsed-hint {
    opacity: 1;
}

.chat-body {
    background: white;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.user-message .message-content {
    background: #3B82F6;
    color: white;
    margin-left: auto;
    max-width: 80%;
}

.assistant-message {
    display: flex;
    align-items: flex-start;
}

.assistant-message .message-content {
    background: #F3F4F6;
    color: #1F2937;
    max-width: 80%;
}

.assistant-avatar img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.quick-responses {
    padding: 0.75rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-response-btn {
    background: #EFF6FF;
    color: #2563EB;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-response-btn:hover {
    background: #DBEAFE;
    transform: translateY(-1px);
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.dot-pulse {
    position: relative;
    left: -9999px;
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background-color: #3B82F6;
    color: #3B82F6;
    box-shadow: 9999px 0 0 -5px;
    animation: dot-pulse 1.5s infinite linear;
    animation-delay: 0.25s;
}

.dot-pulse::before,
.dot-pulse::after {
    content: "";
    display: inline-block;
    position: absolute;
    top: 0;
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background-color: #3B82F6;
    color: #3B82F6;
}

.dot-pulse::before {
    box-shadow: 9984px 0 0 -5px;
    animation: dot-pulse-before 1.5s infinite linear;
    animation-delay: 0s;
}

.dot-pulse::after {
    box-shadow: 10014px 0 0 -5px;
    animation: dot-pulse-after 1.5s infinite linear;
    animation-delay: 0.5s;
}

@keyframes dot-pulse-before {
    0% { box-shadow: 9984px 0 0 -5px; }
    30% { box-shadow: 9984px 0 0 2px; }
    60%, 100% { box-shadow: 9984px 0 0 -5px; }
}

@keyframes dot-pulse {
    0% { box-shadow: 9999px 0 0 -5px; }
    30% { box-shadow: 9999px 0 0 2px; }
    60%, 100% { box-shadow: 9999px 0 0 -5px; }
}

@keyframes dot-pulse-after {
    0% { box-shadow: 10014px 0 0 -5px; }
    30% { box-shadow: 10014px 0 0 2px; }
    60%, 100% { box-shadow: 10014px 0 0 -5px; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
