@charset "UTF-8";

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

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

:root {
    /* ================== FONTES ================== */
    --main-font: normal normal 1em "Open Sans", Arial, sans-serif;
    --numbers-font: normal normal 1.2em "Oxanium", Arial, sans-serif;

    /* ================== CORES ================== */
    --primary-color-dark: #7787a8;
    --primary-color: #9aafd8;
    --primary-color-light1: #d5e2fd;
    --primary-color-light2: #d5f1ff;
    --secondary-color: #ea715f;
    --secondary-color-light: #fab3a8;
    --tertiary-color: #ebcc78;
    --tertiary-color-light: #f0deac;

    --white: #f2f2f2;

    /* ================== TRANSITIONS ================== */
    --btn-transition: background-color 0.2s ease-in-out;
}

body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    font: var(--main-font);
}


/* ================== HEADER ================== */
header {
    padding: 1em;
}

h1 {
    text-align: center;
    font-size: 1.5em;
}


/* ================== MAIN ================== */
main {
    display: grid;
    place-items: center center;
    padding: 0.5em;
}


/* ================== CALCULADORA ================== */
#calculator {
    position: relative;
    margin: 1em 0;
    display: grid;
    place-items: center;
}

/* =========== COROA =========== */
#crown {
    height: auto;
    width: auto;
}

/* Parte de baixo */
#bottom {
    width: 100%;
}

#strip {
    height: 10px;
    background-color: var(--tertiary-color);
}

#base {
    height: 7.5px;
    background-color: var(--secondary-color);
}

/* Parte de cima */
#top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

#triangleLeft {
    width: 0;
    height: 0;
    border-bottom: 40px solid var(--secondary-color);
    border-right: 40px solid transparent;
}

#triangleMid {
    width: 0;
    height: 0;
    border-bottom: 40px solid var(--secondary-color);
    border-right: 20px solid transparent;
    border-left: 20px solid transparent;
}

#triangleRight {
    width: 0;
    height: 0;
    border-bottom: 40px solid var(--secondary-color);
    border-left: 40px solid transparent;
}


/* =========== BOTÕES E VISOR =========== */
#calculatorWrapper {
    display: grid;
    gap: 1em;
    padding: 2em;
    background-color: var(--primary-color);
    border-radius: 2em;
    box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.2);
}

/* Visor */
input {
    height: 50px;
    width: 100%;
    padding: 0.5em;
    font: var(--numbers-font);
    text-align: right;
    border-radius: 1em;
    border: 1px solid black;
    cursor: auto;
}

/* Área dos botões */
#btnArea {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
}

button {
    padding: 0.75em;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: solid transparent;
    font: var(--numbers-font);
    cursor: pointer;
    transition: var(--btn-transition);
}

button:active {
    border: 0.15em solid var(--primary-color);
}

button.inputs{
    background-color: var(--primary-color-light1);
}

button.operators {
    background-color: var(--primary-color-light2);
}

button.utils {
    background-color: var(--secondary-color-light);
}

button#equalBtn {
    background-color: var(--tertiary-color);
}

button.inputs:hover, button.operators:hover {
    background-color: var(--white);
}

button.utils:hover {
    background-color: var(--tertiary-color-light);
}

button#equalBtn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}


/* ================== FOOTER ================== */
footer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    gap: 2em;
    padding: 3.5em 2em 2em 2em;
    font-size: 1.1em;
    text-align: left;
}

footer h2 {
    font-weight: 500;
    font-size: 1.2em;
}

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

a:hover {
    color: var(--tertiary-color);
    text-decoration: underline;
}