/* Chat Widget Container */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Chat Button */
.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
}

/* Chat Window */
.chat-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    flex-direction: column;
    overflow: hidden;
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-header-info h3 {
    font-size: 16px;
    margin: 0;
}

.chat-header-info p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    display: flex;
    gap: 10px;
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--accent);
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--gradient-1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: var(--glass);
    border-radius: 18px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Chat Input */
.chat-input {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: white;
    font-size: 14px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}