/* Copyright (c) Microsoft. All rights reserved.
   Licensed under the MIT license. See LICENSE.md file in the project root for full license information. */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.row {
    height: 100%;
}

/* Chat section */
#messages {
    height: calc(100% - 60px); /* Adjust height based on the input area */
    overflow-y: auto; /* Enable scrolling for overflow content */
}

#messages .toast-container {
    margin-bottom: 12px;
}

/* Styles for the message box */
#messages .message-content {
    /* Other styles... */
    font-size: 16px;
    font-family: Arial, sans-serif; /* Example font */
}

#messages .message-content ol {
    padding-left: 20px;
    list-style-type: decimal; /* Ensures numbered lists are displayed correctly */
}

#messages .message-content ol li {
    margin-bottom: 5px;
}

/* Ensure consistent font size and styling for message text */
.message-text {
    font-size: 16px;
    font-family: Arial, sans-serif;
}

.message-text h1, 
.message-text h2, 
.message-text h3, 
.message-text h4, 
.message-text h5, 
.message-text h6,
.message-text p,
.message-text span,
.message-text div {
    font-size: 16px;
    font-family: Arial, sans-serif;
    margin: 0; /* Reset margin to avoid extra spacing */
    line-height: 1.5; /* Ensure consistent line height */
}

/* Optional: Adjust font weight for headers to distinguish them without changing size */
.message-text h1, 
.message-text h2, 
.message-text h3, 
.message-text h4, 
.message-text h5, 
.message-text h6 {
    font-weight: bold;
}

#chat-area {
    height: 60px; /* Fixed height for the chat input area */
    padding: 10px; /* Padding for the input area */
}

/* Ensure Flexbox is applied to parent and children elements */
.container-fluid {
    display: flex;
    flex-direction: row;
    height: 100%;
}

#chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#document-viewer-section {
    display: none; /* Initially hidden */
    width: 0; /* Initially take no space */
    overflow: hidden; /* Prevent any overflow */
    transition: width 0.3s ease; /* Smooth transition for width adjustments */
}

#document-viewer-section.visible {
    display: block; /* Make visible */
    width: 50%; /* Adjust width as needed */
    overflow: auto; /* Allow scrolling if needed */
}

.col-full {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-half {
    flex: 0 0 50%;
    max-width: 50%;
}

.hidden {
    display: none;
}

#document-viewer-section button {
    padding: 5px 10px;
    background-color: #f44336; /* Red color for visibility */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#document-viewer-section button:hover {
    background-color: #d32f2f; /* Slightly darker on hover */
}

#document-viewer {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background-color: white;
}

#close-button {
    display: none; /* Initially hidden */
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Background colors for user and assistant messages */
.background-user {
    background-color: #2372cc;
    color: white; /* Ensure text is readable on the background */
}

.background-assistant {
    background-color: #2c8310;
    color: white; /* Ensure text is readable on the background */
}

/* Styling for messages */
.toast {
    position: relative;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #ffffff;
}

.toast-body {
    padding: 0.75rem;
}