/* Reset de margens e preenchimento */
html, body {
    margin: 0;
    padding: 0;
}

/* Estilo geral do corpo da página */
body {
    margin: 20px;
    font-family: "Times New Roman", serif;
    font-size: 16px;
    background: linear-gradient(45deg, #000000, #ebebeb);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Título principal */
#titulo {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    font-family: "Times New Roman", serif;
    font-size: 24px;
    color: white;
    background-color: rgb(136, 9, 9);
    border: 5px solid white;
    border-radius: 10px;
}

/* Container principal para formulário e botões */
.container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

/* Estilo do formulário */
.formulario {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 400px;
    min-height: 370px;
    padding: 20px;
    background-color: #ddd;
    border: 2px solid rgb(146, 146, 146);
    border-radius: 5px;
    box-sizing: border-box;
}

/* Formatação das labels dentro do formulário */
.formulario label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

/* Estilo da mensagem de erro abaixo do formulário */
#mensagemFormulario {
    margin-top: 10px;
    font-weight: bold;
}

/* Estilo padrão para campos de entrada (input) */
.input {
    width: 100%;
    padding: 5px;
    border: 1px solid #2b2b2b;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Foco normal no campo de entrada */
input:focus {
    outline: none;
    border: 2px solid black;
}

/* Foco com erro no campo de entrada (modificado via JavaScript) */
input.erro:focus {
    outline: none;
    border: 2px solid darkred;
    background-color: #fdd;
}

/* Área dos botões */
.botoes {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    min-width: 200px;
}

/* Estilo dos botões */
.btn {
    padding: 10px;
    font-family: "Times New Roman", serif;
    font-size: 16px;
    font-weight: bold;
    color: black;
    background-color: white;
    border: 1px solid black;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
}

/* Efeito hover no botão */
.btn:hover {
    background-color: #ccc;
}

/* Área de informações que pode ser exibida/ocultada */
.infos {
    display: none;
    position: relative;
    width: 400px;
    min-height: 50px;
    max-height: 370px;
    padding: 20px;
    overflow-y: auto;
    background-color: #ddd;
    border: 2px solid rgb(146, 146, 146);
    border-radius: 5px;
    box-sizing: border-box;
}

/* Botão para fechar a área de informações (inicialmente oculto) */
#fechar-btn {
    display: none;
}

/* -----------------------------------
   ESTILO PARA CELULARES (TELAS PEQUENAS)
------------------------------------- */
@media (max-width: 600px) {

    /* Ajustes no container principal */
    .container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        margin-top: 20px;
    }

    /* Formulário e área de informações se ajustam para telas pequenas */
    .formulario,
    .infos {
        width: 90%;
        max-width: 400px;
        min-width: auto;
        padding: 20px;
        box-sizing: border-box; /* Garante que padding/border não quebrem o layout */
    }

    /* Ajustes na área de botões */
    .botoes {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 90%;
    }

    /* Título menor para telas pequenas */
    #titulo {
        font-size: 22px;
        padding: 10px;
    }

    /* Botões maiores para toque em celulares */
    .btn {
        width: 70%;
        padding: 12px;
        font-family: "Times New Roman", serif;
    }
}