@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

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


:root {
    --spacing-0: 0px;
    --spacing-100: 8px;
    --spacing-200: 16px;
    --spacing-300: 24px;
    --spacing-400: 32px;
    --spacing-600: 48px;
    --spacing-1000: 80px;
    --spacing-1200: 96px;
    --spacing-1500: 120px;
    --green-400: hsl(172, 67%, 45%);
    --green-900: hsl(183, 100%, 15%);
    --grey-500: hsl(186, 14%, 43%);
    --grey-400: hsl(184, 14%, 56%);
    --grey-300: #9EBBBD;
    --grey-200: hsl(185, 41%, 84%);
    --grey-50: hsl(189, 47%, 97%);
    --white: hsl(0, 100%, 100%);
    --orange: #E17052;
}

body {
    height: 100vh;
    align-content: center;
    font-family: "Space Mono", monospace;
    letter-spacing: 0px;
    font-weight: bold;
    background-color: var(--grey-200);
}

img, button {
    display: block;
}

input::placeholder {
    color: var(--grey-300);
    font-family: "Space Mono", monospace;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0px;
    font-weight: inherit;
}

.text-present-title {
    font-size: 32px;
    line-height: 47px;
    letter-spacing: -0.67px;
}

.text-present-3 {
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0px;
    font-weight: inherit;
}

.text-present-4 {
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0px;
}

.text-present-5 {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
}

.text-present-6 {
    font-size: 13px;
    line-height: 19px;
    letter-spacing: 0px;
    color: var(--grey-400);
}

.wrapper {
    margin: 0 auto;
    width: 375px;
    height: 100%;
}

.logo {
    width: 90px;
    height: 55px;
    margin: var(--spacing-600) auto;
}

.calculator {
    width: 100%;
    height: 100%;
    background-color: var(--white);
    border-radius: 25px 25px 0 0;
    padding: var(--spacing-400) var(--spacing-300);
}

.custom {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-400);
}

.bill {
    height: var(--spacing-1000);
}

.sub {
    margin-bottom: var(--spacing-100);
    color: var(--grey-500);
}

.content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--grey-50);
    padding: var(--spacing-100) var(--spacing-200);
    cursor: pointer;
}

.icon {
    width: 10px;
    height: 100%;
}

/* -------------------------- GRID */
.tip__content {
    width: fit-content;
    display: grid;
    gap: var(--spacing-200);
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
}

.tip__percentage {
    border: none;
    outline: none;
    font-family: inherit;
    font-weight: inherit;
    color: var(--white);
    padding: var(--spacing-100) var(--spacing-200);
    background-color: var(--green-900);
    border-radius: 5px;
    cursor: pointer;
}

.tip__percentage:hover {
    color: var(--green-900);
    background-color: var(--grey-200);
}

.btn-custom {
    background-color: var(--grey-50);
    color: var(--grey-500);
    min-width: 1px;
}

/* 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;
}

.show {
    border-radius: 15px;
    background-color: var(--green-900);
    padding: var(--spacing-300);
    height: 257px;
    width: 100%;
}

.info__title {
    color: var(--white);
}

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

.position:first-of-type {
    margin-bottom: var(--spacing-300);
}

.data {
    color: var(--green-400);
}

.reset {
    background-color: var(--green-400);
    color: var(--green-900);
    margin-top: var(--spacing-400);
    width: 100%;
}

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

.show {
    margin-top: var(--spacing-400);
}

.count {
    border: none;
    outline: none;
    text-align: end;
    background-color: transparent;
    cursor: pointer;
}


.percentage__container {
    margin-top: var(--spacing-100);
}

.percentage__container--active {
    display: block;
}

.icon-percentage {
    width: 20px;
    height: 100%;
}



.input-custom {
    display: block;
    outline: 1px solid var(--grey-400);
    background-color: var(--grey-300);
    min-width: 1px;
    color: var(--green900);
    background-color: var(--white);
    text-align: end;
}

.input-custom:hover {
    outline: 2px solid var(--green-400);
}

.input-custom:focus {
    outline: 2px solid var(--green-400);
}

.content:hover {
    outline: 2px solid var(--green-400);
}


/* ------------------------------------- PART script */

.input-custom {
    display: none;
    outline: 1px solid var(--grey-400);
    background-color: var(--grey-300);
    min-width: 1px;
    color: var(--green900);
    background-color: var(--white);
    text-align: end;
}

.error {
    display: none;
    color: var(--orange);
}

.error-content {
    outline: 1px solid var(--orange);
}


.btn-select {
    background-color: var(--green-400);
    color: var(--green-900);
}



.reset:disabled {
    background-color: hsla(172, 67%, 45%, 0.3);
    color: hsla(183, 100%, 15%, 0.3);
}





@media screen and (min-width: 768px) {
    .text-present-title {
        font-size: 48px;
        line-height: 71px;
        letter-spacing: -1px;
    }
    .wrapper {
        width: 608px;
    }

    .calculator {
        height: auto;
        border-radius: 25px;
        padding: var(--spacing-600) var(--spacing-1000);
    }

    .custom {
        gap: var(--spacing-300);
    }

    .tip__content {
        gap: var(--spacing-200);
        grid-template-columns: repeat(3, 1fr);
    }

    .show {
        padding: 50px;
        margin-top: 40px;
        height: auto;
    }

    .position:first-of-type {
        margin-bottom: 0;
    }
    .reset {
        margin-top: var(--spacing-200);
    }
    
}


@media screen and (min-width: 1024px) {
    .wrapper {
        width: auto;
    }
    .calculator {
        display: flex;
        align-items: stretch;
        padding: var(--spacing-400);
        gap: var(--spacing-600);
        width: 920px;
        height: auto;
        margin-inline: auto;
    }

    .custom {
        width: 50%;
        gap: 40px;
    }

    .show {
        padding: var(--spacing-300);
        margin-top: 0;
        width: 50%;
        display: grid;
        place-items: center;
    }

    .show__container {
        width: 333px;
        height: 342px;
    }

    .position:first-of-type {
        margin-bottom: var(--spacing-300);
    }


    .reset {
        margin-top: 128px;
    }
}