/* Chat Interface Styles */

.chat-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chat-messages-container {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.chat-messages {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    min-height: 200px;
}

.message-wrapper {
    display: flex;
    margin-bottom: 1rem;
}

.message-wrapper.user {
    justify-content: flex-end;
}

.message-wrapper.assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.message-bubble.user {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.assistant {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 0.25rem;
}

.message-content {
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}

/* Chat input styling */
.chat-input-container {
    position: relative;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.chat-input {
    border: none;
    resize: none;
    padding: 1rem;
    width: 100%;
    font-size: 1rem;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
    box-shadow: none;
}

.chat-send-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 1;
}

/* Conversation list styling */
.conversation-list {
    max-height: 400px;
    overflow-y: auto;
}

.conversation-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

.conversation-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.conversation-preview {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
    }

    .chat-messages-container {
        min-height: 300px;
        max-height: 400px;
    }
}

/* Loading and error states */
.chat-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.chat-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1.25rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* New conversation button */
.new-conversation-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.new-conversation-btn:hover {
    background-color: #218838;
}

/* Empty state */
.chat-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.chat-empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chat-empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.chat-empty-state-subtext {
    font-size: 0.9rem;
    opacity: 0.7;
}