:root {
    --chat_message_background: white;
    --chat_message_color: black;
    --chat_message_font_size: max(1.2rem, 20px);
}

#chat_base{
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* #region Chat */

#chat_body{
    flex-grow: 1;
    max-height: 100%;
}

#chat_container{
    font-size: var(--chat_message_font_size);
    height: 100%;
    display: flex;
    flex-direction: column;
}

#chat_language_select[style*='display: flex'] ~ div {
    display: none;
}

#chat_messages{
    flex-grow: 1;
    overflow: auto;
}

#chat_messages > .chat_message{
    display: flex;
    flex-direction: column;
    max-width: 85%;
    background-color: var(--chat_message_background);
    color: var(--chat_message_color);
    border-radius: 16px 16px 16px 0;
    padding: 8px 14px;
    margin-bottom: 18px;
    position: relative;
}
#chat_messages > .chat_message.user{
    border-radius: 16px 16px 0 16px;
    margin-left: auto;
}

#chat_messages > * .chat_message_user{
    font-size: 0.8em;
    font-weight: bold;
}

#chat_messages > * .chat_original_text{
    font-size: 0.8em;
}

#chat_messages > * .chat_message_tts{
    position: absolute;
    right: 0;
    top: 0;
    margin: 0.5rem;
}

#chat_container > * #voice_recognition_btn{
    background-color: green;
    color: white;
    display: inline-block;
    padding: 0.375rem 0.75rem;
    text-align: center;
    vertical-align: middle;
    border: 1px solid green;
    border-radius: 0.375rem;
    line-height: 1.5rem;
    font-size: 1rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
#chat_container > * #voice_recognition_btn>img{
    filter: brightness(0) invert(1);
    max-height: 1rem;
}
/* #endregion */

/* #region Language select */
#chat_base > #chat_language_select {
    height: 100%;
    overflow: auto;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
#chat_base > #chat_language_select > div {
    width: 40%;
    border: 1px solid black;
    border-radius: 5px;
    text-align: center;
    padding: 0.5rem;
}

#chat_base > #chat_language_select > div > .lang_code {
    font-weight: bold;
    font-size: 1.2em;
}

#chat_base > #chat_language_select > div > .lang_icon{
    max-width: 100%;
    max-height: 100%;
    margin-bottom: 0.5rem;
    border: 1px solid black;
    border-radius: 50%;
}
/* #endregion */