:root {
  --White: hsl(0, 100%, 100%);
  --Light-Grey: hsl(0, 0%, 94%);
  --Grey: hsl(0, 0%, 86%);
  --Dark-Grey: hsl(0, 1%, 44%);
  --Black: hsl(0, 0%, 0%);
  --Purple: hsl(259, 100%, 65%);
  --Red: hsl(0, 100%, 67%);
}

@font-face {
  font-family: 'Poppins';
  src: url(./assets/fonts/Poppins-Regular.ttf);
}

@font-face {
  font-family: 'ItalicPoppins';
  src: url(./assets/fonts/Poppins-ExtraBoldItalic.ttf);
}

@font-face {
  font-family: 'BoldPoppins';
  src: url(./assets/fonts/Poppins-Bold.ttf);
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
}

/* Set core body defaults */
body {
  font-family: 'Poppins';
  text-rendering: optimizeSpeed;
  background-color: var(--Light-Grey);
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: smooth;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: smooth !important;
  }
}

::-webkit-scrollbar {
  display: none;
}

/* style */
.container {
  background-color: var(--White);
  border-radius: 20px;
  border-bottom-right-radius: 100px;
  padding: 2.5rem 1.2rem 4rem 1.2rem;
  margin: 5.2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  max-width: max-content;
}

/* input */
.inputs {
  display: flex;
  gap: 1rem;
}

.input_box {
  display: flex;
  flex-direction: column;
}

.input_box label {
  text-transform: uppercase;
  color: var(--Dark-Grey);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.input_box input {
  border: 1px solid var(--Light-Grey);
  border-radius: 5px;
  padding: .7rem 1rem;
  width: 75px;
  font-weight: 900;
  font-family: 'BoldPoppins';
}

.input_box input:hover {
  border-color: var(--Grey);
  cursor: pointer;
}

/* Btn */
.input_btn {
  display: flex;
  justify-content: center;
  position: relative;
}

.input_btn button {
  border: 0;
  background-color: var(--Purple);
  border-radius: 50%;
  padding: 1.1rem;
  margin: 2rem 0 1.2rem 0;
  z-index: 1;
  cursor: pointer;
}

.input_btn button:hover {
  background-color: var(--Black);
}

.input_btn img {
  display: flex;
  width: 22px;
  height: 22px;
}

/* result */
.input_result {
  font-size: clamp(3rem, 2.6rem + 2vw, 5rem);
  font-weight: 900;
  font-family: 'ItalicPoppins';
  display: flex;
  flex-direction: column;
  gap: -10rem;
}

.input_result p {
  margin-bottom: -1.4rem;
}

.input_result p span:nth-child(1) {
  color: var(--Purple);
}

/* errors */
.error-message {
  color: var(--Red);
  font-size: 0.55rem;
  font-style: italic;
  margin-top: 4px;
  display: none;
}

.input_box.error input {
  border: 1px solid var(--Red);
}

.input_box.error label {
  color: var(--Red);
}

.input_box.error .error-message {
  display: block;
}

/* tablet & desktop */
@media (min-width: 1024px) {
  .container {
    min-width: 600px;
    align-items: normal;
  }
  .input_btn {
    justify-content: end;
  }
  .input_box input {
    width: 100px;
  }
}