html,
body {
    height: 100%;
}

:root {
    --chat-top-offset: 0px;
    --chat-bottom-offset: 176px;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #ffffff;
    overflow: hidden;
}

.suggestions {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s, transform 0.3s;
}

.suggestions:hover {
    cursor: pointer;
    background-color: #F9F9F9;
}

.message-box {
    background-color: white;
    margin: 1rem auto;
    box-shadow: none;
    transition: box-shadow 0.3s;
    position: sticky;
    bottom: 50px;
    z-index: 1000;
}

.message-box:focus {
    outline: none;
    box-shadow: 0 0 0 2px #bfbfbf;
}

.message-box input[type="text"] {
    flex-grow: 1;
    border: none;
    padding-left: 0.5rem;
}

.message-box input[type="text"]:focus {
    outline: none;
    box-shadow: none;
}

.message-box [contentEditable=true]:empty:not(:focus):before {
    content: attr(placeholder);
    color: 9d9d9d;
}

.message-box button {
    background-color: #e5e7eb;
    border: none;
    border-radius: 50px;
    width: 35px;
    height: 35px;
    opacity: 1;
}

.message-box button:disabled {
    background-color: #d9d9d9;
    cursor: not-allowed;
    opacity: 0.5;
}

.disabled {
    background-color: #08143e;
    opacity: 50%;
    cursor: not-allowed;
}

.message-box button:hover:not(:disabled) {
    background-color: #BE8200;
}

.message-box button:hover:not(:disabled) object,
.message-box button:hover:not(:disabled) img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(20deg) brightness(106%) contrast(101%);
}

.footer-fixed {
    position: sticky;
    bottom: 8px;
    z-index: 1000;
}

.footer-fixed p {
    line-height: 1.5;
}

.floating-icon {
    background-color: #989898;
    color: white;
    padding: 0.5rem 0.9rem;
    border-radius: 50px;
    position: relative;
    width: 40px;
    height: 40px;
}

.floating-menu {
    width: 8vw;
    display: none;
    position: absolute;
    bottom: 50px;
    right: 0;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.main-container {
    /* height: 100%; */
    padding-top: 20px;
    /* overflow: hidden; */
}

@media only screen and (max-width: 1024px) {
    #fiu-txt-logo {
        margin-top: 0.5rem;
    }

    #logout-mobile {
        padding-right: 0;
        padding-bottom: 2rem;
    }
}

.chat-container {
    width: 70%;
    margin: 0 auto;
    font-size: 14px;
}

.chat-container>p {
    line-height: 1.9;
    margin: 0;
    padding: 0 1rem;
}

@media only screen and (max-width: 600px) {
    .chat-container {
        /* Extend width for mobile */
        width: 90%;
    }
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    text-align: justify;
}

.chat-message .user-message {
    margin-left: auto;
    background-color: #081E3F;
    border-radius: 10px;
    padding: 0.75rem;
    max-width: 70%;
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.chat-message .bot-message {
    display: flex;
    align-items: center;
    padding: 0;
    max-width: 80%;
    position: relative;
    color: #081E3F !important;
    overflow: hidden;
    min-width: 200px;
    min-height: 30px;
    line-height: 1.8em;
}

.chat-message .bot-message h1,
.chat-message .bot-message h2,
.chat-message .bot-message h3 {
    font-weight: bold !important;
    font-size: 1rem !important;
    color: #081E3F !important;
    margin-top: 5px;
}


.chat-message .bot-message a {
    color: #081E3F !important;
    text-decoration: underline;
    font-weight: bold;
}

.chat-message .bot-message a:hover {
    color: #1750A6 !important;
}

.bot-message ol {
    list-style: circle;
}

.fade-in {
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #CC0066, #FFCC00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-animation {
    display: inline-block;
    white-space: break-spaces;
    overflow: hidden;
    animation: typing 3s steps(30) 1s 1 normal both;
    height: auto;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

.typing-dot {
    display: inline-block;
    animation: blinkDot 1s infinite steps(1, start);
    font-size: 2rem;
    color: #BE8200;
}

@keyframes blinkDot {
    0% {
        opacity: 0
    }

    50% {
        opacity: 1
    }

    100% {
        opacity: 0
    }
}

.bot-message.complete .typing-dot,
.bot-message.complete .typing-animation {
    display: none;
}

.bot-message.complete .final-text {
    display: inline;
}

.bot-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 5px;
    margin-left: 36px;
    margin-bottom: 10px;
}

.bot-actions button {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    color: #686868;
    padding: 5px;
}

.bot-actions button:hover {
    background-color: #d8d8d8;
    border-radius: 6px;
}

.bot-actions button .tooltip {
    visibility: hidden;
    font-family: 'Open Sans', sans-serif;
    width: 100px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    /* Position the tooltip above the button */
    left: 50%;
    margin-left: -50px;
    opacity: 0;
    transition: opacity 0.2s;
}

.bot-actions button .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    /* At the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.bot-actions button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.bot-actions .tooltip-wide {
    width: 120px;
    /* Adjust width to fit "Regenerate", "Thumbs Up", and "Thumbs Down" */
    margin-left: -60px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.feedback-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.feedback-options input[type="button"] {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    background-color: white;
    cursor: pointer;
}

.feedback-options input[type="button"].selected,
input[type="button"]:hover {
    background-color: black;
    color: white;
}

label[for='description'] {
    display: none;
}

.feedback-options input[type="button"] {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    background-color: white;
    cursor: pointer;
}

.feedback-options input[type="button"].selected,
input[type="button"]:hover {
    background-color: black;
    color: white;
}

.submitted-checkmark {
    display: none;
    font-size: 2rem;
    color: green;
    text-align: center;
    animation: fadeInCheck 1s forwards;
}

@keyframes fadeInCheck {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.checkmark {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    stroke-width: 2;
    stroke: #4BB543;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #4BB543;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4BB543;
    fill: #fff;
    animation: stroke .6s cubic-bezier(.65, .05, .36, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke .3s cubic-bezier(.65, .05, .36, 1) .8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #4BB543;
    }
}

.loading1 {
    font-size: 20px;
    font-weight: bold;
    display: inline-block;
}

.dots {
    display: inline-block;
}

.dots::after {
    content: '';
    display: inline-block;
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #fafafa;
    visibility: visible;
    position: relative;
    z-index: 500;
}

.message-bar {
    position: fixed;
    bottom: 0;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    background-color: #ffffff;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}


.lds-ellipsis,
.lds-ellipsis div {
    box-sizing: border-box;
}

.lds-ellipsis {
    /* position: relative; */
    display: inline-block;
    position: absolute;
    width: 80px;
    height: 80px;
    /* text-align: center; */
    margin-top: 100px;
}

.lds-ellipsis div {
    position: absolute;
    top: 33.33333px;
    width: 13.33333px;
    height: 13.33333px;
    border-radius: 50%;
    background: #BE8200;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

.lds-ellipsis-chat,
.lds-ellipsis-chat div {
    box-sizing: border-box;
}

.lds-ellipsis-chat {
    display: inline-block;
    position: absolute;
    width: 80px;
    height: 80px;
    text-align: center;
    margin-top: 0;
    left: -5px;
}

.lds-ellipsis-chat div {
    position: absolute;
    top: 33.33333px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #BE8200;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis-chat div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis-chat div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis-chat div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis-chat div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

#messageInput {
    overflow-y: auto;
    font-size: 14px;
    outline: none;
}

.follow-up-question {
    padding: 0.8rem;
    margin-bottom: 0.2rem;
}

.highlight {
    background-color: #f1c300 !important;
    color: #08143e !important;
}

.follow-up-disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

#goDown {
    position: fixed;
    bottom: 100px;
    /* Adjust this value to change the distance from the bottom */
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#goDown:hover {
    background-color: #0056b3;
    transform: translateX(-50%) scale(1.1);
}

.error-message {
    color: red;
    font-size: 0.8em;
    text-align: right;
    font-size: 0.8em;
    visibility: hidden;
}

#containerBackground {
    display: flex;
    flex-direction: column;
    padding: 24px 0 calc(var(--chat-bottom-offset) + 20px);
    height: calc(100dvh - var(--chat-top-offset) - var(--chat-bottom-offset));
    max-height: calc(100dvh - var(--chat-top-offset) - var(--chat-bottom-offset));
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.chat-scroll-down-indicator {
    position: fixed;
    right: 20px;
    bottom: calc(var(--chat-bottom-offset) + 20px + env(safe-area-inset-bottom, 0px));
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: rgba(8, 19, 63, 0.92);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(8, 19, 63, 0.18);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 1100;
}

.chat-scroll-down-indicator.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-scroll-down-indicator:hover {
    background: #08133f;
}

.chat-scroll-down-indicator:focus-visible {
    outline: 2px solid #f1c300;
    outline-offset: 2px;
}

.chat-message,
.bot-actions,
.follow-up,
#small-loader {
    scroll-margin-bottom: calc(var(--chat-bottom-offset) + 24px);
}

@media only screen and (max-width: 1024px) {
    #containerBackground {
        padding-top: 24px;
    }
}

@media only screen and (max-width: 600px) {
    :root {
        --chat-bottom-offset: 208px;
    }

    .chat-scroll-down-indicator {
        right: 16px;
        bottom: calc(var(--chat-bottom-offset) + 16px + env(safe-area-inset-bottom, 0px));
    }

    #containerBackground {
        height: calc(100svh - var(--chat-top-offset) - var(--chat-bottom-offset));
        max-height: calc(100svh - var(--chat-top-offset) - var(--chat-bottom-offset));
        padding-top: 24px;
        padding-bottom: calc(var(--chat-bottom-offset) + env(safe-area-inset-bottom, 0px) + 20px);
    }

    .chat-message .user-message,
    .chat-message .bot-message {
        max-width: 100%;
    }
}

.retry-container {
    border: 2px solid rgb(228, 231, 235);
    border-radius: 12px !important;
    padding: 8px !important;
    cursor: pointer !important;
    font-style: italic !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
}