html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
}

:root {
    --color-white: #fff;
    --color-main: #2c2d30;
    --color-main-fade: #2c2d3000;
    --color-secondary: #171717;
    --color-secondary-fade: #17171700;
    --color-button-hover: #242629;
    --color-button-hover-fade: #24262900;
    --color-user-icon: #003366;
    --color-groupings: #9ca6b5;
    --color-gpt-icon: #cc9933;
    --color-black: #1e1e1f;
    --color-user-menu-hover: #383b42;
    --color-text: #f5f9ff;
    --color-secondary-p: #c9ccd1;
    --color-logo: #848484;
    --color-model-name: #ffffff;
    --color-assistant-bg: #3f4042;
    --color-assistant-text: #e1e6ed;
    --color-disclaimer: #d0d2e1;
    --color-border1: #484a4e;
    --color-user-menu-border: #34373a;
    --color-user-menu-selected-border: #4a5562;
    --color-border2: #292d32;
    --color-user-message-border: #2f353d;
    --color-navbar: #2c2d30;
    --color-title: #f5f9ff;
    /* Light mode */
    --color-light-main: #ffffff;
    /* White background */
    --color-light-secondary: #ffffff;
    /* White secondary elements */
    --color-light-button-hover: #e0e0e0;
    --color-light-text: #333333;
    /* Dark text */
    --color-light-assistant-bg: #ffffff;
    --color-light-assistant-text: #333333;
    --color-light-disclaimer: #777777;
    --color-light-border1: #cccccc;
    --color-light-user-menu-border: #bbbbbb;
    --color-light-user-menu-selected-border: #aaaaaa;
    --color-light-shadow: rgba(0, 0, 0, 0.1);
    --light-mode-message-wrapper-background: #f9f9f9;
    --light-mode-message-wrapper-border: #e0e0e0;
    /* Shadow for light mode */
    --color-title-light: #000000;
    --color-light-button-hover-greyer: #d0d0d0;
}

#lottie {
    background-color: none;
    width: 70%;
    height: 100%;
    display: block;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    text-align: center;
    opacity: 1;
    max-width: 600px;
    margin-top: -190px;
    margin-left: -10px;
}

/* Document list styles */
li div {
    margin-left: 20px;
}

li p {
    margin: 5px 0;
}

@media (max-width: 660px) {
    #lottie {
        margin-top: -230px;
        /* Adjust the value to prevent overlap */
    }
}

@media (max-width: 550px) {
    #lottie {
        margin-top: -270px;
        /* Adjust the value to prevent overlap */
    }
}

@media (max-width: 500px) {
    #lottie {
        margin-top: -300px;
        /* Adjust the value to prevent overlap */
    }
}

.navbar {
    background-color: var(--color-navbar);
    font-family: var(--font-family), sans-serif;
    border-bottom: 1px solid var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 0;
}

.navbar.light-mode {
    background-color: var(--color-model-name);
    border-bottom: 1px solid var(--color-navbar);
    ;
}

/* Additional CSS for light mode */
.light-mode {
    background-color: var(--color-light-main);
    color: var(--color-light-text);
}

/* Specific elements */
body.light-mode {
    background-color: var(--color-light-main);
    color: var(--color-light-text);
}

.navbar.light-mode {
    background-color: var(--color-light-main);
}

.light-mode-shadow {
    background-color: var(--color-light-main);
}

button.light-mode {
    background-color: var(--color-light-secondary);
    color: var(--color-light-text);
}

button.light-mode:hover {
    background-color: var(--color-light-button-hover-greyer);
}

.modal.light-mode .modal-content {
    background-color: white;
    box-shadow: 0 4px 6px var(--color-light-shadow);
    color: black;
    border: none;
}

.dropdown-content.light-mode {
    background-color: #ffffff;
}

.welcome-container.light-mode {
    background-color: #ffffff;
    color: black;
}

.document-container.light-mode {
    background-color: #ffffff;
    color: black;
}

body {
    background: var(--color-main);
    display: flex;
    font-size: 1em;
    font-family: system-ui, sans-serif;
}

a {
    color: #cc9933;
}

.title {
    flex-grow: 1;
    text-align: center;
    color: var(--color-title);
    font-size: 0.8em;
    margin-right: 30px;
    font-weight: bold;
    margin-top: 7.5px;
}

@media (max-width: 768px) {
    .title {
        font-size: 0.6em;
    }
}

.title.light-mode {
    color: var(--color-title-light);
}

#sidebar {
    position: relative;
    left: 0;
    background: var(--color-secondary);
    width: 260px;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
}

.float-top {
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
}

#sidebar.hidden {
    left: -260px;
    margin-right: -260px;
}

#sidebar.hidden .hide-sidebar {
    left: 60px;
    transform: rotate(180deg);
    padding: 15px 13px 11px 13px;
}

button {
    display: block;
    background: inherit;
    border: 1px solid var(--color-border1);
    border-radius: 8px;
    color: var(--color-white);
    padding: 13px;
    box-sizing: border-box;
    text-align: left;
    cursor: pointer;
    z-index: 3;
}

button:hover {
    background: var(--color-button-hover);
}

.sidebar-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.sidebar-controls button {
    padding: 12px 13px 12px 13px;
}

.hide-sidebar {
    position: relative;
    left: 0;
    top: 0;
    transition: all 0.2s ease-in-out;
    transform: rotate(0deg);
}

.conversations {
    width: calc(100% + 8px);
    overflow-y: scroll;
}

.conversations,
.conversations li {
    list-style: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.conversations li {
    position: relative;
}

.conversations li .fa {
    margin-right: 7px;
}

.conversations li>button {
    width: 100%;
    border: none;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
}

.conversations li.active>button {
    background: var(--color-main);
}

.edit-buttons {
    display: none;
    position: absolute;
    right: 8px;
    top: 0;
}

.conversations li:hover .edit-buttons {
    display: flex;
}

.fade {
    position: absolute;
    right: 0;
    top: 0;
    background: var(--color-user-icon);
    width: 40px;
    height: 100%;
    border-radius: 5px;
    background: transparent;
    background: linear-gradient(90deg, var(--color-secondary-fade) 0%, var(--color-secondary) 50%);
}

.conversations li.active .fade {
    background: linear-gradient(90deg, var(--color-main-fade) 0%, var(--color-main) 50%);
}

.conversations li:hover .fade {
    width: 80px;
    background: linear-gradient(90deg, var(--color-button-hover-fade) 0%, var(--color-button-hover) 30%);
}

.edit-buttons button {
    border: none;
    padding: 0;
    margin: 13px 1px 13px 1px;
    opacity: 0.7;
}

.edit-buttons button:hover {
    background: none;
    opacity: 1;
}

.conversations li.grouping {
    color: var(--color-groupings);
    font-size: 0.7em;
    font-weight: bold;
    padding-left: 13px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.user-menu {
    position: relative;
    border-top: 1px solid var(--color-border1);
}

.user-menu button {
    width: 100%;
    border: none;
}

.user-menu .dots {
    position: relative;
    top: 11px;
    float: right;
    opacity: 0.7;
}

.user-menu>ul,
.user-menu li {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.user-menu>ul {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(-100%);
    background: var(--color-black);
    border-radius: 10px;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

.user-menu>ul.show-animate {
    display: block;
}

.user-menu>ul.show {
    opacity: 1;
    margin-top: -8px;
}

.user-menu li button {
    border-radius: 0;
}

.user-menu li button:hover {
    background: var(--color-user-menu-hover);
}

.user-menu li:first-child button {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.user-menu li:last-child button {
    border-top: 1px solid var(--color-user-menu-border);
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* Customize the width and alignment of the scrollbar */
::-webkit-scrollbar {
    width: 9px;
    /* Set the width of the scrollbar */
    margin-top: 2px;
    /* Add margin for better spacing */
    margin-bottom: 2px;
    border-radius: 5px;
    /* Round the edges */
}

/* Transparent track background */
::-webkit-scrollbar-track {
    background-color: transparent;
    /* Ensure the track is invisible */
    border-radius: 5px;
}

/* Customize the scrollbar thumb (handle) */
::-webkit-scrollbar-thumb {
    background-color: transparent;
    /* Transparent by default */
    border-radius: 5px;
    margin-right: 3px;
    /* Ensure it fits snugly to the right */
}

/* Show thumb on hover */
:hover::-webkit-scrollbar-thumb {
    background-color: rgba(var(--color-text), 0.75);
    /* Semi-transparent on hover */
    border-radius: 5px;
}

/* Enhance hover state for thumb */
::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-text);
    /* Solid color when hovered */
    border-radius: 5px;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 98vh;
    /* Ensures the main container takes full viewport height */
    overflow: hidden;
    /* Prevents overflowing of the main container */
}

main .view {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.navbar {
    z-index: 2;
    color: var(--color-logo);
    text-align: center;
    font-size: 2.3em;
    position: sticky;
    top: 0;
    background-color: var(--color-navbar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.button-container {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    /* Space between the buttons */
}

.dropdown {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    /* Space between the buttons */
}

.new-chat .welcome-msg {
    display: flex;
    align-items: center;
    padding: 5px 5px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.new-chat i {
    margin-right: 10px;
}

.Form i {
    margin-right: 6px;
}

/* Dropdown menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-user-menu-hover);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    top: 100%;
    /* Position the dropdown below the button */
    left: 0;
    font-size: 0.4em;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-content::-webkit-scrollbar {
    width: 10px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #ddd8d8;
    border-radius: 5px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #888;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dropdown-content a {
    color: var(--color-white);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
}

.dropdown-content.light-mode a {
    color: #000000;
    /* black color */
}

.dropdown-content a:hover {
    background-color: var(--color-main);
    border-radius: 5px;
}

.dropdown-content.light-mode a:hover {
    background-color: var(--color-light-button-hover-greyer);
    /* black color */
}

.dropdown:hover .dropdown-content {
    display: block;
    border-radius: 5px;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* Modal Container */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

/* Modal Content */
.modal-content-warning {
    margin: 15% auto;
    padding: 20px;
    background-color: var(--color-assistant-bg);
    border: 0.5px solid var(--color-text);
    width: 80%;
    max-width: 40%;
    border-radius: 8px;
    font-family: inherit;
    text-align: center;
    font-size: 0.5em;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .modal-content-warning {
        padding: 20px;
        background-color: var(--color-assistant-bg);
        border: 0.5px solid var(--color-text);
        border-radius: 8px;
        font-family: inherit;
        text-align: center;
        font-size: 0.5em;
        color: var(--color-text);
        text-align: center;
        margin-left: 10%;
        margin-right: 10%;
        margin-top: 40%;
        max-width: 100%;
        width: auto;
    }
}

.modal-content-warning.light-mode {
    background-color: white;
    color: black;
    border: 0.5px solid #000000;
}

.modal-content-warning.light-mode {
    background-color: white;
    color: black;
    border: 0.5px solid #000000;
}

.modal-content-welcome {
    margin: auto;
    padding: 20px;
    background-color: var(--color-assistant-bg);
    border: 0.5px solid var(--color-text);
    width: 80%;
    max-width: 1200px;
    /* Set a maximum width for larger screens */
    max-height: 80%;
    border-radius: 8px;
    font-family: inherit;
    text-align: left;
    font-size: 0.45em;
    overflow-y: auto;
    position: relative;
    top: 25%;
    transform: translateY(-25%);
    /* change color of the text inside the modal */
    color: var(--color-text);
}

.modal-content-welcome.light-mode {
    background-color: #f1f1f1;
    color: black;
    border: 0.2px solid #1f1e1e;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    float: right;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    /* Both buttons to the right */
    justify-content: flex-end;
    padding: 10px 0 0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #ddd;
    font-family: inherit;
}

#backBtn {
    background-color: #bbb;
    margin-right: 10px;
}

#backBtn-welcome {
    box-shadow: 0 2px 2px white;
}

#continueBtn {
    background-color: #cc9933;
    color: #fff;
}

.views-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.view.conversation-view.active {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.welcome-container {
    text-align: left;
    color: white;
    /* Additional styling for better presentation */
    background-color: var(--color-navbar);
    /* Optional: Add a background color to make white text more visible */
    padding-left: 100px;
    /* Optional: Add padding for spacing */
    padding-right: 100px;
    /* Optional: Add padding for spacing */
    padding-top: 20px;
    /* Optional: Add padding for spacing */
    margin: 0 auto;
    /* Center the container itself */
    max-width: 100%;
    /* Optional: Set a max-width for better readability */
    display: block;
}


/* Webkit scrollbar styles conversation view */
.view.conversation-view.active::-webkit-scrollbar {
    width: 12px;
    /* Width of the vertical scrollbar */
}

.view.conversation-view.active::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Color of the scrollbar track */
}

.view.conversation-view.active::-webkit-scrollbar-thumb {
    background: #888;
    /* Color of the scrollbar thumb */
    border-radius: 6px;
    /* Roundness of the scrollbar thumb */
}

.view.conversation-view.active::-webkit-scrollbar-thumb:hover {
    background: #555;
    /* Color of the scrollbar thumb when hovered */
}

/* Webkit scrollbar styles document-container */
.document-container::-webkit-scrollbar {
    width: 12px;
    /* Width of the vertical scrollbar */
}

.document-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Color of the scrollbar track */
}

.document-container::-webkit-scrollbar-thumb {
    background: #888;
    /* Color of the scrollbar thumb */
    border-radius: 6px;
    /* Roundness of the scrollbar thumb */
}

.document-container::-webkit-scrollbar-thumb:hover {
    background: #555;
    /* Color of the scrollbar thumb when hovered */
}

pre {
    position: relative;
    line-height: 1.5;
    border: 1px solid #3e4451;
    border-radius: 6px;
    font-family: 'Fira Code', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace !important;
    padding: 16px;
    font-size: 14px;
    color: var(--color-text);
    background-color: #1e1e1e;
    overflow: auto !important;
    overflow-wrap: normal !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: 20px auto;
}

/* Light Mode */
.light-mode pre {
    border: none;
    background-color: transparent;
}

/* Styling for Clipboard Icon */
.clipboard-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-gpt-icon);
    color: var(--color-white);
    line-height: 1.5;
    tab-size: 4;
    border: none !important;
    border-radius: 5px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
    background-image: none !important;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
    opacity: 0.4;
}

.clipboard-icon:hover {
    opacity: 1;
    background-color: var(--color-gpt-icon);
}

.light-mode .clipboard-icon {
    background-color: #002244 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
    background-image: none !important;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
    opacity: 0.4;
}

.light-mode .clipboard-icon:hover {
    opacity: 1;
}

.language-label {
    position: absolute;
    top: 10px;
    left: 14px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    background-color: var(--color-assistant-bg);
    padding: 0.3rem 0.5rem 0.2rem;
    border-radius: 1rem;
    font-size: 0.8em;
    line-height: 1;
    height: 1.25rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.light-mode .language-label {
    background-color: #2f363c;
    color: var(--color-text);
}

/* Default text color for plain code */
.light-mode .hljs {
    color: var(--color-black);
    background-color: transparent;
    /* Use a variable for consistency */
}

.light-mode .hljs-comment,
.light-mode .hljs-quote {
    color: #6a737d;
    /* Muted gray for comments and quotes */
    font-style: italic;
}

.light-mode .hljs-keyword,
.light-mode .hljs-selector-tag,
.light-mode .hljs-subst {
    color: #d73a49;
    /* Vibrant red for keywords and selectors */
    font-weight: bold;
}

.light-mode .hljs-title,
.light-mode .hljs-section,
.light-mode .hljs-attribute,
.light-mode .hljs-literal {
    color: var(--color-user-icon);
    /* Brighter blue for titles, sections, attributes, literals */
    font-weight: bold;
}

.light-mode .hljs-string,
.light-mode .hljs-bullet,
.light-mode .hljs-symbol,
.light-mode .hljs-addition {
    color: var(--color-black);
    /* Green for strings, bullets, symbols, additions */
}

.light-mode .hljs-number,
.light-mode .hljs-deletion {
    color: var(--color-user-icon);
    /* Blue for numbers and deletions */
}

.light-mode .hljs-type,
.light-mode .hljs-selector-class,
.light-mode .hljs-selector-id,
.light-mode .hljs-selector-attr,
.light-mode .hljs-selector-pseudo {
    color: #6f42c1;
}

.light-mode .hljs-built_in,
.light-mode .hljs-builtin-name,
.light-mode .hljs-variable,
.light-mode .hljs-template-variable {
    color: #e36209;
}

.light-mode .hljs-link {
    color: var(--color-user-icon);
    text-decoration: underline;

}

.light-mode .hljs-meta,
.light-mode .hljs-meta-string {
    color: var(--color-user-icon);
    /* Blue for meta and meta-strings */
}

.light-mode .hljs-strong {
    font-weight: bold;
    /* Bold for strong text */
}

.light-mode .hljs-emphasis {
    font-style: italic;
}

.hljs {
    color: var(--color-text);
}

/* Comments and Quotes */
.hljs-comment,
.hljs-quote {
    color: #5c6370;
    /* Grayish color for comments */
    font-style: italic;
}

/* Keywords, Selector Tags, and Substitutions */
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
    color: #c678dd;
    /* Purple for keywords and selectors */
}

/* Titles, Sections, Attributes, and Literals */
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-literal {
    color: #e06c75;
    /* Red for titles and literals */
}

/* Strings, Bullets, Symbols, and Additions */
.hljs-string,
.hljs-bullet,
.hljs-symbol,
.hljs-addition {
    color: #98c379;
    /* Green for strings and additions */
}

/* Numbers and Deletions */
.hljs-number,
.hljs-deletion {
    color: #d19a66;
    /* Orange for numbers and deletions */
}

/* Types and Various Selectors */
.hljs-type,
.hljs-selector-class,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo {
    color: #e06c75;
    /* Red for types and selectors */
}

/* Built-in Elements, Attributes, Variables, and Template Variables */
.hljs-built_in,
.hljs-attr,
.hljs-variable,
.hljs-template-variable {
    color: #e5c07b;
    /* Yellow for built-ins and variables */
}

/* Links */
.hljs-link {
    color: #61afef;
    /* Blue for links */
    text-decoration: underline;
    /* Underlined links for clarity */
}

/* Emphasis */
.hljs-emphasis {
    font-style: italic;
    /* Italic emphasis */
}

/* Strong Emphasis */
.hljs-strong {
    font-weight: bold;
    /* Bold text for strong emphasis */
}

/* Checkmark Styling */
.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #2ea44f;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    pre {
        font-size: 13px;
        /* Adjust font size for smaller screens */
        padding: 12px;
        /* Reduce padding for compact layout */
    }

    .language-label {
        font-size: 11px;
        /* Adjust label size for smaller screens */
    }

    .clipboard-icon {
        font-size: 18px;
        /* Adjust icon size */
        padding: 6px;
        /* Adjust padding */
    }
}

/* Container to wrap the .starter elements */
.conversation-starters {
    margin: 0 auto 10px;
    width: 100%;
    max-width: 850px;
    display: flex;
    justify-content: space-between;
    padding: 0px 45px 0 45px;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 3;
}

.starter {
    background-color: var(--color-user-menu-hover);
    border-radius: 13px;
    border: 1px solid var(--color-user-message-border);
    padding: 17px;
    color: var(--color-white);
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
    flex: 1;
    text-align: center;
    margin: 0 5px;
    box-shadow: rgba(0, 0, 0, 0.2) 0 0 45px;
}

.starter.light-mode {
    background-color: white;
    box-shadow: 0 4px 6px var(--color-light-shadow);
    color: black;
    border: none;
}

.starter:hover {
    background-color: var(--color-main);
}

.starter.light-mode:hover {
    background-color: var(--color-light-button-hover-greyer);
}

#message-form {
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    padding: 5px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#message-form.light-mode {
    background-color: var(--color-light-border1);
}

.message-wrapper.light-mode {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(8px);
}

#message {
    flex-grow: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    font-family: system-ui, sans-serif;
    color: var(--color-light-main);
    padding: 6px 10px;
    resize: none;
    min-height: 24px;
    max-height: 100px;
    overflow-y: auto;
}

#message.light-mode {
    color: var(--color-black);
}

#message::placeholder {
    margin-top: 3px;
    color: var(--color-light-main);
    font-size: var(--font-size-base);
}

#message.light-mode::placeholder {
    color: var(--color-light-disclaimer);
}

.send-button {
    background-color: var(--color-navbar);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.send-button:hover {
    background-color: var(--color-tilburgai-yellow);
    transform: scale(1.05);
}

/* Mobile-specific styles for send button */
@media (max-width: 768px) {
    .send-button {
        min-height: 44px; /* Minimum touch target size for mobile */
        min-width: 44px;
        touch-action: manipulation;
    }
    
    .send-button:active {
        background-color: var(--color-tilburgai-yellow);
        transform: scale(0.95);
    }
}

.send-button.light-mode {
    background-color: lightgray;
    color: var(--color-white);
}

.disclaimer {
    font-size: 14px !important;
    color: var(--color-light-disclaimer);
    text-align: center;
    margin-top: 10px;
}

/* === Text Assistant === */
.assistant.message {
    background: transparent;
    color: var(--color-assistant-text);
    margin-right: 15%;
    margin-left: 10%;
    font: 1rem
}

.assistant.message.light-mode {
    background-color: transparent;
    color: var(--color-black);
}

.assistant p {
    margin: 0.5em 0 0.5em 0;
}

/* === Text User === */
.user.message {
    color: var(--color-light-main);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: transparent;
    padding: 10px 15px;
    margin-right: 15%;
    margin-left: 15%;
    font-size: 1rem;
    background-color: transparent;
    line-height: 1.5rem;
}

.user.message .content {
    background-color: var(--color-assistant-bg);
    border-radius: 10px;
    margin-left: 20%;
    margin-top: 30px;
    padding-bottom: .625rem;
    padding-top: .625rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}


.user.message.light-mode {
    background-color: transparent;
    color: #0d0d0d;
}

.user.message.light-mode .content {
    color: var(--color-black);
    background-color: hsla(0, 0%, 91%, .5);
}

.message {
    display: flex;
    gap: 15px;
    padding: 25px 60px 15px 20px;
    border-bottom: 1px solid var(--color-border2);
    font-size: 14px;
}

.message {
    border-bottom: none;
    line-height: 1.5;
}

.message .content {
    padding-top: 5px;
}

.text {
    text-align: left;
}


/* === Message Icons === */
i.user-icon {
    padding: 4px;
    color: var(--color-white);
    background: var(--color-user-icon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    margin-right: 8px;
    font-style: normal;
    width: 28px;
    height: 28px;
    font-size: var(--font-size-base);
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gpt.user-icon {
    background: var(--color-gpt-icon);
}

/* Popup Styling */
.pdf-popup {
    width: 50%;
    height: 80vh;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
}

/* Additional CSS for small screens */
@media (max-width: 768px) {

    .welcome-container,
    .document-container {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 10px;
    }
}

@media (max-width: 768px) {
    .conversation-starters {
        margin-left: 10px;
        width: 100%;
        max-width: 700px;
        display: flex;
        justify-content: flex-start;
        padding: 0px 45px;
        box-sizing: border-box;
        cursor: pointer;
        z-index: 3;
        overflow-x: auto;
        white-space: nowrap;
        scroll-snap-type: x mandatory;
    }

    .starter {

        border-radius: 13px;
        border: 1px solid var(--color-user-message-border);
        padding: 17px;
        color: var(--color-white);
        font-family: inherit;
        font-size: 0.9em;
        cursor: pointer;
        flex: 0 0 auto;
        text-align: center;
        margin: 0 5px;
        box-shadow: rgba(0, 0, 0, 0.2) 0 0 45px;
        scroll-snap-align: start;
        max-height: 100px;
        /* Set a maximum height */
        overflow: hidden;
        /* Hide overflow */
        text-overflow: ellipsis;
        /* Add ellipsis for overflowing text */
        white-space: normal;
        /* Allow text to wrap onto the next line */
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
        width: auto;
        /* Let the box be as wide as needed */
        max-width: 100%;
        /* Ensure it doesn’t overflow its container */
    }

    .starter.light-mode {
        background-color: white;
        box-shadow: 0 4px 6px var(--color-light-shadow);
        color: black;
        border: none;
    }

    /* Style the scrollbar track */
    .conversation-starters::-webkit-scrollbar {
        width: 0px;
        /* Set the width of the scrollbar */
        height: 0px;
        /* Set the height of the scrollbar */
    }

    /* Style the scrollbar thumb (the part that you drag) */
    .conversation-starters::-webkit-scrollbar-thumb {
        background-color: #888;
        /* Change the color of the thumb */
        border-radius: 10px;
        /* Add rounded corners to the thumb */
    }

    /* Style the scrollbar track (the background of the scrollbar) */
    .conversation-starters::-webkit-scrollbar-track {
        background: #f1f1f1;
        /* Change the background of the scrollbar track */
        border-radius: 10px;
        /* Add rounded corners to the track */
    }

    /* Change the color when hovering over the scrollbar thumb */
    .conversation-starters::-webkit-scrollbar-thumb:hover {
        background: #555;
        /* Change the thumb color on hover */
    }

}

@media (max-width: 768px) {
    #message-form {
        padding: 0px 0px 0px 0px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .message {
        padding: 15px 15px 15px 15px;
        gap: 10px;
    }
}

/* Sidebar styling for show-sidebar when added via javascript */
.sidebar {
    position: fixed;
    left: -250px;
    /* Hide the sidebar initially */
    top: 0;
    bottom: 0;
    width: 250px;
    background-color: var(--color-navbar);
    transition: left 0.3s ease;
    /* Smooth transition for showing/hiding the sidebar */
    z-index: 1000;
    /* Shadow on the right side of the sidebar */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.sidebar.light-mode {
    background-color: var(--color-light-main);
}

/* Style for buttons inside sidebar */
.sidebar button i {
    margin-right: 10px;
}

.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    cursor: pointer;
    margin: 15px;
}

.sidebar-close.light-mode {
    color: black;
}

.button-container-small {
    display: none;
}

.newchatsmall {
    margin-right: 10px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    /* Stack the buttons vertically */
    align-items: flex-start;
    /* Align buttons to the start of the container */
    padding: 20px;
    /* Add some padding for spacing */
    position: relative;
    /* Position relative to make the close button work properly */
}

.sidebar button {
    margin-bottom: 10px;
    /* Add some space between buttons */
    cursor: pointer;
    /* Change cursor to pointer */
}

/* Show the sidebar when this class is applied */
.show-sidebar {
    left: 0;
}

/* Style the sidebar toggle button */
.sidebar-toggle {
    display: none;
    margin-left: 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Grey with 50% transparency */
    z-index: 900;
    /* Layer it beneath the sidebar */
    display: none;
    /* Hide the overlay by default */
    transition: opacity 0.3s ease;
}

@media (max-width: 1230px) {
    .sidebar-toggle {
        display: block;
    }

    .button-container {
        display: none;
    }

    .download {
        margin-top: 40px;
    }

    .button-container-small {
        display: block;
    }
}

/* Accordion styles */
.custom-accordion {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    max-width: 600px;
}

@media (max-width: 690px) {
    .custom-accordion {
        max-width: 100%;
    }
}

.accordion-item {
    border-bottom: 1px solid #ccc;
    max-width: 600px;
}

.accordion-header {
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    display: flex;
    justify-content: space-between;
    /* Puts the icon on the right */
    align-items: center;
    padding-top: 8px;
    padding-left: 10px;
}

.accordion-header.light-mode {
    background-color: #f1f1f1;
}

.accordion-header:hover {
    background-color: #565252;
}

.accordion-header.light-mode:hover {
    background-color: #ddd;
}

.accordion-content {
    max-height: 0;
    /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
    /* No padding when hidden */
}

.accordion-body {
    padding: 10px;
}

.accordion-body video {
    display: block;
}

.accordion-body iframe {
    width: 100%;
    height: 500px;
    /* Set a fixed height */
}

.source-text {
    font-size: 0.8em;
    color: #a19f9f;
}

.source-text.light-mode {
    color: #777;
    background-color: transparent;
}

/* Chevron icon rotation */
.accordion-icon {
    transition: transform 0.3s ease;
    /* Add some space on the right */
    margin-right: 30px;
    margin-bottom: 10px;
}

.accordion-icon.rotate {
    transform: rotate(180deg);
    /* Rotate the icon when accordion is open */
}

/* File Preview Container - Improved Layout */
#file-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px auto;
    font-size: var(--fa-font-regular, 0.8em);
    background-color: transparent;
    max-width: 100%;
}

/* File Preview Wrapper */
.file-preview-wrapper {
    background-color: rgba(63, 64, 66, 0.3);
    border: 1px solid var(--color-border1);
    border-radius: 12px;
    padding: 10px;
    margin: 5px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 800px;
    backdrop-filter: blur(10px);
}

/* File Preview Header */
.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border1);
}

.file-preview-title {
    font-weight: 600;
    color: var(--color-text);
    font-size: 1rem;
}

.file-preview-controls {
    display: flex;
    gap: 8px;
}

.file-preview-controls button {
    background: none;
    border: 1px solid var(--color-border1);
    border-radius: 4px;
    color: var(--color-text);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.file-preview-controls button:hover {
    background-color: var(--color-button-hover);
    border-color: var(--color-border2);
}

/* File Preview Images */
.file-preview-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.file-preview-item {
    position: relative;
    display: inline-block;
    border: 2px solid var(--color-border1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.file-preview-item:hover {
    border-color: var(--color-border2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.preview-image {
    max-width: 150px;
    max-height: 200px;
    min-width: 100px;
    min-height: 100px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f5f5f5;
}

.preview-image[src*="data:image/svg+xml"] {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

.remove-single-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-single-file:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Light mode styles */
.file-preview-wrapper.light-mode {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: var(--color-light-border1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.file-preview-wrapper.light-mode .file-preview-title {
    color: var(--color-light-text);
}

.file-preview-wrapper.light-mode .file-preview-header {
    border-bottom-color: var(--color-light-border1);
}

.file-preview-wrapper.light-mode .file-preview-controls button {
    border-color: var(--color-light-border1);
    color: var(--color-light-text);
}

.file-preview-wrapper.light-mode .file-preview-controls button:hover {
    background-color: var(--color-light-button-hover);
}

.file-preview-wrapper.light-mode .file-preview-item {
    border-color: var(--color-light-border1);
}

.file-preview-wrapper.light-mode .file-preview-item:hover {
    border-color: var(--color-light-user-menu-border);
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--color-light-assistant-text);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    max-width: 500px;
}

/* Icon and Details */
.file-preview .file-icon {
    font-size: 20px;
    color: var(--color-assistant-text);
    /* geel accent (bijv. Tilburg AI geel) */
    margin-right: 14px;
    display: flex;
    align-items: center;
}

/* File details */
.file-preview .file-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Filename styling */
.file-preview .file-name {
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 2px;
}

/* Filetype/subtitle */
.file-preview .file-type {
    font-size: 0.85rem;
    color: #bbbbbb;
}

/* Accessibility and Responsiveness */
@media (max-width: 768px) {
    .file-preview {
        max-width: 90%;
        /* Adjusts width for smaller screens */
        padding: 10px;
        /* Reduces padding for compactness */
    }

    #file-preview-container {
        padding: 10px;
        /* Adjusts container padding for smaller screens */
    }
}

/* Light Mode Styling */
.file-preview.light-mode {
    background-color: var(--light-mode-message-wrapper-background);
    color: var(--color-black);
    border: 1px solid #dddddd;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.file-preview.light-mode .file-icon {
    color: var(--color-light-assistant-text);
    /* Icon color in light mode */
}


.file-preview.light-mode .file-name {
    color: var(--color--light-assistant-text);
    /* File name color in light mode */
}

.file-preview.light-mode .file-type {
    color: var(--color--light-assistant-text);
    /* File type color in light mode */
}

.file-preview.light-mode:hover {
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
    /* Enhanced shadow in light mode */
    border: 1px solid var(--color--light-assistant-text);
    /* Blue border on hover in light mode */
}

/* Accessibility: Fallback and Responsiveness */
@media (max-width: 768px) {
    .file-preview {
        max-width: 90%;
        /* Adjusted width for smaller screens */
        padding: 8px;
        /* Reduced padding */
    }

    #file-preview-container {
        padding: 5px 15px;
        /* Reduced container padding */
    }
}

/* Upload Icon in Message Bar */
.upload-icon {
    font-size: 0.8em;
    color: #0c2e67;
    cursor: pointer;
    transition: color 0.3s ease;
}

.upload-icon:hover {
    color: #c6a032;
}

/* Upload Container */
.message-wrapper {
    position: relative;
    width: 100%;
    background-color: rgba(63, 64, 66, 0.2);
    padding: 12px 16px;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-file-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    border: 1px solid var(--color-border1);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-file-button:hover {
    background-color: var(--color-button-hover);
    border-color: var(--color-border2);
}

/* Light mode styling for upload button */
.upload-file-button.light-mode {
    background-color: transparent;
    border: 1px solid var(--color-light-border1);
    color: var(--color-light-text);
}

.upload-file-button.light-mode:hover {
    background-color: var(--color-light-button-hover);
    border-color: var(--color-light-user-menu-border);
}