@import url('https://fonts.googleapis.com/css2?family=Sarvatrik:wght@100..900&display=swap');

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    display: flex;
    font-family: 'Sarvatrik', sans-serif;
    background: #006560;
    color: #fff;
    /* Cor do texto claro */
    width: 100%;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    /* overflow: auto; */
    height: 100%;
}

.gradient {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    height: 75%;
    background: linear-gradient(
    30deg,
    #55965E 10%,
    #3E78AA 50%,
    #55965E 90%
);
    background-size: 120% 100%;   /* aumenta um pouco para evitar cortes */
    background-position: -10px 0; /* move 10px para a esquerda */
    padding-inline: 1%;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

.chat-container {
    position: relative;
    width: 50%;
    height: 100%;
    background: transparent;
}

.chat-header {
    display: flex;
    font-family: 'Sarvatrik', sans-serif;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 5%;
    color: #fff;
    text-align: left;
    font-weight: bold;
    padding-top: 30px;
    padding-bottom: 25px;
    height: 15%;
}

.container-chat {
    display: flex;
    flex-direction: column;
    padding: 10px;
    padding-top: 25px;
    height: 100%;
    background-color: #fff;
    padding-inline: 1%;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    padding-inline: 5%;
    overflow-y: auto;
    overflow-x: hidden;
}

#chat-form {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 5px;
    padding-inline: 5%;
    background: #fff;
    height: 10%;
}

.user-message {
    background-color: #006560;
    color: #fff;
    padding: 20px 10px;
    border-radius: 15px;
    margin-left: 10%;
    align-self: flex-end;
    word-wrap: break-word;
}

.bot-message {
    display: flex;
    flex-direction: column;
    width: fit-content;
    background-color: #F2F2F2;
    color: #006560;
    padding: 15px 10px;
    border-radius: 15px;
    margin-right: 10%;
}

.user-message-audio {
    
    padding: 9px 5px 5px 5px;
    border-radius: 15px;
    margin-left: 10%;
    align-self: flex-end;
    background-color: #F2F2F2;
}

.bot-message-audio {
    display: flex;
    flex-direction: column;
    width: fit-content;
    background-color: #F2F2F2;
    padding: 9px 5px 5px 5px;
    border-radius: 15px;
    margin-right: 10%;
}

.bot-message p {
    word-wrap: break-word;
    color: #006560;
    padding: 0;
    margin: 0;
}

.bot-message-graph {
    width: 100%;
    min-height: 375px;
    /* mínimo de altura */
    padding: 10px;
    /* espaço interno */
    margin-bottom: 50px;
    /* espaço entre mensagens */
    box-sizing: border-box;
    background: linear-gradient(30deg, #55965E 10%, #3E78AA 50%, #55965E 90%);
    ;
    /* opcional, fundo claro */
    border-radius: 10px;
    /* opcional, cantos arredondados */
    position: relative;
    /* necessário para ancorar o botão */
}


.bot-horario {
    display: flex;
    color: #C7C7C7;
    margin-right: 10%;
    text-align: justify;
    align-self: flex-start;
    margin-bottom: 10px;
}

.user-horario {
    display: flex;
    color: #C7C7C7;
    margin-left: 10%;
    text-align: justify;
    align-self: flex-end;
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 3px;
}

.chat-input {
    display: flex;
    flex-grow: 1;
    /* Ocupa o espaço disponível */
    flex-shrink: 0;
    /* Impede que encolha */
    min-width: 0;
    /* Evita que o flex calcule largura mínima muito grande */
    padding: 20px;
    border: none;
    background-color: #F2F2F2;
    /* Cor de fundo */
    font-size: 16px;
    color: #006560;
    border-radius: 15px;
    align-self: center;
    box-sizing: border-box;
    /* Garante cálculo correto do tamanho */
}

.chat-input::placeholder {
    color: #006560;
}

.send-button {
    background-color: #006560;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    align-self: center;

    img {
        object-fit: contain;
        width: 70%;
    }
}

.send-button-animation {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.access-button {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    background-color: #33CC99;
    color: #fff;
    margin-top: 15px;
    padding: 15px;
    width: 60%;
    border-radius: 50px;
    text-decoration: none;
}

.button-headerbar {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: flex-end;
    padding: 0.8rem 1.5rem;
    border: none;
    background: #fff;
    color: #006560;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    align-self: center;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.send-button:disabled,
send-button[disabled] {
    background-color: #A3A3A3;
}

@keyframes wave-animation {

    0%,
    60%,
    100% {
        transform: initial;
    }

    30% {
        transform: translateY(-10px);
        /* Altere o valor para ajustar a altura da onda */
    }
}

@keyframes color-change {

    0%,
    100% {
        background-color: #C7C7C7;
    }

    50% {
        background-color: #A3A3A3;
    }
}

.loading-spinner {
    width: fit-content;
    padding: 25px 10px;
    border-radius: 15px;
    margin-bottom: 10px;
    margin-right: 10%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: #F2F2F2;
    gap: 5px;
}

.loading-spinner p {
    margin: 0 10px;
    color: #006560;
    font-style: italic;
}

.loading-spinner div {
    width: 8px;
    height: 8px;
    background-color: #C7C7C7;
    border-radius: 50%;
    animation: wave-animation 1.5s linear infinite, color-change 1.5s linear infinite;
}

.loading-spinner div:nth-child(1) {
    animation-delay: 0.2s;
}

.loading-spinner div:nth-child(2) {
    animation-delay: 0.4s;
}

.loading-spinner div:nth-child(3) {
    animation-delay: 0.6s;
}


/* Estilizar a barra de rolagem */
::-webkit-scrollbar {
    width: 5px;
    /* Largura da barra de rolagem vertical */
}

/* Estilizar a trilha da barra de rolagem */
::-webkit-scrollbar-track {
    background: #fff;
}

/* Estilizar o polegar (a parte que você arrasta) */
::-webkit-scrollbar-thumb {
    background: linear-gradient(#55965E, #3E78AA);
}

/* Estilizar o botão de seta (geralmente na parte superior e inferior) */
::-webkit-scrollbar-button {
    background: #fff;
}

/* Estilizar o canto da barra de rolagem (quando as barras estão visíveis) */
::-webkit-scrollbar-corner {
    background: #fff;
}

/* Estilizar o marcador de redimensionamento da barra de rolagem (quando aplicável) */
send-button ::-webkit-resizer {
    background: #fff;
}

@media (max-width: 1000px) {
    .chat-container {
        width: 90%;
    }

    .access-button {
        width: 70%;
    }
}

.fab {
    background-color: #006560;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 100%;
    font-size: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    align-self: center;
}

.menu-opcoes {
    position: absolute;
    bottom: 100px;
    left: 30px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 8;
}

.menu-opcoes button {
    background: white;
    color: #006560;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.lang-selector {
    position: relative;
    top: auto;
    left: auto;
    color: #006560;
    background: white;
    border-radius: 5px;
    padding: 5px 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    outline: none;
}

.lang-selector select {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #006560;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.bot-tools {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    margin-left: 4px;
}

.bot-tools button {
    background: none;
    border: none;
    color: #C7C7C7;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-tools button:hover {
    color: #006560;
    transform: scale(1.15);
}

.bot-tools svg {
    width: 18px;
    height: 18px;
}

#modeToggle:hover {
filter: brightness(1.1);
box-shadow: 0 0 6px rgba(51, 204, 153, 0.3);
}

#modeToggle:active {
transform: scale(0.9);
}

.audio-action-btn {
    position: absolute;
    top: 3px;
    right: 4px;
    background: rgba(0,0,0,0.01);
    border: none;
    color: white;
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
}

.audio-action-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.55);
}


