@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  /* ### Primary */
  --purple: hsl(259, 100%, 65%);
  --light-red: hsl(0, 100%, 67%);

  /* ### Neutral */
  --white: hsl(0, 0%, 100%);
  --off-white: hsl(0, 0%, 94%);
  --light-grey: hsl(0, 0%, 86%);
  --smokey-grey: hsl(0, 1%, 44%);
  --off-black: hsl(0, 0%, 8%);
}

body {
  background-color: var(--off-white);
  display: grid;
  place-content: center;
  min-height: 100vh;
  padding: 3rem 1rem;
}

.card {
  background-color: var(--white);
  border-radius: 10px;
  border-bottom-right-radius: 75px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 3rem 1.5rem;
  width: 100%;
}

@media screen and (min-width: 768px) {
  .card {
    padding: 3rem;
    border-bottom-right-radius: 150px;
  }
}

form .container {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.input__group span:first-child {
  color: var(--smokey-grey);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2rem;
  margin-bottom: 0.5rem;
  display: block;
  text-transform: uppercase;
}

@media screen and (min-width: 768px) {
  .input__group:last-of-type {
    margin-right: 150px;
  }
}

input {
  display: block;
  max-width: 120px;
  width: 100%;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--light-grey);
  cursor: pointer;
}

@media screen and (min-width: 768px) {
  input {
    padding: 0.25rem 1rem;
  }
}

input:focus-visible {
  outline: none;
  border-color: var(--purple);
}

/* Chrome & Safari */
input[type="number"]::-webkit-inner-spin-button {
  display: none;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

::placeholder {
  color: var(--smokey-grey);
  font-weight: 600;
}

.error__day,
.error__month,
.error__year {
  color: var(--light-red);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.5rem;
}

.btn {
  --width: 4rem;
  position: relative;
  border-top: 1px solid var(--light-grey);
  margin-top: 3rem;
}

button {
  position: absolute;
  top: calc(var(--width) / -2);
  right: 50%;
  transform: translateX(calc(var(--width) / 2));
  display: grid;
  place-content: center;
  background-color: var(--purple);
  border: none;
  width: var(--width);
  height: var(--width);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  font-size: 1.5rem;
  padding: 1rem;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--off-black);
}

button svg {
  width: 100%;
  height: auto;
}

@media screen and (min-width: 768px) {
  .btn {
    --width: 5rem;
  }

  button {
    right: 0;
    transform: none;
  }
}

.results {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  font-size: 2rem;
  line-height: 1;
  text-transform: lowercase;
  color: var(--off-black);
}

@media screen and (min-width: 768px) {
  .results {
    font-size: 3rem;
  }
}

.results .lines {
  color: var(--purple);
}