@font-face {
  font-family: "Space Mono";
  src: url("./assets/fonts/SpaceMono-Bold.ttf") format("truetype");
  font-style: bold;
}
@font-face {
  font-family: "Space Mono";
  src: url("./assets/fonts/SpaceMono-Regular.ttf") format("truetype");
  font-style: normal;
}

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

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-grey-600: #3D6666;
  --color-grey-550: #547878;
  --color-grey-500: #5E7A7D;
  --color-grey-400: #7F9D9F;
  --color-grey-300: #9EBBBD;
  --color-grey-200: #C5E4E7;
  --color-grey-50: #F3F9FA;
  --color-green-900: #00474B;
  --color-green-800: #085C61;
  --color-green-750: #0D686D;
  --color-green-400: #26C2AE;
  --color-green-200: #9FE8DF;
  --color-orange-400: #E17052;
}

.text-preset-1 {
  font-family: "Space Mono";
  font-size: 48px;
  font-weight: bold;
  line-height: 71px;
  letter-spacing: -1px;
}
.text-preset-2 {
  font-family: "Space Mono";
  font-size: 32px;
  font-weight: bold;
  line-height: 47px;
  letter-spacing: -0.67px;
}
.text-preset-3 {
  font-family: "Space Mono";
  font-size: 24px;
  font-weight: bold;
  line-height: 36px;
  letter-spacing: 0;
}
.text-preset-4 {
  font-family: "Space Mono";
  font-size: 20px;
  font-weight: bold;
  line-height: 30px;
  letter-spacing: 0;
}
.text-preset-5 {
  font-family: "Space Mono";
  font-size: 16px;
  font-weight: bold;
  line-height: 24px;
  letter-spacing: 0;
}
.text-preset-6 {
  font-family: "Space Mono";
  font-size: 13px;
  font-weight: bold;
  line-height: 19px;
  letter-spacing: 0;
}

body {
  font-family: "Space Mono";
  min-height: 100vh;
  background-color: var(--color-grey-200);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url("./images/logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-position: top 10% center;
}

.container {
  width: 920px;
  padding: 32px;
  background-color: var(--color-white);
  border-radius: 25px;
  box-shadow: 0 32px 43px rgba(79, 166, 175, 0.2);

  display: grid;
  grid-template-columns: 379px 413px;
  grid-template-rows: 1fr;
  gap: 48px;
}

.input {
  display: flex;
  flex-direction: column;
  gap: 40px;
  justify-content: left;
  align-items: center;
}
.input .bill {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.input .bill label, .tip .title, .people label {
  color: var(--color-grey-500);
}
.input-bill {
  width: 100%;
  position: relative;
}
.input-bill input, .input-people input {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background-color: var(--color-grey-50);
  color: var(--color-green-900);
  text-align: right;
  border-radius: 5px;
}
.input-bill input:focus, .input-people input:focus {
  outline: var(--color-green-400) 2px solid;
}
.input-bill img, .input-people img {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

.tip {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tip .select-tip {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.tip .select-tip button {
  width: 100%;
  padding: 8px 16px;
  background-color: var(--color-green-900);
  color: var(--color-white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.tip .select-tip button:hover {
  background-color: var(--color-green-200);
  color: var(--color-green-900);
}
.tip .select-tip button.active {
  background-color: var(--color-green-400);
  color: var(--color-white);
}

.tip .select-tip input {
  width: 100%;
  text-align: center;
  padding: 8px;
  background-color: var(--color-grey-50);
  color: var(--color-green-900);
  border: none;
  border-radius: 5px;
}
.tip .select-tip input:focus {
  outline: none;
}

.people {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.people .input-people {
  width: 100%;
  position: relative;
}

.output {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background-color: var(--color-green-900);
  border-radius: 15px;
  padding: 24px 32px;
}

.output .result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  row-gap: 24px;
}

.output .result .title {
  color: var(--color-white);
}
.output .result .per-person {
  color: var(--color-grey-400);
}

.output .result .result-tip, .output .result .total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
}
.output .result .money {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: end;
  color: var(--color-green-400);
}
.output #btn_reset {
  width: 100%;
  padding: 8px 40px;
  color: var(--color-green-900);
  border: none;
  border-radius: 5px;
  background-color: var(--color-green-400);
  cursor: pointer;
}
.output #btn_reset:hover {
  background-color: var(--color-green-200);
}

@media screen and (max-width: 1200px) {
  body {
    padding: 144px 0 10px;
    justify-content: start;
    background-position: top 48px center;
  }

  .container {
    width: 608px;
    padding: 48px 80px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
    border-radius: 24px 24px 0 0;
  }

  .input {
    gap: 24px;
  }
  .output {
    gap: 16px;
  }
  .output .result {
    row-gap: 8px;
  }
  
}
@media screen and (max-width: 768px) {
  body {
    padding: 144px 0 0;
  }
  .container {
    width: 100%;
    padding: 24px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
  }

  .container .input {
    padding: 0 8px;
    gap: 32px;
  }

  .tip .select-tip {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
  }

  .output {
    padding: 24px;
    gap: 32px;
  }

  .output .result .money {
    font-size: 32px;
    line-height: auto;
    letter-spacing: -0.67px;
  }

}