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

:root {
  --Strong-cyan: hsl(172, 67%, 45%);
  --Very-dark-cyan: hsl(183, 100%, 15%);
  --dar-grayish-cyan: hsl(186, 14%, 43%);
  --grayish-cyan: hsl(184, 14%, 56%);
  --Light-grayish-cyan: hsl(185, 41%, 84%);
  --Very-light: hsl(189, 41%, 97%);
  --white: hsl(0, 0%, 100%);
  --font: "Space Mono";
  --weight: 700;
  --size-form: 24px;
}

body {
  background-color: var(--Light-grayish-cyan);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  font-size: var(--size-form);
}

#logo {
  display: flex;
  width: 5.5rem;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem 0; 
}

.bg-container {
  width: 100vw;
  height: 100%;
  background-color: var(--white);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.1rem 1.3rem 0 1.3rem;
}

.input-containers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; 
  padding: 0 0.7rem;
}

.tip-container {
  padding: 0 0.7rem;
  margin: 2.5rem 0;
}

.tip-blocks {
  margin-block-start: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

#custom {
    font-family: var(--font);
    outline: none;
    border: none;
    text-align: right;
    background-color: var(--Very-light);
    border-radius: 5px;
    color: var(--Very-dark-cyan);
    font-size: 1.4rem;
    font-weight: var(--weight);
    max-width: 150px;
    padding: 0.5rem;
}

.item {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--Very-dark-cyan);
  font-family: var(--font);
  border-radius: 5px;
  border: none;
  padding: 0.5rem;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: var(--weight);
  cursor: pointer;
  max-width: 150px;
}

.item:hover {
  background-color: var(--Strong-cyan);
  color: var(--Very-dark-cyan);
}

.item.selected{
  background-color: var(--Strong-cyan);
  color: var(--Very-dark-cyan);
}

.green-container {
  background-color: var(--Very-dark-cyan);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.8rem;
  height: 36vh;
  margin: 2.5rem 0;
}

h2 {
    color: var(--dar-grayish-cyan);
    font-size: 1rem;
  }

.amount {
  color: var(--white);
  font-size: 1rem;
}

.person {
  color: var(--grayish-cyan);
  font-size: 0.8rem;
}

.total-person{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-content: space-evenly;
  align-items: center;
}

#tip-result, #total {
    display: flex;
    justify-content: end;
    align-items: center;
    color: var(--Strong-cyan);
    font-size: 2rem;
    font-weight: var(--weight);
}

#reset {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--Strong-cyan);
    border-radius: 5px;
    border: none;
    padding: 0.5rem;
    color: var(--Very-dark-cyan);
    font-size: 1.4rem;
    font-weight: var(--weight);
    font-family: var(--font);
    text-transform: uppercase;
    cursor: pointer;
    max-width: 100%;
}

.bill, .people {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--Very-light);
    border-radius: 5px;
    padding: 0.5rem;
    color: var(--Very-dark-cyan);
    font-size: 1.3rem;
    font-weight: var(--weight);
}

#bill, #people {
    font-family: var(--font);
    outline: none;
    border: none;
    text-align: right;
    background-color: var(--Very-light);
    border-radius: 5px;
    color: var(--Very-dark-cyan);
    font-size: 1.4rem;
    font-weight: var(--weight);
    max-width: 90%;
    padding: 0.2rem;
}

/* this is to remove the arrows on all the navigators */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

footer {
    margin: 1rem 0;
    text-align: center;
    font-size: 11px;
    color: var(--grayish-cyan);
}

@media (min-width: 768px) {
    #logo {
        max-width: 6rem;
        margin: 2.1rem 0 1.7rem 0;
      }
      
      .bg-container {
        width: 67vw;
        height: 80vh;
        border-radius: 20px;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.3rem 2rem 1.3rem;
        margin: 0;
      }

      #grid-1 {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.2rem 0.8rem;
      }
      
      .tip-container {
        display: flex;
        flex-direction: column;
        padding: 0 0.7rem;
        margin: 1.5rem 0 1.5rem 0;
      }
      
      .tip-blocks {
        margin-block-start: 1.2rem;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
      }
      
      #custom {
        min-width: 100%;
      }
      
      .item {
        min-width: 100%;
      }
      
      .green-container {
        justify-content: space-between;
        padding: 3rem 2.5rem 2.7rem 2.5rem;
        width: 58vw;
        height: 50vh;
        margin: 1rem 0 0 0;
      }
    
      #tip-am{
        margin-block-start: -3rem;
      }
     
      #tip-result, #total {
          font-size: 2.4rem;
      }
    
      footer {
        margin: 0.8rem 0 0 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }    

    }

@media (min-width: 1200px) {
    
#logo {
    max-width: 6rem;
    margin: 6rem 0 4rem 0;
  }
  
  .bg-container {
    width: 58rem;
    max-height: 28rem;
    border-radius: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: space-between;
    align-items: center;
    margin: 0 0 2em 0rem;
    padding: 0;
  }

  #grid-1 {
    display: flex;
    max-height: 26rem;
    justify-content: center;
    align-self: center;
    padding: 0rem 1.8rem 0rem 1.3rem;
  }
  
  .tip-container {
    display: flex;
    flex-direction: column;
    padding: 0 0.7rem;
    margin: 1.5rem 0;
  }
  
  .tip-blocks {
    margin-block-start: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
  }
  
  #custom {
    min-width: 100%;
  }
  
  .item {
    min-width: 100%;
  }
  
  .green-container {
    grid-area: 1 / 2 / 1 / 2;
    align-self: center;
    justify-content: space-between;
    padding: 3rem 2.5rem 2.7rem 2.5rem;
    max-width: 27.5rem;
    height: 25rem;
    margin: 0;
  }

  #tip-am{
    margin-block-start: -6rem;
  }
 
  #tip-result, #total {
      font-size: 2.7rem;
  }

  footer {
    margin: 0 0 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

}