/* Chat Widget Styles */
:root {
    --chat-width: 350px;
    --chat-height: 500px;
    --chat-bg: #1a1a1a;
    --chat-header-bg: #0f172a;
    --chat-text: #ffffff;
    --chat-accent: #3b82f6;
    --chat-user-msg-bg: #3b82f6;
    --chat-bot-msg-bg: #334155;
}

.chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Floating Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chat-accent);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.chat-toggle-btn svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: var(--chat-width);
    height: var(--chat-height);
    background: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.chat-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Header */
.chat-header {
    background: var(--chat-header-bg);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.chat-header h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.close-chat-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user {
    background: var(--chat-user-msg-bg);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.bot {
    background: var(--chat-bot-msg-bg);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    background: var(--chat-header-bg);
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #475569;
    background: #1e293b;
    color: white;
    outline: none;
}

.chat-input-area button {
    background: var(--chat-accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--chat-bot-msg-bg);
    border-radius: 12px;
    align-self: flex-start;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 80px;
        right: 0;
    }
}