@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --accent-color: #D71059;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

input::placeholder, textarea::placeholder {
    font-family: 'Raleway', sans-serif;
}

.chat-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.chat-header {
    background-color: var(--accent-color);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Impede que o header diminua */
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: height 0.3s ease; /* Adiciona uma transição suave */
}

.chat-message {
    max-width: 70%;
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

.chat-message.bot {
    background: #e1e1e1;
    align-self: flex-start;
}

.chat-message.user {
    background: var(--accent-color);
    color: white;
    align-self: flex-end;
}

.chat-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000; /* Garante que o formulário fique acima de outros elementos */
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-form input, .chat-form textarea, .chat-form select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 16px; /* Evita zoom no mobile */
}

.chat-form textarea {
    resize: none;
}

.send-button {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.send-button:hover {
    background: var(--accent-color);
}

.hidden {
    display: none;
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-bottom: 5px;
    display: none;
}

.styled-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: #fff;
    appearance: none; /* Remove o estilo padrão do select */
    -webkit-appearance: none; /* Remove o estilo padrão no Safari */
    -moz-appearance: none; /* Remove o estilo padrão no Firefox */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Ícone de seta */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.styled-select:focus {
    border-color: #007bff;
    outline: none;
}

/* Ajustes para mobile */
@media (max-width: 480px) {
    .chat-box {
        height: 50vh; /* Define a altura do chat como 50% da tela */
    }

    .chat-form {
        padding: 8px;
    }

    .chat-form input, .chat-form textarea, .chat-form select {
        padding: 8px;
    }

    .send-button {
        width: 36px;
        height: 36px;
    }
}