/* Chat styles */ 

/* Chat window container */
.chat-window {
    max-width: 800px;
    margin: 1rem auto;
    background-color: #1e1e2e;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px); /* Account for navbar + margins */
}

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2a2a3a;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4a4a5a;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5a5a6a;
}

/* Message bubbles */
.bot-message,
.user-message {
    max-width: 80%;
    margin-bottom: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-in-out;
    word-wrap: break-word;
}

.bot-message {
    background-color: #2d2d3d;
    color: #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.user-message {
    background-color: #7c3aed;
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* Processing message animation */
.bot-message.processing {
    background-color: #2d2d3d;
    color: #7c3aed;
    font-size: 1.5rem;
    padding: 0.5rem 1.2rem;
    animation: pulse 1s infinite;
}

/* Error message styling */
.bot-message.error {
    background-color: #3d2d2d;
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
}

/* Input area */
.chat-input-area {
    display: flex;
    gap: 0.8rem;
    padding: 1.2rem;
    background-color: #2a2a3a;
    border-top: 1px solid #3d3d4d;
}

#message-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    background-color: #1e1e2e;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#message-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #7c3aed;
    background-color: #252535;
}

#message-input::placeholder {
    color: #6c6c7c;
}

#message-input:disabled {
    background-color: #252535;
    cursor: not-allowed;
}

#send-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: #7c3aed;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-button:hover:not(:disabled) {
    background-color: #6d31d5;
    transform: translateY(-1px);
}

#send-button:disabled {
    background-color: #4a4a5a;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
} 