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

* {
    margin: 0;
    padding: 0; 
    box-sizing: border-box;
    font-family: "Space Mono", monospace;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* test */

/* global */

:root {
    /* colors */
    --lightcyan: #C5E4E7;
    --darkgreycyan: #7F9D9F;
    --strongcyan: #26C2AE;
    --darkgreen: #00474B;
    --lightgreycyan: #9FE8DF;
    --lightgrey: #F3F9FA;
    --darkgrey: #5E7A7D;
    --red: #E17457;
}

/* main */

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--lightcyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

.card {
    width: 920px;
    height: 481px;
    background-color: #FFFFFF;
    display: flex;
    padding: 2rem;
    border-radius: 25px;
    margin-top: 5.49rem;
}

#bill {
    margin-top: 13px;
}

form {
    position: relative;
}

.formsection {
    width: 50%;
    height: fit-content;
    margin-left: 1rem;
    margin-right: 3rem;
}

label {
    display: block;
}

#peopleErr, #billErr {
    display: none;
    color: var(--red);
    position: absolute;
    right: 0%;
}

#percentages {
    margin: 2.5rem 0;
}

input[type="number"] {
    border: none;
    background-color: var(--lightgrey);
    border-radius: 5px;
    width: 100%;
    height: 3rem;
    text-align: end;
    padding: 1rem;
    font-size: 1.5rem;
    position: relative;
}

.numberinput {
    position: relative;
}

img:last-child {
    width:  9.84px;
    position: absolute;
    left: 2.64%;
    top: 16px;
}

input[type="button"] {
   width: 117px;
   height:48px;
   margin-top: 1rem;
   border: none;
   border-radius: 5px;
   background-color: var(--darkgreen);
   color: #FFFFFF;
   font-size: 1.5rem;
   font-weight: 500;
}

#custom {
    background-color: var(--lightgrey);
    color: #547878;
    width: 117px;
    height:48px;
    margin-top: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.3rem;
    font-weight: 500;
}

.outputsection {
    background-color: var(--darkgreen);
    width: 50%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 15px;
}

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

.output:first-of-type {
    margin-bottom: 2.5rem;
}

p:first-of-type {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: bold;

}

p:last-of-type {
    font-size: 13px;
    color: var(--lightgreycyan);
}

#tipOutput, #totalOutput {
    color: var(--strongcyan);
    font-size: 3rem;
    font-weight: bold;
}

#reset {
    width: 100%;
    height: 3rem;
    background-color: var(--strongcyan);
    justify-self: flex-end;
    border: none;
    border-radius: 5px;
    font-size: 1.25rem;
    font-weight: 500;
}

/* active */

input[type="button"].active {
    background-color: var(--lightgreycyan);
    color: var(--darkgreen);
}

#reset:hover {
    background-color: var(--lightgreycyan);
    color: var(--darkgreen);
}

input[type="button"]:hover {
    background-color: var(--lightgreycyan);
    color: var(--darkgreen);
}

input[type="number"]:focus, #custom:focus {
    outline: none;
    border: 2px solid var(--strongcyan);
}

#billtotal.err, #numpeople.err {
    outline: none;
    border: 2px solid var(--red);
}

/* mobile */

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

    body {
        height: fit-content;
        padding-top: 3rem;
    }

    .card {
        width: min(100vw, 600px);
        height: fit-content;
        flex-direction: column;
        margin-top: 2.5rem;
    }

    .formsection {
        width: 100%;
        margin: 0;

    }

    input[type="button"], #custom{
        width: 146.63px;
    }
    
    #custom {
        text-align: center;
    }
    .outputsection {
        width: 100%;
        padding: 1.5rem;
        margin-top: 2rem;
    }

    #tipOutput, #totalOutput {
        font-size: 2rem;
    }

    .output {
        margin-bottom: 1.5rem;
    }

    .output:first-of-type {
        margin-bottom: 1.5rem;
    }
}
