@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    font-display: swap;
}

:root {
    --black: #000;
    --white: #fff;
    --darkblue: #1D2937;
    --green: green;
    --cinza: rgb(216, 216, 216);
    --purple: #a03aff;
}

html {
    scroll-behavior: smooth;
}

/* container */
div.chatbot {
    position: fixed;
    right: 50px;
    bottom: 100px;
    width: 25rem;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 15px;
    color: var(--white);
    background-color: var(--white);
    box-shadow: 0 0 128px 0 rgba(0,0,0,0.1),
                0 32px 64px -48px rgba(0,0,0,0.5);
    transform: scale(0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

/* Animação suave */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* título */
div.chatbot header {
    position: relative;
}
div.chatbot header span.chatbot-title-closed {
    position: absolute;
    right: 20px;
    top: 50%;
    color: var(--white);
    cursor: pointer;
    display: none;
    transform: translateY(-50%);
}
h3.chatbot-title {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--black);
    padding: 1rem 0;
    border-radius: 15px 15px 0 0;
    font-size: 1.2rem;
}

/* subtítulo */
span.chatbot-subtitle {
    display: flex;
    justify-content: center;
    margin: 1rem;
    font-size: 0.8rem;
    text-align: center;
}
/* imagem logo */
.chatbox-chat.bot img.chatbot-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Deixa a logo circular, se desejar */
    object-fit: cover;
    flex-shrink: 0;
}
/* mensagens */
div.chatbot .chatbox {
    padding: 30px 20px 100px;
    height: 25rem;
    overflow-y: auto;
}

li.chatbox-chat {
    display: flex;
    gap: 10px;
}

li.chatbox-chat.bot {
    margin-bottom: 15px;
    max-width: 100%;
}

li.chatbox-chat p {
    max-width: 75%;
    white-space: pre-wrap;
    background-color: var(--cinza);
    color: var(--black);
    font-size: 0.9rem;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.3s ease-in-out;
}

li.chatbox-chat.respbot {
    justify-content: flex-end;
    margin: 15px 0;
}

li.chatbox-chat.respbot p {
    color: var(--white);
    background-color: var(--black);
    border-radius: 10px 10px 10px 0;
}

.chatbot .chatbox-input {
    display: flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--white);
    padding: 10px;
    border-top: 2px solid #ccc;
    border-radius: 0 0 10px 10px;
}

.chatbox-input textarea {
    flex-grow: 1;
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.9rem;
    resize: none;
    padding: 16px 15px 16px 0;
}

.chatbox-input span {
    cursor: pointer;
    font-size: 2rem;
    color: var(--black);
    line-height: 50px;
    height: 60px;
    align-self: flex-end;
    visibility: hidden;
}

.chatbox-input textarea:valid ~ span {
    visibility: visible;
}

.chatbot-button {
    position: fixed;
    right: 40px;
    bottom: 35px;
    height: 50px;
    width: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    background-color: var(--black);
    color: var(--white);
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.chatbot-button:hover {
    background-color: var(--darkblue);
    transform: scale(1.1);
}

.chatbot-button span {
    position: absolute;
}

.show-chatbot .chatbot {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    pointer-events: auto;
}

.show-chatbot .chatbot-button span:first-child,
.chatbot-button span:last-child {
    opacity: 0;
}

.show-chatbot .chatbot-button span:last-child {
    opacity: 1;
}

@media (max-width: 768px) {
    div.chatbot {
        right: 10px;
        bottom: 80px;
        width: 90%;
    }
}

@media (max-width: 480px) {
    div.chatbot {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    div.chatbot .chatbox {
        height: 90%;
    }
    div.chatbot header span.chatbot-title-closed {
        display: block;
    }
    h3.chatbot-title {
        font-size: 0.9rem;
    }
    .chatbot-input textarea {
        font-size: 0.8rem;
    }
    .opcao {
        font-size: 0.8rem;
    }
    .opcoes {
        flex-direction: row;
        gap: 5px;
    }
}

.chatbox-chat.bot p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.opcoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.opcao {
    padding: 10px 15px;
    background-color: var(--black);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.opcao:hover {
    background-color: var(--darkblue);
    transform: scale(1.05);
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.slider {
    width: 80%;
    margin: 10px 0;
}

.slider-value {
    font-size: 1.2rem;
    color: var(--black);
    font-weight: 600;
    text-shadow: 0 0 2px #fff;
}

button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--black);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: var(--green);
}


/* .respbot {
  align-self: flex-start;
  background-color: #e0e0e0;
  color: #333;
  border-radius: 20px 20px 20px 0;
  padding: 10px;
  margin: 5px;
  max-width: 80%;
  position: relative;
}
.user {
  align-self: flex-end;
  background-color: #d1f2c4;
  color: #333;
  border-radius: 20px 20px 0 20px;
  padding: 10px;
  margin: 5px;
  max-width: 80%;
} */

