@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
@font-face {
    font-family: 'Veritas Sans';
    src: url('/main/static/fonts/Veritas-Sans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --main-color: #10b981;
    --secondary-color: #8b5cf6;
    --text-color: white;
    --text-color-secondary: black;
    /* --user-color: rgb(176, 235, 196); */
    --user-color: color-mix(in srgb, var(--main-color) 30%, transparent);
    /* --bot-color: #8b5cf6; */
    --bot-color: color-mix(in srgb, var(--secondary-color) 30%, transparent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);

    /* scrollbar-width: thin;
    scrollbar-color: var(--secondary-color); */
}


::after, ::before {
    box-sizing: inherit;
}

html {
    background-color: white;
    min-height: 100%;
    box-sizing: border-box;
    /* overflow-y: scroll; */
    line-height: 20px;
}

a {
    text-decoration: none;

    &:visited {
        color: inherit;
        text-decoration: none;
    }
}

body {
    background: white;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    /* border: 1px solid greenyellow; */
}

.container {
    border-radius: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0px;
    background-color: white;
    overscroll-behavior: none;
}

.header {
    display: flex;
    position: relative;
    flex-direction: row;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.75rem;
    background-color: var(--main-color);
    word-break: break-word;
    min-height: 10%;

    border-bottom: .2rem solid var(--secondary-color);;
    user-select: none;

    & > div {
        display: flex;
        -webkit-box-flex: 1;
        -webkit-box-align: center;
        align-items: center;
        min-height: 100%;
        min-width: 0px;
        opacity: 1;

        & > figure {
            /* transition: box-shadow 0.25s ease-in-out, color 0.1s ease-in-out; */
            background-color: transparent;
            width: 3rem !important;
            height: 3rem !important;

            margin-left: 0.5rem;
            border-radius: 50%;
            opacity: 1;
            /* opacity: 0; */
            /* animation: 200ms ease-out 0s 1 normal forwards running ir; */

            & > img {
                box-sizing: inherit;
                vertical-align: bottom;
                object-fit: cover;
                border-radius: inherit;
                width: 100%;
                height: 100%;
                max-width: 100%;
                border-style: none;
                overflow: clip;
                overflow-clip-margin: content-box;
            }
        }

        & > div {
            display: flex;
            flex-direction: column;
            -webkit-box-pack: center;
            justify-content: center;
            flex: 1 1 0%;
            color: var(--text-color);
            padding-left: .5rem;
            min-width: 0px;
            margin-bottom: 0.25rem;
            margin-top: 0.25rem;
            /* animation: 200ms ease-out 0s 1 normal forwards running ir2; */

            & > h2 {
                font-size: 2rem;
                line-height: 2.5rem;
                font-weight: 600;
                overflow: hidden;
            }
        }
    }

}


.footer {
    display: flex;
    position: relative;
    flex-direction: row;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.75rem;
    background-color: var(--main-color);
    word-break: break-word;
    min-height: 5%;

    border-top: .2rem solid var(--secondary-color);

    /* font-size: 1rem; */
    /* line-height: 2.5rem; */
    /* font-weight: 600; */
    overflow: hidden;
    color: color-mix(in srgb, var(--text-color) 60%, var(--main-color));
    font-size: .8rem;
    
    & * {
        color: color-mix(in srgb, var(--text-color) 60%, var(--main-color));
        font-size: .8rem;
    }
}

.chat {
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.email-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.email-form input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    /* margin: 5px 0; */
    border: 1px solid #ccc;
    font-size: 16px;
    outline: none;
    border-radius: 1rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    color: var(--text-color-secondary);

    &::placeholder {
        color: color-mix(in srgb, var(--text-color-secondary) 50%, transparent);
    }
}

.email-form button {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    background: var(--main-color);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    /* margin-top: 10px; */
    border-radius: 1rem;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.email-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.message {
    width: 100%;
    max-width: 300px;
    border-radius: 100vh;
    margin-top: 10px;
    padding: 8px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

.chat-container {
    max-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}




.chat-messages {
    max-height: 80vh;
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    overscroll-behavior-y: contain;

    scrollbar-width: 8px;
    scrollbar-color: var(--secondary-color);
    scrollbar-track-color: rgba(255, 255, 255, 0.4);
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.4);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    /* margin: 5px 0;
    padding: 8px;
    max-width: 80%;
    word-wrap: break-word; */

    border-radius: 1.25rem;
    min-width: 3.25rem;
    padding: .5rem .75rem;

    white-space: pre-wrap;
    overflow-wrap: break-word;
    font-size: .875rem;
    line-height: 1.25rem;

    margin-bottom: 1rem;

    width: fit-content;
}

.chat-message.user {
    background: var(--user-color);
    color: var(--text-color-secondary);
    margin-left: auto;
    align-self: flex-end;
    margin-right: 1rem;
    justify-content: flex-end;

    max-width: calc(100% - 5rem);

    border: var(--main-color) solid 2px;
}

.chat-message.bot {
    background: var(--bot-color);
    color: var(--text-color-secondary);
    margin-left: 1rem;
    justify-content: flex-start;
    align-self: flex-start;

    overflow: hidden;

    max-width: calc(100% - 6.25rem);

    border: var(--secondary-color) solid 2px;


    & * {
        color: var(--text-color-secondary);
        text-align: justify;
        /* text-wrap: balance; */
    }
}

.chat-input-area {
    --border: 2px;

    padding: .75rem;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    gap: 0;
}

.chat-input {
    margin-left: 2rem;
    flex: 1;
    padding: 8px;
    padding-left: 1.5rem;
    outline: none;
    
    border: var(--border) solid #ccc;
    border-right: none;

    border-radius: 100vh;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;

    transition: 1s ease-in-out;

    color: var(--text-color-secondary);
}

.chat-input:focus, .chat-input:hover {
    border: var(--border) solid var(--main-color);
    border-right: none;
}

.chat-send-btn {
    margin-right: 2rem;
    background: var(--main-color);
    color: var(--text-color);
    border: var(--border) solid var(--main-color);
    padding: 8px 12px;
    cursor: pointer;

    border-radius: 100vh;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.hidden {
    display: none;
}

.vs {
    font-family: 'Veritas Sans', Arial, sans-serif;
    letter-spacing: .2em;
    font-weight: normal;
}