body {
    margin: 0;
    font-size: 16px;
    background-color: hsl(185, 41%, 84%);
}

header {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

p,
label {
    margin: 0;
    font-weight: 700;
    color: hsl(186, 14%, 43%);
}

.space-mono-regular {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-style: normal;
}

.space-mono-bold {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-style: normal;
}

.calculator-container {
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    background-color: hsl(0, 100%, 100%);
}

#form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

input[type="number"] {
    width: 100%;
    padding: 7.5px;
    box-sizing: border-box;
    margin: 5px 0 0 0;
    border: none;
    border-radius: 5px;
    font-size: 24px;
    text-align: right;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    color: hsl(183, 100%, 15%);
    background-color: hsl(189, 47%, 97%);
}

input#bill-input {
    background-image: url("../images/icon-dollar.svg");
}

input#people-input {
    background-image: url("../images/icon-person.svg");
}

input#bill-input,
input#people-input {
    background-repeat: no-repeat;
    background-position: 7.5px 50%;
}

.discount-container {
    width: 100%;
    margin-top: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    grid-gap: 20px;
}

.discount-button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-style: normal;
    font-size: 24px;
    text-align: center;
    color: hsl(0, 100%, 100%);
    background-color: hsl(183, 100%, 15%);
}

.discount-button:hover {
    cursor: pointer;
    background-color: hsl(172, 67%, 45%);
}

#custom-discount {
    color: hsl(186, 14%, 43%);
    background-color: hsl(189, 47%, 97%);
}

.selected-tip {
    color: #000000;
    background-color: hsl(172, 40%, 50%);
}

.label-container {
    display: flex;
    justify-content: space-between;
}

#bill-error-message,
#people-error-message {
    color: hsl(4, 100%, 67%);
    font-weight: 700;
}

.calculator-output {
    width: 100%;
    padding: 25px;
    box-sizing: border-box;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: hsl(183, 100%, 15%);
}

.amount-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tip-amount-container,
.total-amount-container {
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#tip-amount-label,
#total-label {
    color: hsl(0, 100%, 100%);
}

.tip-value-container,
.total-value-container {
    display: flex;
    align-items: center;
    color: hsl(172, 67%, 45%);
}

.tip-value,
.total-value {
    font-size: 36px;
    color: hsl(172, 67%, 45%);
}
span.dollar-sign {
    font-size: 36px;
}

#reset-button {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    border: none;
    border-radius: 5px;
    font-family: "Space Mono", monospace;
    font-size: 24px;
    text-transform: uppercase;
    color: hsl(183, 100%, 15%);
    background-color: hsl(172, 40%, 30%);
}

/* MEDIA QUERIES */

@media screen and (min-width: 860px) {
    html,
    body {
        height: 100%;
    }
    main {
        height: 80%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .calculator-container {
        width: 70%;
        max-width: 940px;
        flex-direction: row;
        border-radius: 25px;
        gap: 40px;
        box-shadow: 5px 15px 20px 10px hsl(172, 32%, 64%);
    }
    .calculator-form,
    .calculator-output {
        width: 50%;
    }
    .calculator-form {
        box-sizing: border-box;
    }
    .calculator-output {
        justify-content: space-between;
    }
    .tip-value,
    .total-value {
        font-size: 24px;
    }
    span.dollar-sign {
        font-size: 24px;
    }
}

@media screen and (min-width: 1280px) {
    #form {
        gap: 50px;
    }
    .discount-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    .tip-value,
    .total-value {
        font-size: 36px;
    }
    span.dollar-sign {
        font-size: 36px;
    }
}
