@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@700&display=swap');
/* font name : Space Mono , weight : 700 */

:root{
    --font : Space Mono;

   /* Primary */
    --Strongcyan: hsl(172, 67%, 45%);

    /* Neutral colors */
    --Verydarkcyan: hsl(183, 100%, 15%);
    --Darkgrayishcyan: hsl(186, 14%, 43%);
    --Grayishcyan: hsl(184, 14%, 56%);
    --Lightgrayishcyan: hsl(185, 41%, 84%);
    --Verylightgrayishcyan: hsl(189, 41%, 97%);
    --White: hsl(0, 0%, 100%);
}

*{
    font-family: var(--font);
    margin: 0px;
}
html{
    height: 100%;
}
body{
    margin: 0px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--Lightgrayishcyan)
}
img{
    margin-bottom: 70px;
}
main{
    background-color: var(--White);
    border-radius: 15px;
    width: 100%;
    max-width: 700px;
    display: flex;
    padding: 2em;
    box-sizing: border-box;
}

.left-container{
    width: 50%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 10px;
}
h2{
    grid-column: 1 / 4;
    font-size: 1rem;
    color: var(--Darkgrayishcyan);
}
.number-people{
    margin-top: 30px;
    grid-column: 1 / 3;
}
#error{
    display: none;
    font-size: 0.7rem;
    align-self: end;
    color: red;
    grid-column: 3 / 4;
}

input{
    border: none;
    height: 30px;
    grid-column: 1 / 4;
    border-radius: 5px;
    text-align: right;
    padding-right: 20px;
    box-sizing: border-box;
    color: var(--Verydarkcyan);
}
input:hover{
    cursor: pointer;
    border: 2px solid var(--Strongcyan);
}
input:focus{
    outline: none;
    border: 2px solid var(--Strongcyan);
}
.red-border{
    border: 2px solid red !important;
}
.dollar-input{
    margin-bottom: 20px;
    background: url(images/icon-dollar.svg) no-repeat 7px;
    background-color: var(--Verylightgrayishcyan);
}
.people-input{
    background: url(images/icon-person.svg) no-repeat 7px;
    background-color: var(--Verylightgrayishcyan);
}
::placeholder{
    text-align: right;
    font-size: 1rem;
    color: var(--Grayishcyan);
}

.tip-button{
    border: none;
    border-radius: 3px;
    height: 30px;
    color: var(--White);
    background-color: var(--Verydarkcyan);
}
button:hover{
    cursor: pointer;
    color: var(--Verydarkcyan);
    background-color: hsla(172, 67%, 45%, 0.642);
}

.custom-tip{
    box-sizing: border-box;
    height: 30px;
    min-width:100%;
    grid-column: 3 / 4;
    background-color: var(--Verylightgrayishcyan);
}
.custom-tip::placeholder{
    text-align: center;
    margin-right: -20px;
}

.right-container{
    border-radius: 10px;
   /*  grid-auto-rows: max-content; */
    display: grid;
    box-sizing: border-box;
    padding: 1.5em;
    grid-template-columns: 1fr 1fr;
   /*  grid-template-rows: 30px 30px 30px 30px; */
    width: 50%;
    margin-left: 20px;
    background-color: var(--Verydarkcyan);
}
.right-h2{
    align-self: start;
    font-size: 0.9rem;
    grid-column: 1 / 2;
    color: var(--Lightgrayishcyan);
}
h3{
    align-self: start;
    grid-column: 1 / 2;
    margin: 0px;
    margin-top: -25px;
    font-size: 0.8rem;
    color: var(--Grayishcyan);
}
h4{
    align-self: start;
    justify-self: end;
    margin: 0px;
    font-size: 2rem;
    color: var(--Strongcyan);
}
#tip-amount{
    grid-row: 1 / 3;
    grid-column: 2 / 3;
}
#total{
    grid-row: 3 / 5;
    grid-column: 2 / 4;
}
#reset{
    border: none;
    background-color: rgb(0, 104, 110);
    grid-row: 7 / 8;
    grid-column:  1 / 3;
    border-radius: 5px;
    text-transform: uppercase;
    color: var(--Verydarkcyan);
}
#reset:hover{
    background-color: var(--Strongcyan);
}

@media screen and (width<500px) {
    main{
        flex-direction: column;
    }
    .left-container{
        width: 100%;
    }
    .right-container{
        width: 100%;
        margin-left: 0px;
        margin-top: 30px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }
    #reset{
        margin-top: 20px;
        height: 40px;
    }
    img{
        margin-top: 60px;
        margin-bottom: 40px;
    }
}