.chat-container {
    margin: 20px auto;
}

.messages {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fdfdfd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.sender-label {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user .sender-label {
    color: #444;
    text-align: right;
}

.bot .sender-label {
    color: #8E1B15;
    /* Brand color */
}

.message-content {
    padding: 12px 16px;
    border-radius: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user .message-content {
    background-color: #e8f0fe;
    color: #1a73e8;
    border-top-right-radius: 2px;
}

.bot .message-content {
    background-color: white;
    color: #333;
    border: 1px solid #eee;
    border-top-left-radius: 2px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.sources {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #8E1B15;
    max-width: 100%;
}

.sources ul {
    list-style-type: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.sources li {
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sources li strong {
    color: #444;
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#messageInput:focus {
    border-color: #8E1B15;
    box-shadow: 0 0 0 2px rgba(142, 27, 21, 0.1);
}

.send-btn {
    padding: 10px 25px;
    border-radius: 25px;
    background-color: #8E1B15;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s;
}

.send-btn:hover {
    background-color: #a61f19;
}

.send-btn:active {
    transform: scale(0.98);
}

/* Expert Info Panel Styles */
.expert-toggle {
    display: block;
    margin-top: 15px;
    font-size: 13px;
    color: #8E1B15;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.expert-panel {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    border-left: 4px solid #8E1B15;
    font-family: monospace;
    font-size: 12px;
    color: #444;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

.status-error {
    background-color: #ffc107;
}

.status-unknown {
    background-color: #6c757d;
}