:root{
--green-900: hsl(183, 100%, 15%);
--grey-500: hsl(186, 14%, 43%);
--grey-400: hsl(184, 14%, 56%);
--grey-200: hsl(185, 41%, 84%);
--grey-50: hsl(189, 47%, 97%);
--white: hsl(0, 100%, 100%);
--green-400: hsl(172, 67%, 45%);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: "Space Mono", monospace;
    color: var(--green-900);
    font-size: 1rem;
    height: 100%;
    background-color: var(--grey-200);
}

/* General styling for all inputs */

input{
    color: var(--green-900);
    width: 100%;
    height: 2.81rem;
    padding: 10px 10px 10px 35px;
    text-align: right;
    outline: none;
    border: none;
    background-color: var(--grey-50);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 5px;
    font-family: "Space Mono", monospace;
}

input:focus{
    border: 3px solid var(--green-400);
}

input:hover{
    border: 3px solid var(--grey-200);
    transition: all 0.3s ease-in-out;
}

input::placeholder{
    color: var(--grey-400);
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.container-tip-calculator{
    width: 100%;
    padding: 30px;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    background-color: var(--white);
}

.container-tip-calculator h1{
    font-size: 14px;
    color: var(--grey-500);
    font-weight: 600;
}

.heading-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-message {
    color: red;
    font-weight: 600;
}


.bill-container, .tip-container, .people-container{
    margin-bottom: 25px;
}

.logo-image{
    padding: 50px;
}
/* Positioning the icons in the input */
.bill-input, .people-input{
    position: relative;
    padding: 10px 0;
}

.dollar-sign, .user-icon{
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--grey-400);
}


/* buttons */
.tip-options{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.tip-btn{
    background-color: var(--green-900);
    color: var(--grey-50);
    border: none;
    outline: none;
    padding: 0.7rem 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: "Space Mono", monospace;
    border-radius: 5px;
    flex: 1;
    cursor: pointer;
}

.tip-btn:hover{
    background-color: var(--grey-200);
    color: var(--green-900);
    transition: 0.5s ease-in;
}

button.active{
    background-color: var(--green-400);
    color: var(--green-900);
}

#custom-tip{
    height: 3.5rem;
    flex: 1;
}

.container-right{
    background-color: var(--green-900);
    color: white;
    padding: 50px 20px 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tip-container-two, .amount-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tip-container-two p, .amount-container p{
    color: var(--grey-500);
    font-weight: bold;
    font-size: 16px;
}

.tip-container-two h2, .amount-container h2{
    font-size: 18px;
}

.tip-amount, .total-amount{
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tip-amount span, .total-amount span {
    color: var(--green-400);
    font-weight: 700;
    font-size: 2.5rem;
}

.tip-amount i, .total-amount i{
    color: var(--green-400);
    font-size: 1.5rem;
    transform: translateY(2px);
}

/* Reset Butto */
.reset-btn{
    border: none;
    outline: none;
    background-color: var(--green-400);
    color: var(--green-900);
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-size: 1.2rem;
    width: 100%;
    height: 3rem;
    border-radius: 5px;
    cursor: pointer;
}

.reset-btn:hover{
    background-color: var(--grey-200);
    transition: all 0.3s ease-in;
}

@media (min-width: 48rem){

    body{
        width: 100%;
        height: 100vh;
    }

    .logo-image{
        margin: 0;
        padding: 0;
        padding-bottom: 30px;
    }
    
    .container-tip-calculator{
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 60rem;
        height: fit-content;
        gap: 1.5rem;
        border-radius: 30px;
    }

    .tip-options{
        grid-template-columns: repeat(2, 1fr);
    }

    section{
        flex: 1;
    }

    .container-right{
        display: flex;
        flex-direction: column;
        height: 25rem;
        padding: 50px;
        box-sizing: border-box;
    }

    .reset-btn{
        margin-top: auto;
    }

    .resetBtn{
        margin-top: auto;
    }

}

@media (min-width: 56.25rem){
    
    body{
        padding-bottom: 20px;
        height: 100vh;
    }

    .logo-image{
        margin: 0;
        padding: 0;
        padding-bottom: 30px;
    }
    
    .container-tip-calculator{
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 60rem;
        gap: 1.5rem;
        border-radius: 30px;
    }

    .tip-options{
        grid-template-columns: repeat(3, 1fr);
    }

    section{
        flex: 1;
    }

    .container-right{
        display: flex;
        flex-direction: column;
        height: 25rem;
        padding: 50px;
        box-sizing: border-box;
    }

    .reset-btn{
        margin-top: auto;
    }

    .resetBtn{
        margin-top: auto;
    }
}