* {
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}
body {
    background-color: #F9F8F7 !important;
}
.card .btn-primary {
    background-color: #f77e20;
    border-color: #f77e20;
}
.card .btn-primary:hover {
    background-color: #45464b;
    border-color: #45464b;
}
.chat_window {
    position: relative;
    transform: none;
}

.chat_window {
    position: absolute;
    width: calc(100% - 20px);
    max-width: 800px;
    height: 700px;
    border-radius: 10px;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #f8f8f8;
    overflow: hidden;
}
.top_menu {
    background-color: #fff;
    width: 100%;
    padding: 20px 0 15px;
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.1);
}
.top_menu .buttons {
    margin: 3px 0 0 20px;
    position: absolute;
}
.top_menu .buttons .button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    position: relative;
    background-color: #f77e20;
}
.top_menu .buttons .button.close {
    background-color: #d7bb90;
}
.top_menu .buttons .button.minimize {
    background-color: #b84d2e;
}
.top_menu .buttons .button.maximize {
    background-color: #f77e20;
}
.top_menu .title {
    text-align: center;
    color: #45464b;
    font-size: 20px;
}
.messages {
    position: relative;
    list-style: none;
    padding: 20px 10px 0 10px;
    margin: 0;
    height: 547px;
    overflow-x: hidden;
    position: relative;
}
.messages .message {
    clear: both;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.5s linear;
    opacity: 0;
    color: #45464b;
}
.messages .message.left .avatar {
    background-color: #a9b1b5;
    float: left;
}

.messages .message.left .text_wrapper {
    background-color: #a9b1b5;
    margin-left: 20px;
    float: left;
}

.messages .message.left .text_wrapper::after, .messages .message.left .text_wrapper::before {
    left: -25px;
    border-right-color: #a9b1b5;
    border-left-color: transparent;
}
.avatar i.fas {
    font-size: 24px;  /* Ajuste o tamanho como preferir */
    color: white;  /* A cor do ícone */
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.messages .message.left .text {
    color: #fff;
}

@keyframes rocket1 {
    0% { background-position: center bottom; }
    100% { background-position: center top; }
}

.messages .message.right .avatar {
    background-color: #ffe6cb;
    background-image: url("https://i0.wp.com/agenciawedigital.com.br/wp-content/uploads/2022/06/wedigital-foguete.png");
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
    float: right;
    border: 3px solid #f77e20;
    animation: rocket1 2s linear;
}
.messages .message.right .text_wrapper {
    background-color: #ffe6cb;
    margin-right: 20px;
    float: right;
}
.messages .message.right .text_wrapper::after, .messages .message.right .text_wrapper::before {
    right: -25px;
    border-left-color: #ffe6cb;
    border-right-color: transparent;
}
.messages .message.right .text {
    color: #b84d2e;
}
.messages .message.appeared {
    opacity: 1;
}
.messages .message .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-block;
}

.messages .message .text_wrapper {
    display: inline-block;
    padding: 20px;
    border-radius: 6px;
    width: calc(100% - 85px);
    min-width: 100px;
    position: relative;
}
.messages .message .text_wrapper::after, .messages .message .text_wrapper:before {
    top: 18px;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.messages .message .text_wrapper::after {
    border-width: 13px;
    margin-top: 0;
}
.messages .message .text_wrapper::before {
    border-width: 15px;
    margin-top: -2px;
}
.messages .message .text_wrapper .text {
    font-size: 18px;
    font-weight: 300;
}
.bottom_wrapper {
    width: 100%;
    background-color: #fff;
    padding: 20px 20px;
    position: absolute;
    bottom: 0;
}
.bottom_wrapper .message_input_wrapper {
    display: inline-block;
    height: 50px;
    border-radius: 25px;
    border: 1px solid #bcbdc0;
    width: calc(100% - 120px);
    position: relative;
    padding: 0 20px;
    color: #45464b;
}
.bottom_wrapper .message_input_wrapper .message_input {
    border: none;
    height: 100%;
    box-sizing: border-box;
    width: calc(100% - 40px);
    position: absolute;
    outline-width: 0;
    color: rgb(128, 128, 128);
}


.message_template {
    display: none;
}

.bottom_wrapper .message_input_wrapper .message_input:hover,
.bottom_wrapper .message_input_wrapper .message_input:active,
.bottom_wrapper .message_input_wrapper .message_input:focus {
    background-color: #efefeb;
    color: #45464b;
}
.bottom_wrapper .message_input_wrapper:hover,
.bottom_wrapper .message_input_wrapper:active,
.bottom_wrapper .message_input_wrapper:focus-within {
    border-color: #efefeb;
    background-color: #efefeb;
}

.microphoneButton {
    background-color: grey;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 5px;
}

.microphoneButton.recording {
    background-color: #dc3545 !important;
    color: white;
}

.microphoneButton, #sendMessageButton {
    width: 50px;
    height: 50px;
}

.microphoneButton:hover, #sendMessageButton:hover {
    background-color: #f77e20;
    color: white;
}

#sendMessageButton {
    background-color: #f77e20;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 5px;
}

.bottom_wrapper .message_input_wrapper, .microphoneButton, #sendMessageButton {
    vertical-align: middle;
}

.text.animating {
    clip-path: inset(0 100% 0 0);
    animation: revealText 3s forwards;
}

@keyframes revealText {
    to {
        clip-path: inset(0 0 0 0);
    }
}
#microphoneContainer i {
    position: absolute;
}

.hide {
    display: none;
}


.spinner {
    margin: 16px;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.spinner.show {
    opacity: 1;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#microphoneContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#microphoneIcon, #audioSpinner {
    display: none;
}

#microphoneIcon.show, #audioSpinner.show {
    display: inline-block;
}


@media only screen and (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }
    .top_menu .title {
        padding-right: 20px;
        text-align: right;
    }
    .chat_window {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .messages {
        height: calc(100% - 160px);
    }
    .bottom_wrapper .message_input_wrapper {
        width: 70%;
    }
    .messages .message .text {
        font-size: 14px;
    }
    .bottom_wrapper .message_input_wrapper {
        width: calc(98% - 120px);
    }
}