* {
    --accent-col: #0dab07;
    --bg-col: hsl(0, 0%, 95%);
    --bg-accent:  hsl(118, 92%, 35%);
    box-sizing: border-box;
    font-family: Quicksand, sans-serif;
}

body {
    margin: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header {
    width: 100%;
    display: flex;
    justify-content:space-around;
    align-items: center;
    margin-bottom: 3rem;
    padding-block: 1rem;
    color:white;
    font-size: 2rem;
    font-weight: 100;
    text-align: center;
    background: #14b50e;
    background: linear-gradient(90deg, rgba(7, 125, 2, 1) 0%, hsl(118, 86%, 33%) 50%, rgba(7, 125, 2, 1) 100%);
    box-shadow: 0px 4px 4px 0px hsl(0, 0%, 75%);
}

header h1 {
    padding: 0;
    margin: 0;
}

header img {
    height: 8rem;
    opacity: 30%;
}

.container {
    position: relative;
    width: min(30rem, 95dvw);
    min-height: 37rem;
    background-color: var(--bg-col);
    border-radius: 1rem;
    border: 1px solid var(--accent-col);
    padding: 1rem;
    box-shadow: 2px 5px 10px 0px hsl(0, 0%, 75%);
    z-index: 1;
    overflow: hidden;
}

#menuheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 2rem;
}

#menu-title {
    position: relative;
    width: 100%;
    height: 2rem;
    overflow: hidden;
}

#menu-title h2 {
    position: absolute;
    width: 100%;
    text-align: center;
    margin: 0;
    top: 0;
    left: 0;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(.54,-0.29,.45,1.25), opacity 0.5s ease, visibility 0.5s ease;
    z-index: 0;
}

.menu-page {
    position: absolute;
    top: 2.75rem;
    left: 0;
    width: 100%;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(.54,-0.29,.45,1.25), opacity 0.5s ease, visibility 0.5s ease;
    z-index: 0;
}

.menu-page.show {
    visibility: visible;
    transform: translateX(0);
    opacity: 1;
    z-index: 1;
}

#menu-title h2.show {
    opacity: 1;
    z-index: 1;
} 

.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}

.slide-in-left {
    transform: translateX(-100%);
}

.slide-in-right {
    transform: translateX(100%);
}

.slide-in-left.show,
.slide-in-right.show {
    transform: translateX(0);
}

#left-arrow, #right-arrow {
    cursor: pointer;
}

#left-arrow.disabled, #right-arrow.disabled {
    opacity: .3;
    cursor: default;
    pointer-events: none;
}

#left-arrow img, #right-arrow img {
    height: 1.5rem;
}


.grid {
    width: 100%;
    display: grid;
    align-items: center;
    grid-template-columns: 1.75fr 1fr 1fr 1fr;
    gap: .5rem;
    margin-block: .5rem;
}

.grid.header div{
    text-align: center;
    font-weight: bold;
    padding-bottom: .75rem;
}

.grid.header div:first-of-type {
    text-align: left;
}

.grid.row div:nth-of-type(2) {
    text-align: center;
    padding: .4rem;
    border-radius: .3rem;
    background-color: var(--bg-accent);
    color:white;
}

.grid.row div:nth-of-type(3) {
    text-align: center;
    padding: 0;
    border-radius: .3rem;
}

.grid.row div:nth-of-type(4), .bg-white {
    text-align: center;
    padding: 0.4rem;
    border-radius: .3rem;
    border:1px solid hsl(0, 0%, 90%);
    background-color: white;
}

.grid.summary {
    margin-top: 1rem;
    font-size: .8rem;
}

.grid.full {
    display: grid;
    grid-template-columns: 1fr;
}

#page-2 {
    padding-top: 1rem;
    text-align: justify;
    font-size: .9rem;
}


h3 {
    font-size: 1rem;
    margin-bottom: .5rem;
}

input[type=number] {
    width: 100%;
    padding: 0.4rem;
    border: none;
    border-radius: .3rem;
    text-align: right;
    font-size: 1rem;
    outline: solid 1px hsl(0, 0%, 90%);
}

input[type="number"]:hover, input[type="number"]:focus {
    outline: 1px solid var(--accent-col);
}

input[type="number"]:hover.invalid-input, input[type="number"]:focus.invalid-input {
    outline: 1px solid #cc0505;
}

input[type="number"].invalid-input {
    border: 1px solid #cc0505;
}

select {
    border: none;
    border-radius: .3rem;
    outline: solid 1px hsl(0, 0%, 90%);
    padding: .5rem;
}

select#activity {
    width: 100%;
}

select:hover, select:focus {
    outline: solid 1px var(--accent-col);
}

select:open::picker-icon {
    rotate: 180deg;
}

.col-3 {
    grid-template-columns: 1fr 1fr 1fr;
    width: 80%;
}

.col-2 {
    grid-template-columns: 1fr 2fr;
    width: 80%;
    gap: .25rem;
}

.col-1 {
    grid-column: 1 / 4;
}

hr {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: none;
    height: 1px;
    background-color: var(--accent-col);
}

.small {
    line-height: .5rem;
    font-size: .75rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

#page-2 .small {
    margin-top: .25rem;
    line-height: .9rem;
    font-size: .75rem;
}

.metrics {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metrics div:first-of-type {
    margin-bottom: .5rem;
    font-style: italic;
}

.bmibmr {
    display: grid;
    width: 100%;
    grid-template-columns: 1.75fr 1fr 1fr;
    align-items: center;
    row-gap: 0;
    column-gap: .5rem;
    padding-inline: 1rem;
}

#bmi-summary {
    font-size: .75rem;
}

.center {
    text-align: center;
}

button {
    border: none;
    border-radius: .5rem;
    background: #14b50e;
    background: linear-gradient(90deg, rgba(7, 125, 2, 1) 0%, hsl(118, 86%, 33%) 50%, rgba(7, 125, 2, 1) 100%);
    margin-top: .5rem;
    padding: .75rem;
    font-size: 1rem;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: all .2s;
}

button:hover {
    background: linear-gradient(90deg, hsl(118, 97%, 30%) 0%, hsl(118, 86%, 33%) 50%, hsl(118, 97%, 30%) 100%);
}

.total {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1rem;
    height: 2rem;
}

.grid.row.total div:nth-of-type(2) {
    background-color: var(--bg-col);
}

#sum-minutes {
    text-align: right;
    padding: 0.4rem;
    padding-right: 1.25rem;
    background-color: white;
    border-radius: .3rem;
    border:1px solid hsl(0, 0%, 90%);
}

footer {
    position: fixed;
    bottom: 2rem;
    right: 3rem;
    width: 100%;
    text-align: right;
    font-size: 1rem;
    color: black;
    opacity: 60%;
    z-index: 0;
}

@media screen and (max-width: 880px) {
    h1 {
        font-size: 2.5rem;
    }

    #page-2 {
        min-height: fit-content;
    }

    header {
        margin-bottom: 1.5rem;
    }
    header img {
        height: 5rem;
    }

    footer {
        padding-top: 1rem;
    }
}

@media screen and (max-width: 510px) {
    h1 {
        font-size: 2rem;
    }

    header {
        margin-bottom: 1rem;
    }
    header img {
        height: 4rem;
    }

    .menu-page {
        padding: 1rem;
    }

    footer {
        padding-top: 1rem;
    }
}