:root {
    --dark-cyan: hsl(183, 100%, 15%);
    --strong-cyan: hsl(172, 67%, 45%);
    --grayish-cyan-dark: hsl(186, 14%, 43%);
    --grayish-cyan: hsl(184, 14%, 56%);
    --grayish-cyan-bg: hsl(185, 41%, 84%);
    --grayish-cyan-light: hsl(189, 41%, 93%);
    --white: hsl(0, 0%, 100%);
    --red: #ff947b;
}

*,
html {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: "Space Mono", monospace;
}

body {
    background-color: var(--grayish-cyan-bg);
    max-width: 100vw;
    min-height: 100vh;
    display: grid;
    place-content: center;
}

div.logo {
    margin: 2.5rem 0px;
    text-align: center;
}

main {
    width: 100%;
    min-width: 23.63rem;
    max-width: 23.63rem;
    padding: 1.9rem;
    margin: 0 auto;
    border-radius: 1.4rem;
    background-color: var(--white);
}

main form {}

main form label,
main form legend {
    display: block;
    font-weight: 700;
    color: var(--grayish-cyan-dark);
}

main form input[inputmode="number"] {
    width: 100%;
    text-align: right;
    font-size: 1.5rem;
    border: 2px solid var(--grayish-cyan-light);
    color: var(--dark-cyan);
    font-weight: 700;
    background-color: var(--grayish-cyan-light);
    outline-color: var(--strong-cyan);
    border-radius: .25rem;
    background-image: url(images/icon-dollar.svg);
    background-repeat: no-repeat;
    background-position: 1rem center;
    margin-top: .3rem;
    padding-right: .5rem;
    padding-left: 2.5rem;
}

main form input[inputmode="number"]::placeholder {
    color: #9db7b6;
    font-weight: 400;
}

main form input[inputmode="number"]:nth-of-type(1) {
    margin-bottom: 2rem
}

main form input[inputmode="number"]:nth-of-type(2) {
    background-image: url(images/icon-person.svg);
}

main form input[inputmode="number"]:invalid {
    border-color: var(--red);
    outline-color: var(--red);
}

main form fieldset {
    border: none
}

main form fieldset > input[type="radio"] {
    position: fixed;
    width: 0px;
    height: 0px;
    opacity: 1;
}

main form fieldset > label {
    display: inline-block;
    width: 9.5rem;
    padding: .4rem 0;
    margin: .35rem 0;
    border-radius: .4rem;
    text-align: center;
    background-color: var(--dark-cyan);
    color: var(--grayish-cyan-light);
    font-size: 1.5rem;
    cursor: pointer;

}

label:hover {
    opacity: .8;
}

main form fieldset > legend {
    margin-bottom: 1rem
}

main form fieldset > input[type="radio"]:focus + label,
main form fieldset > input[type="radio"]:checked + label {
    background-color: var(--strong-cyan);
    color: var(--dark-cyan);
}

main form fieldset > input[name="custom"] {
    width: 9.5rem;
    font-size: 1.3rem;
    text-align: center;
    padding: .25rem 1.8rem;
    border-radius: .4rem;
    border: 2px solid var(--grayish-cyan-light);
    color: var(--dark-cyan);
    font-weight: 700;
    cursor: pointer;
    background-color: var(--grayish-cyan-light);
    background-image: url(images/%25.svg);
    background-repeat: no-repeat;
    background-position: 7.2rem center;
    background-size: 35px 35px;
    outline-color: var(--strong-cyan);
}

main form fieldset > input[name="custom"]::placeholder {
    color: #465c5a;
    font-weight: 700;
}

main form label[for="num-people"] {
    position: relative;
    margin-top: 1.55rem;
}

main form label[for="num-people"] > span {
    position: absolute;
    right: 15px;
    color: var(--red);
    opacity: 0;
    display: none;
}

section#output {
    margin-top: 2.2rem;
    padding: .8rem 1.5rem 1.5rem;
    background: var(--dark-cyan);
    color: cyan;
    border-radius: 1rem;
}

section#output div.value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.9rem 0 0;
}

section#output div.value div.label {
    color: var(--white);
    font-weight: 600;
}

section#output div.value div.label > span {
    font-size: .8rem;
    color: var(--grayish-cyan);
    font-weight: 400;
}

section#output div.value div.number {
    font-size: 2rem;
    color: var(--strong-cyan);
    font-weight: 700;
}

section#output button {
    width: 100%;
    border-radius: .4rem;
    padding: .25rem 0;
    margin: 2.5rem 0 0;
    cursor: pointer;
    outline-color: #4dbfb1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-cyan);
    background-color: var(--strong-cyan);
    border: 2px solid var(--strong-cyan);
    text-transform: uppercase;
}

section#output button:hover {
    background-color: #9fe8df;
    border-color: #9fe8df;
}

section#output button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

section#output button:disabled:hover {
    background-color: var(--strong-cyan);
    border: 2px solid var(--strong-cyan);
}

@media (min-width: 1150px) {
    main {
        max-width: 60rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        place-content: center;
        column-gap: 1rem;
    }

    section#input {
        width: 95%
    }

    section#output {
        /*        width: 95%;*/
        margin-top: 0;
    }

    main form fieldset > label,
    main form fieldset > input[name="custom"] {
        width: 8rem;
    }
    
    main form fieldset > input[name="custom"] {
        font-size: 1rem;
        padding: .658rem 1.5rem;
        background-position: 5.7rem center;
        background-size: 30px 30px;

    }
    
    section#output button {
        margin: 7rem 0 0;
    }
    
    section#output div.value div.number {
        font-size: 2.5rem;
    }
}


.attribution {
    margin: 1.5rem 0;
    font-size: .8rem;
    text-align: center;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}
