:root {
    /* Paleta de cores principal */
    --bot-primary-color: #0096fa;
    --bot-primary-dark-color: #27b0c0;
    --bot-white-color: #f6f6f6;
    --bot-neutral-light3-color: #F5F5F5;
    --bot-neutral-dark1-color: #454545;
    --bot-black: #000000;

    /* Cores de background */
    --bot-bg-light: #f6f6f6;
    --bot-bg-lighter: #f1f1f1;

    /* Cores para bordas e divisores */
    --bot-border-color: #8c8c8c;
    --bot-input-border-color: #E6E6E6;

    /* Cores para texto e elementos secundários */
    --bot-text-muted: #8C8C8C;
    --bot-scrollbar-color: rgba(0, 0, 0, 0.3);
    --bot-scrollbar-hover: #AAAAAA;

    /* Cores para sombras */
    --bot-shadow-color: rgba(0, 0, 0, 0.15);
    --bot-shadow-color-light: rgba(0, 0, 0, 0.1);
    --bot-shadow-color-light2: rgba(0, 0, 0, 0.2);
    --bot-shadow-color-light3: rgba(0, 0, 0, 0.4);
}

/* Animações para o botão do chat */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(10%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10%);
    }
}

.bot-container {
    position: fixed;
    bottom: 75px;
    max-height: 602px;
    right: 20px;
    width: 30%;
    height: calc(50% * 1.45);
    border-radius: 5px;
    box-shadow: 0 0 20px 1px var(--bot-shadow-color-light2);
    z-index: 1031;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: Nunito Sans, sans-serif;
    background-color: var(--bot-white-color);
    opacity: 0;
    transform: translateY(10%);
    transition: opacity 500ms, transform 500ms, visibility 500ms, height 0s 500ms;
}

    .bot-container.open {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        transition: opacity 500ms 10ms, transform 500ms 10ms, visibility 500ms 10ms, height 0ms;
        animation: slideInUp 500ms ease forwards;
    }

    .bot-container.closing {
        opacity: 0;
        transform: translateY(10%);
        transition: opacity 500ms, transform 500ms, visibility 500ms;
        animation: slideOutDown 500ms ease forwards;
    }

.bot-container__header {
    z-index: 2;
    display: flex;
    align-items: center;
    background-color: var(--bot-primary-color);
    color: var(--bot-white-color);
    font-weight: 500;
    min-height: 53px;
    width: 100%;
    -webkit-box-shadow: 0 -1px 12px 0 var(--bot-shadow-color-light3);
    box-shadow: 0 -1px 12px 0 var(--bot-shadow-color-light3);
    flex-shrink: 0;
}

    .bot-container__header img {
        width: 35px;
        height: 35px;
        margin: 0px 16px;
        border-radius: 100%;
    }

    .bot-container__header .titles {
        display: flex;
        flex-grow: 1;
        flex-direction: column;
    }

        .bot-container__header .titles .chat-bot-name {
            font-size: 17px;
            font-weight: 500;
            margin: 0;
        }

        .bot-container__header .titles .chat-bot-status {
            font-size: 11px;
            font-weight: 300;
        }

/* Lista de mensagens */
.bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--bot-neutral-light3-color);
    scrollbar-width: thin;
    scrollbar-color: var(--bot-scrollbar-color) var(--bot-bg-lighter);
}

    .bot-messages::-webkit-scrollbar {
        width: 6px;
    }

    .bot-messages::-webkit-scrollbar-track {
        background: var(--bot-bg-lighter);
    }

    .bot-messages::-webkit-scrollbar-thumb {
        background-color: var(--bot-scrollbar-color);
        border-radius: 3px;
    }

        .bot-messages::-webkit-scrollbar-thumb:hover {
            background-color: var(--bot-scrollbar-hover);
        }

/* Mensagem individual */
.bot-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.bot-message--bot {
    align-self: flex-start;
}

.bot-message--user {
    align-self: flex-end;
}

.bot-message__bubble {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-line;
}

.bot-message--bot .bot-message__bubble {
    background-color: var(--bot-bg-light);
    color: var(--bot-neutral-dark1-color);
    border: 1px solid var(--bot-border-color);
    border-radius: 13px 13px 13px 2px;
    box-shadow: 0 1px 2px var(--bot-shadow-color-light);
}

.bot-message--user .bot-message__bubble {
    background-color: var(--bot-primary-color);
    color: #ffffff;
    border-radius: 13px 13px 2px 13px;
    box-shadow: 0 1px 2px var(--bot-shadow-color-light);
}

.bot-message__time {
    font-size: 10px;
    color: var(--bot-text-muted);
    margin-top: 3px;
}

.bot-message--bot .bot-message__time {
    align-self: flex-start;
}

.bot-message--user .bot-message__time {
    align-self: flex-end;
}

/* Indicador de digitação */
.bot-typing {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-size: 18px;
    color: #337ab7;
    font-weight: bold;
    letter-spacing: 3px;
    min-width: 52px;
    width: fit-content;
    margin: 0 14px 8px;
    flex-shrink: 0;
}

.bot-container__close {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-size: 16px;
}

    .bot-container__close:hover {
        opacity: 1;
    }

/* Campo de envio */
.bot-send-box {
    flex-shrink: 0;
    -webkit-box-shadow: 0 -1px 12px 0 var(--bot-shadow-color-light2);
    box-shadow: 0 -1px 12px 0 var(--bot-shadow-color-light2);
}

.bot-send-box__main {
    display: flex;
    align-items: center;
    background-color: var(--bot-bg-light);
    min-height: 64px;
    padding: 0 12px;
    border-radius: 0 0 3px 3px;
}

.bot-send-box__input {
    flex: 1;
    outline: none;
    resize: none;
    border: none;
    background: transparent;
    padding: 0 10px 0 2px;
    max-height: 57px;
    font-size: 14px;
    font-weight: 500;
    line-height: 19px;
    font-family: Nunito Sans, sans-serif;
}

    .bot-send-box__input:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

.bot-send-box__button {
    background-color: var(--bot-primary-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

    .bot-send-box__button:hover:not(:disabled) {
        background-color: var(--bot-primary-dark-color);
    }

    .bot-send-box__button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Botão do chat */
.bot-toggle-button {
    position: fixed;
    display: flex;
    height: 56.68px;
    width: 56.68px;
    bottom: 20px;
    right: 20px;
    border: none;
    border-radius: 50%;
    transition: transform 200ms, opacity 500ms, visibility 500ms;
    box-shadow: 0 1px 6px var(--bot-shadow-color-light), 0 2px 32px var(--bot-shadow-color-light);
    cursor: pointer;
    z-index: 1032;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bot-primary-color) !important;
}

    .bot-toggle-button:hover {
        transform: scale(1.05);
        background-color: var(--bot-primary-dark-color);
    }

    .bot-toggle-button:focus {
        outline: none !important;
    }

.bot-toggle-icon {
    position: absolute;
    height: 56.68px;
    width: 56.68px;
    border-radius: 50%;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.bot-toggle-icon-close {
    position: absolute;
    color: white !important;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

/* Estados dos ícones */
.bot-toggle-button.chat-closed .bot-toggle-icon {
    opacity: 1;
    transform: scale(1);
}

.bot-toggle-button.chat-closed .bot-toggle-icon-close {
    opacity: 0;
    transform: scale(0.5);
}

.bot-toggle-button.chat-open .bot-toggle-icon {
    opacity: 0;
    transform: scale(0.5);
}

.bot-toggle-button.chat-open .bot-toggle-icon-close {
    opacity: 1;
    transform: scale(1);
}
