@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Manrope:wght@200..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body {
    font-family: "Space Mono";
    background-color: hsl(185, 41%, 84%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

h1 {
    color: hsl(172, 67%, 45%);
}

/* buttons */
button {
    font-family: "Space Mono";
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 0.3125rem;
}

button:hover {
    background-color: hsl(185, 41%, 84%);
    color: hsl(183, 100%, 15%);
}

.tip-btn {
    background-color: hsl(183, 100%, 15%);
    color: hsl(0, 0%, 100%);
    padding: 0.3125rem;
}

.reset-btn {
    background-color: hsl(186, 14%, 43%);
    color: hsl(183, 100%, 15%);
    font-size: 1.25rem;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
}

.tip-btn:active, .reset-btn:active {
    background-color: hsl(172, 67%, 45%);
    color: hsl(183, 100%, 15%);
}

/* input */
input {
    width: 18.75rem;
    height: 2rem;
    border: none;
    background-color: hsl(189, 41%, 97%);
    font-family: "Space Mono";
    background-repeat: no-repeat;
    background-position-x: left;
    background-position-y: center;
    background-origin: content-box;
    font-size: 1.5rem;
    color: hsl(183, 100%, 15%);
    text-align: right;
    font-weight: 700;
    padding: 0.3125rem;
    cursor: pointer;
}

input:active {
    border-color: hsl(172, 67%, 45%); 
}

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

.custom-tip {
    width: 6.25rem;
}

/* images */
.logo {
    width: 5rem;
    margin-bottom: 3.125rem;
}

/* divs */
.calculator-card {
    background-color: hsl(0, 0%, 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    width: 46.875rem;
    height: 25rem;
    padding-top: 0;
    padding-bottom: 0.625rem;
    padding-left: 1.25rem;
    padding-right: 0.625rem;
}

.calculation-div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 50%;
    height: 21.875rem;
    border-radius: 0.625rem;
}

.no-of-people {
    display: flex;
    flex-direction: row;
    width: 18.75rem;
    padding: 0rem 0.3125rem;
    justify-content: space-between;
}

.tip-btn-div {
    display: grid;
    grid-template-columns: 6.25rem 6.25rem 6.25rem;
    gap: 1.25rem;
}

/* amount-div */
.amount-div {
    background-color: hsl(183, 100%, 15%);
    width: 18.75rem;
    height: 80%;
    border-radius: 0.625rem;
    padding: 1.875rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.amount-div-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    color: hsl(0, 0%, 100%);
}

/* text */
.per-person {
    color: hsl(184, 14%, 56%);
}

.zero-warning {
    color: red;
    display: none;
}

/* attribution */
.attribution { 
    font-size: 0.6875rem; 
    text-align: center;
    position: fixed;
    bottom: 0;
    right: 0.625rem;
    text-align: center;
}

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

@media (max-width: 800px) {
    body {
        display: flex;
        flex-direction: column;
        padding-top: 0.625rem;
    }

    .logo {
        margin-bottom: 1.25rem;
        margin-top: 6.25rem;
    }

    .calculator-card {
        display: flex;
        flex-direction: column;
        width: 100vw;
        height: 46.875rem;
    }

    .calculation-div {
        margin-bottom: 2.5rem;
    }

    .amount-div {
        height: 12.5rem;
    }
}