@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

:root {
    --chatbot-height: 37rem;
    --chatbot-width: 26rem;
    --chatbot-max-height: 90vh;
    --chatbot-status-color: #33BA5F;
    --chatbot-header-height: 4.1rem;
    --chatbot-input-height: 2.6rem;
    --chatbot-border-radius: 1.25rem;
    --chatbot-border-radius-closed: 1.25rem;
    --chatbot-padding: 1.25rem;
    --chatbot-hover-distance: 1rem;
    --chatbot-open-size: 4rem;
    --chatbot-message-font-size: 0.8rem;
}

@media (max-width: 450px) {
    :root {
        --chatbot-height: 100%;
        --chatbot-max-height: none;
        --chatbot-width: 100%;
        --chatbot-border-radius: 0;
        --chatbot-hover-distance: 0;
    }
}

.loader_container {
    width: 5.06rem;
    height: 1.1375rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.typing_loader {
    height: 10px;
    aspect-ratio: 2.5;
    --_g: no-repeat radial-gradient(farthest-side,#000 90%,#0000);
    background:var(--_g), var(--_g), var(--_g), var(--_g);
    background-size: 20% 50%;
    animation: l43 1s infinite linear;
}
@keyframes l43 {
    0%     {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    16.67% {background-position: calc(0*100%/3) 0   ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    33.33% {background-position: calc(0*100%/3) 100%,calc(1*100%/3) 0   ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    50%    {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 100%,calc(2*100%/3) 0   ,calc(3*100%/3) 50% }
    66.67% {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 100%,calc(3*100%/3) 0   }
    83.33% {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 100%}
    100%   {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
}

.chatbot-container {
    width: var(--chatbot-width);
    height: var(--chatbot-height);
    max-height: var(--chatbot-max-height);
    z-index: 100;
    position: fixed;
    right: var(--chatbot-hover-distance);
    bottom: var(--chatbot-hover-distance);
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.12);
    border-radius: var(--chatbot-border-radius);
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    aspect-ratio: var(--chatbot-width) / var(--chatbot-height);
    font-family: Inter, sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    transition: height ease-in-out .2s, width ease-in-out .2s;
    background: #FFFFFF;
}

.livechat-container {
    width: var(--chatbot-width) !important;
    height: var(--chatbot-height)!important;
    position: fixed !important;
    right: var(--chatbot-hover-distance) !important;
    bottom: var(--chatbot-hover-distance) !important;
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.12) !important;
    border-radius: var(--chatbot-border-radius) !important;
    overflow: hidden !important;
    aspect-ratio: var(--chatbot-width) / var(--chatbot-height) !important;
    font-family: Inter, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: normal !important;
    transition: height ease-in-out .2s, width ease-in-out .2s !important;
}

.chatbot__open {
    flex-direction: column;
    color: white;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    font-size: var(--chatbot-message-font-size);
    justify-content: center;
    background: #33BA5F;
    width: var(--chatbot-open-size);
    height: var(--chatbot-open-size);
    display: flex;
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.1s;
    z-index: 99999994;
}

.chatbot__open > img {
    cursor: pointer;
    width: 40%;
    height: 40%;
    display: block;
}

.chatbot-container.closed {
    width: var(--chatbot-open-size);
    height: var(--chatbot-open-size);
    right: var(--chatbot-hover-distance);
    bottom: var(--chatbot-hover-distance);
    border-radius: var(--chatbot-border-radius-closed);
    overflow: hidden;
}

.chatbot__header {
    background: #090F3D;
    border: 2px solid #3A3F64;
    border-bottom: none;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    height: var(--chatbot-header-height);
    display: none;
    padding-inline: var(--chatbot-padding);
    align-items: center;
    gap: 1rem;
    filter: drop-shadow(0px 8px 4px rgba(0, 0, 0, 0.12));
    position: relative;
    z-index: 10;
}

.chatbot-container.closed .chatbot__header {

}

.chatbot__header__icon {
    background: #000424;
    width: 2.8125rem;
    height: 2.8125rem;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.chatbot__header__icon img {
    height: 60%;
    width: 60%;
}

.chatbot__header__information .name {
    color: #FFF;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.chatbot__header__information .status {
    color: var(--chatbot-status-color);
    font-family: Inter, sans-serif;
    font-size: 0.75rem;
}

.chatbot__header__information .status span {
    display: inline-block;
    height: 0.5rem;
    width: 0.5rem;
    margin-right: 0.25rem;
    background: var(--chatbot-status-color);
    border-radius: 50%;
}

.chatbot__header__menu {
    color: white;
    height: 2rem;
    margin-right: 0.5rem;
    margin-left: auto;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.chatbot__header__menu__hitbox {
    height: 2.5rem;
    width: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot__header__menu__dropdown {
    display: none; /*none*/
    position: absolute;
    top: 1.9rem;
    right: 0rem;
    width: 8rem;
    border-radius: 0.25rem;
    background: white;
    color: #090F3D;
    font-size: var(--chatbot-message-font-size);
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.chatbot__header__menu__dropdown > div {
    padding: 1rem;
}

.chatbot__header__menu img {
    height: 1.5rem;
    width: 1.5rem;
}

.chatbot__header__menu__dropdown div:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

.chatbot__messages {
    padding: var(--chatbot-padding);
    height: calc(100% - var(--chatbot-header-height) - var(--chatbot-input-height) - 1rem);
    font-size: var(--chatbot-message-font-size);
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 1.5rem;
    line-height: 1.0rem; /* 140% */
    overflow-y: scroll;
}

.chatbot__example_questions {
    display: grid;
    margin-top: auto;
    transform: translate(0.25rem, 1.5rem);
}

.chatbot__example_questions > div {
    background: #E9F7EE;
    border-radius: 1rem;
    color: #33ba5f;
    margin-block: 0.25rem;
    cursor: pointer;
    padding: 0.4rem;
    padding-inline: 1.1rem;
}

.chatbot__message__timestamp {
    position: absolute;
    bottom: -3rem;
    padding-bottom: 1rem;
    font-size: 0.63rem;
    padding-inline: 0.5rem;
}

.chatbot__message__block {
    display: flex;
    flex-direction: column;
    gap: 0.50rem;
    position: relative;
}

.chatbot__message__block.bot {
    align-items: start;
}

.chatbot__message__block.button,
.chatbot__message__block.user {
    align-items: end;
}

.chatbot__message__block.button > div,
.chatbot__message__block.user > div,
.chatbot__message__block.bot > div {
    border-radius: 0.5rem;
    max-width: 90%;
    padding: 0.625rem;
}

.chatbot__message__block.bot > div {
    background: #EFEFEF;
    color: #090F3D;
}

.chatbot__message__block.user > div {
    background: #33BA5F;
    overflow-wrap: anywhere;
    color: white;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.12);
}

.chatbot__message__block.button > div {
    background: #E9F7EE;
    border-radius: 0.5rem;
    color: #33ba5f;
    cursor: pointer;
}

.chatbot__input {
    height: var(--chatbot-input-height);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: var(--chatbot-padding);
    margin-bottom: 1rem;
    width: var(--chatbot-width);
}

.chatbot__input form {
    background: #E9F7EE;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 31.25rem;
    height: 2.625rem;
    padding-inline: 0.5rem;
    transform: translateY(0.5rem);
}

.chatbot__input form input {
    margin: 0;
    background: none;
    border: none;
    outline: none;
    color: #000;
    font-size: var(--chatbot-message-font-size);
    width: 73%;
    opacity: 0.9;
}

.chatbot__input form button {
    margin: 0;
    background: #33BA5F !important;
    height: 1.8rem;
    border: none;
    border-radius: 6.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    right: 0.5rem;
    padding: 1rem;
}

.chatbot__input form button:hover {
    background: #33BA5F;
}

.chatbot__input form button:focus {
    outline: none;
}

.chatbot__input form button img {
    height: 0.9rem;
    width: 0.9rem;
}

/* Chat input field and send button */

.chat-input {
    width: calc(100% - 10px*2);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 10px;
}

.character-count {
    color: #aaa;
    position: absolute;
    right: 5.3rem;
    height: 0rem;
    font-size: var(--chatbot-message-font-size);
    /*flex-direction: column;*/
    /*align-items: flex-end;*/
}

.pdf-file-button {
    border: none;
    cursor: pointer;
    margin-left: 1rem;
    display: grid;
    place-items: center;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #c4c4c4;
}
