:root {
    --primary: hsl(172, 67%, 45%);
    --very-dark-cyan: hsl(183, 100%, 15%);
    --darker-cyan: hsl(186, 14%, 43%);
    --dark-cyan: hsl(184, 14%, 56%);
    --light-grey-cyan: hsl(185, 41%, 84%);
    --lighter-grey-cyan: hsl(189, 41%, 97%);
    --white: hsl(0, 0%, 100%)
}

body {
    background-color: var(--light-grey-cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    font-family: 'Space Mono', monospace;
}

.form-section {
    padding: 10px;
}

.logo {
    padding: 45px;
}



.calculator {
    background-color: var(--white);
    padding: 25px;
    border: thin var(--white) solid;
    border-radius: 20px;
    max-width: 1080px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    top: 12px;
    left: 20px;
}

.input-with-icon input {
    text-indent: 30px;
}

#tip-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

#tip-options > * {
    box-sizing: border-box;
}

.tip-button, #custom {    
    border-radius: 5px;
}

.tip-button {
    background-color: var(--very-dark-cyan);
    color: var(--white);
    font-weight: 700;
    width: 100%;
    padding: 15px 5px;
    text-align: center;
    text-decoration: none;
}

.tip-button:hover {
    color: var(--very-dark-cyan);
    background-color: var(--light-grey-cyan);
}

.tip-button.selected {
    background-color: var(--primary);
    color: var(--very-dark-cyan);
}

.tip-button, input, #custom {
    font-size: 24px;
}

#bill, .select-tip input, .people input {
    background-color: var(--lighter-grey-cyan);
    border: none;
    color: var(--very-dark-cyan);
    font-weight: 700;
    text-align: right;
    font-size: 24px;
    border-radius: 8px;
    padding: 7px;
    min-width: 0px;
    box-sizing: border-box;
    width: 100%;
}

input {
    outline-color: var(--primary);
}

input:focus {
    border-color: none;
}

form {
    display: flex;
    flex-direction: column;
    row-gap: 1.5em;
}

form label {
    display: inline-block;
    color: var(--darker-cyan);
    font-size: 1em;
    font-weight: 700;
    padding-bottom: 7px;
}

.calculation {
    background-color: var(--very-dark-cyan);
    border-radius: 15px; 
    padding: 25px;
    display: flex;
    flex-direction: column;
    row-gap: 2em;    
    width: 100%;
    box-sizing: border-box;
}

.calculation-container {
    display: flex;
    align-items: center;  
}

.calculation-label {
    flex: 1;
}

.calculation-label > div {
    padding: 3px 0;
}

.calculation-label-white {
    color: var(--white);
    font-weight: 500;
}

.calculation-label-dark {
    color: var(--dark-cyan);
}

.calculation .tip-output {
    color: var(--primary);
    text-align: right;
    background-color: transparent;
    border: none;
    font-weight: 700;
    font-size: 24px;
}

.reset {
    background-color: var(--primary);
    color: var(--very-dark-cyan);
    font-weight: 700;
    width: 100%;
    padding: 15px 5px;
    border-radius: 5px;
    font-size: 24px;
    border: none;
    text-transform: uppercase;
    text-align: center;
    display: block;
}

#people-warning {
    color: red;
    float: right;
}

.people-warning-hide {
    display: none;
}

.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }


@media (min-width: 700px) {
    #tip-options {
        grid-template-columns: 1fr 1fr 1fr;
    }

    form {
        flex-direction: row;
    }

    .inputs {
        max-width: 50%;
        box-sizing: border-box;
    }

    .calculation {
        max-width: 50%; 
              
    }
    
    .reset-container {
        box-sizing: border-box;
        position: relative;
        flex-grow: 4;
    }

    .reset {
        position: absolute;
        bottom: 0;
    }
}