body {
    background: url(../images/graph-paper.png) center/40%;
    font-family: 'Space Mono', monospace;
}

h1,
p {
    margin-block-end: 0;
    margin-block-start: 0;
}

/* Flexbox */

.bill,
.buttons,
.calculator,
header,
.input-div,
.people,
.result-div,
.total-div,
.totals {
    display: flex;
}

.bill,
.input-div,
.people,
.result-div,
.totals {
    flex-direction: column;
}

/* Colours */

/* Green */

.percent-button,
.reset {
    background-color: #F5907B;
    box-shadow:  2px 2px 0px 1px #000000;

}

/* Yellow */

.custom-input,
.custom-input::placeholder,
.per-person,
.input,
.input::placeholder {
    color: #FBF0C4;
}

.input-div,
.result-div {
    background: #FBF0C4;
}

/* Red */

.percent-button:focus-visible,
.reset:active,
.reset:focus-visible {
    background: #F5907B;
}

/* Black */

.percent-button,
.reset {
    color: #000;
}

.custom-input,
.input,
.totals {
    background-color: #000;
}

/* Font Sizes */

.bill,
.input-label,
.people,
.reset,
.total {
    font-size: 16px;
    font-size: 1rem;
}

.attribution,
.error-message {
    font-size: 12px;
    font-size: 0.75rem;
}

.bill,
.buttons {
    margin-bottom: 3%;
}

.percent-button,
.reset {
    border-radius: 5px;
}

.main-heading {
    font-size: 48px;
    font-size: 3rem;
    padding: 2%;
}

.main-heading-desc {
    display: block;
    font-size: 28px;
    font-size: 1.75rem;
    font-weight: 300;
}

.calculator {
    align-items: center;
    background: url(../images/calculator.png) center/contain no-repeat;
    justify-content: space-evenly;
    margin: 5% auto;
    /* padding: 3%; */
    width: 865px;
    height: 400px;
}

/* Input Div */

.input-div {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 1.5%;
    width: 40%;
}

.input {
    border: 2px solid transparent;
    box-shadow: inset 1px 1px 0px 1px #D9D9D9, inset -1px -1px 0px 1px #A6A6A6;   
    padding: 2%;
    text-align: end;
    appearance: none;
    -webkit-appearance: none;
}

.input::placeholder {
    font-size: 20px;
    font-size: 1.25rem;
    margin-right: 10px;
}

.input:focus-visible {
    outline: 3px solid #000;
}

input:focus-visible::-webkit-input-placeholder {
    color: transparent;
}

.input-label {
    margin-bottom: 1%;
}

.buttons {
    align-items: center;
    flex-wrap: wrap;
    height: 60px;
    justify-content: space-between;
}

.percent-button {
    border: 2px solid #000;
    margin-bottom: 2%;
    padding: 2px;
    width: 30%;
}

.percent-button:focus-visible {
    background-color: #A3CCE7;
    border-radius: 20px;
    outline: 1px solid #000;
}

.custom-input {
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0px 1px #D9D9D9, inset -1px -1px 0px 1px #A6A6A6; 
    margin-bottom: 2%;  
    padding: 3px;
    text-align: center;
    width: 28%;
}

.custom-input:focus-visible {
    border-radius: 20px;
    outline: 1px solid #000;
}

/* Result Div */

.result-div {
    align-items: center;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 3.2% 0;
    width: 40%;
}

.totals {
    border: 1px solid #000;
    box-shadow: inset 2px 2px 0px 2px #D9D9D9, inset -2px -2px 0px 2px #A6A6A6;   
    padding: 6% 0;
    width: 90%;
}

.total-div {
    align-items: center;
    justify-content: center;
}

.total {
    color: #fff;
}

.first-total {
    margin-bottom: 5%;
}

.person {
    color: #A6BABC;
    display: block;
}

.reset {
    border: 2px solid #000;
    margin: 5% 0 0 0;
    padding: 5px;
    width: 90%;
}

.reset:focus-visible {
    background: #A3CCE7;
    outline: 1px solid #000;
    text-decoration: underline;
    text-decoration-thickness: 0.2em;
}

.per-person {
    font-size: 24px;
    font-size: 1.5rem;
    width: 50%;
    text-align: right;
}

.error-message {
    color: red;
    display: block;
    margin-top: 10px;
}

.hide {
    display: none;
}

.attribution {
    text-align: center;
}

/* Media Queries ///////////////////////////////////////////////////////////////////////////////////*/


/* Hover Styles */

@media (hover:hover) and (pointer:fine) {

    .input:hover {
        cursor: pointer;
        outline: 2px solid #000;
    }

    .percent-button:hover {
        background-color: #A3CCE7;
        border-radius: 20px;
        outline: 1px solid #000;
    }

    .custom-input:hover {
        border-radius: 20px;
        outline: solid 2px #000;
    }

    .reset:hover {
        cursor: pointer;
        background: #A3CCE7;
        color: #000;
        text-decoration: underline;
        text-decoration-thickness: 0.2em;
    }

}

/* Tablet */

@media only screen and (max-width:1180px) {

    /* Font Sizes */

    .input-label,
    .percent-button,
    .reset,
    .total {
        font-size: 20px;
        font-size: 1.25rem;
    }

    .custom-input,
    .input::placeholder {
        font-size: 24px;
        font-size: 1.5rem;
    }

    .bill,
    .buttons {
        margin-bottom: 5%;
    }

    header {
        padding: 5%;
    }

    .main-heading {
        margin: 0 auto;
        padding: 2%;
        text-align: center;
    }

    .logo {
        width: 20%;
    }

    .calculator {
        background: url(../images/calculator-mobile.png) center/contain no-repeat;
        flex-direction: column;
        height: auto;
        margin: 0 auto 10%;
        width: 100%;
    }

    .input-div {
        border: none;
        border-radius: 0;
        margin: 12% auto 2%;
        padding: 0;
    }

    .result-div {
        border: none;
        border-radius: 0;
        margin: 0 auto 15%;
        padding: 0;
    }

    .input-label {
        margin-bottom: 3%;
        text-align: center;
    }

    .input {
        padding: 10px;
    }

    .buttons {
        height: auto;
    }

    .custom-input {
        margin-bottom: 3%;
        padding: 1% 2.5%;
        width: 40%;
    }

    .people {
        margin-bottom: 0;
    }

    .percent-button {
        margin-bottom: 3%;
        padding: 2%;
        width: 45%;
    }

    .totals {
        margin: 0;
        padding: 5% 2%;
        width: 98%;
    }

    .total-div {
        justify-content: space-evenly;
    }

    .per-person {
        font-size: 32px;
        font-size: 2rem;
    }

    .reset {
        margin: 5% auto;
        padding: 2% 5%;
        width: 100%;
    }

    /* Phone */

    @media only screen and (max-width:688px) {

        /* Font Sizes */

        .custom-input,
        .input,
        .input-label,
        .input::placeholder,
        .percent-button,
        .reset,
        .total {
            font-size: 16px;
            font-size: 1rem;
        }

        .main-heading {
            font-size: 32px;
            font-size: 2rem;
            padding: 7%;
        }

        .main-heading-desc {
            font-size: 20px;
            font-size: 1.25rem;
        }

        body {
            background: #fff;
        }

        .logo {
            width: 25%;
        }

        .calculator {
            margin: 0 auto 10%;
        }

        .input-div {
            margin: 23% auto 5%;
            width: 65%;
        }

        .result-div {
            margin: 0 auto 30%;
            width: 65%;
        }

        .bill {
            margin-bottom: 5%;
        }

        .percent-button {
            padding: 2%;
        }

        .custom-input {
            padding: 4px 2px;
            width: 45%;
        }

        .people,
        .total-div {
            margin-bottom: 0;
        }

        .input {
            padding: 2px;
        }

        .totals {
            box-shadow: inset 1px 1px 0px 1px #D9D9D9, inset -1px -1px 0px 1px #A6A6A6;   
        }

        .first-total {
            margin-bottom: 5%;
        }

        .per-person {
            font-size: 20px;
            font-size: 1.25rem;
        }

        .reset {
            padding: 1% 5%;
        }

    }
}
