@charset "UFT-8";

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* =============== GLOBAIS =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* =============== PALETA =============== */
    --primary-color: #78C3EB;
    --primary-dark-color: #2F5A70;
    --secondary-color: #EB4D5B;
    --secondary-dark-color: #99696D;

    --unfocus-color: rgb(240, 240, 240);

    /* =============== FONTES =============== */
    --title-font: 'Comic Neue', cursive;
    --text-font: 'Open Sans', Arial, Helvetica, sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em;

    min-height: 100vh;
    background-color: var(--primary-color);

    font-family: var(--text-font);
}



/* =============== MAIN =============== */
main {
    background-color: white;
    padding: clamp(1em, 5%, 5em);

    border-radius: 1em;
    box-shadow: 4px 4px 10px 4px rgba(0, 0, 0, 0.5);
}

/* Título do conversor */
h1 {
    padding: 1em;

    font: normal bold 2em var(--title-font);
    text-align: center;
    color: var(--primary-dark-color);
}

/* ============ SELETOR DE TEMPERATURA ============ */
#tempSelector {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Input do usuário */
#tempSelector > input {
    background-color: var(--unfocus-color);

    height: 2.5em;
    width: max(12em, 70%);

    border-radius: 0.5em;
    border: 0.1em solid var(--primary-dark-color);
    margin-bottom: 0.75em;

    font-weight: bold;
    font-size: 1em;
    text-align: center;
}

#tempSelector > input:focus {
    background-color: white;
}

/* ============ SELETOR DE UNIDADE ============ */
#unitSelector {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5em;

    margin: clamp(0.5em, 5vw, 2em) 0;
}

/* Input do usuário */
#unitSelector select {
    padding: 0.25em;
    cursor: pointer;
    border-color: var(--primary-dark-color);

    font-size: 0.9em;
}

/* Um wrapper para manter o label ao lado do select */
.wrapper {
    display: flex;
    gap: 0.5em;
}

/* ============ ÁREA DE ENVIO ============ */
#submitArea {
    display: flex;
    justify-content: center;

    margin: 1.5em 0;
}

/* Botão de envio */
#submitBtn {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
    font-size: 1em;

    border-radius: 1em;
    border: none;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    padding: 0.5em;

    cursor: pointer;

    transition: 0.2s ease-in-out;
}

#submitBtn:hover {
    background-color: var(--secondary-dark-color);
}

/* ============ ÁREA DE RESULTADO ============ */
#result {
    font-weight: bold;
    font-size: 1.5em;
    text-align: center;
    
    margin-bottom: 1.5em;
}



/* =============== FOOTER =============== */
footer {
    position: relative;
    padding-top: 1em;
}

footer::after {
    content: '';
    position: absolute;
    width: 95%;
    height: 0.1em;
    background-color: lightgray;
    top: 0;
    left: 50%;
    translate: -50%;
}

/* Texto com os créditos */
footer p {
    text-align: center;
    font-size: 0.9em;

    margin-bottom: 0.5em;
}

/* Links */
footer a {
    color: var(--secondary-color);
    font-weight: bold;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark-color);
}