@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500&display=swap");

html {
  font-size: 100%;
  box-sizing: border-box;
}

*,
::before,
::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
}

.container {
  display: flex;
  height: 100vh;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.bg-container {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 15rem;
  background-image: url("./images/bg-main-mobile.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.card-container {
  position: relative;
  width: 1px;
  height: 1px;
}

.bg-card__front,
.bg-card__back {
  position: absolute;
  padding: 1rem;
}

.bg-card__back {
  top: -5.875rem;
  left: -7.375rem;
  background-image: url("./images/bg-card-back.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 18.159375rem;
  height: 9.953125rem;
}

.bg-card__back > span {
  position: absolute;
  right: 2.375rem;
  top: 4.5625rem;
  color: white;
  font-size: 0.625rem;
  letter-spacing: 1px;
  font-weight: 500;
}

.bg-card__front {
  top: -0.25rem;
  left: -10.9376rem;
  background-image: url("./images/bg-card-front.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 18.159375rem;
  height: 9.953125rem;
}

.bg-card__front > img {
  height: 1.875rem;
}

.bg-card__front--number {
  display: flex;
  position: relative;
  flex-direction: column;
  font-size: 0.75rem;
  width: 100%;
  color: white;
  top: 0;
  bottom: 0;
}

.bg-card__front--number h1 {
  margin: auto;
  margin-top: 1.9375rem;
  letter-spacing: 3px;
  font-weight: 500;
  font-size: 18px;
}

.bg-card__front--info {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
}

.bg-card__front--info > span {
  font-size: 0.625rem;
  text-transform: uppercase;
}

.form-container {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: 485px;
  padding: 1.5rem;
  justify-content: center;
  align-items: center;
  align-content: center;
}

.form-container > form {
  width: 100%;
}

.form-container > form > ul {
  margin: 0;
  padding: 0;
}

.form-container > form > ul > li {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.form-container > form > ul > li > label {
  margin-bottom: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #21092f;
}

.inp {
  position: relative;
  height: 2.8125rem;
  margin-bottom: 20px;
  border: 1px solid #8e859356;
  border-radius: 0.5rem;
  outline: none;
  padding-left: 1rem;
  font-size: 17px;
  letter-spacing: 1px;
}

.inp:focus {
  outline: none;
  height: 2.8125rem;
  border: double 1px transparent;
  border-radius: 0.5rem;
  background-image: linear-gradient(white, white),
    radial-gradient(circle at top left, #6448fe, #600594);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.inp::placeholder {
  color: #8e8593;
}

.form-container > form > ul > .date-cvc {
  display: grid;
  width: 100%;
  grid-template-columns: 25% 25% 50%;
  grid-template-rows: auto 1fr;
}

.exp-lab {
  grid-column: 1 / 3;
  grid-row: 1;
}

#mm-container {
  grid-column: 1;
  grid-row: 2;
  margin-right: 8px;
}

#mm {
  width: 100%;
}

#yy-container {
  grid-column: 2;
  grid-row: 2;
  margin-right: 8px;
}

#yy {
  width: 100%;
}

.cvc-lab {
  grid-column: 3;
  grid-row: 1;
}

#cvc-container {
  grid-row: 2;
  grid-column: 3;
}

#cvc {
  width: 100%;
}

.error {
  position: relative;
  top: -0.875rem;
  color: #ff5252;
  font-size: 10px;
}

.error-input {
  border: 1px solid #ff5252;
}

.hide {
  display: none;
}

h1,
p {
  margin: 0;
}

.confirmation {
  text-align: center;
}

.confirmation > img {
  margin-bottom: 1.875rem;
}

.confirmation > h1 {
  margin-bottom: 1.25rem;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #21092f;
}

.confirmation > p {
  margin-bottom: 2.625rem;
  color: #8e8593;
}

button {
  border: none;
  width: 100%;
  height: 3.25rem;
  margin-top: 8px;
  border-radius: 0.5rem;
  color: white;
  background-color: #21092f;
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

@media only screen and (min-width: 1180px) {
  .container {
    flex-direction: row;
    justify-content: space-between;
  }

  .bg-container {
    min-height: 100vh;
    max-width: 30rem;
  }

  .bg-card__front,
  .bg-card__back {
    width: 28.125rem;
    height: 15.625rem;
    border-radius: 1rem;
  }

  .bg-card__back > span {
    top: 7.0625rem;
    right: 3.4375rem;
    font-size: 0.875rem;
  }

  .bg-card__front {
    top: -16.875rem;
    left: -5.3125rem;
    padding: 1.875rem;
  }

  .bg-card__front > img {
    height: 3.125rem;
  }

  .bg-card__front--number {
    margin-top: 25px;
  }

  .bg-card__front--number h1 {
    font-size: 1.875rem;
    letter-spacing: 0.1875rem;
  }

  .bg-card__front--info {
    margin-top: 1.5rem;
  }

  .bg-card__front--info > span {
    font-size: 0.875rem;
  }

  .bg-card__back {
    top: 1.375rem;
    left: 0.5625rem;
  }

  .form-container {
    /* margin-left: 20%; */
    margin-right: auto;
    margin-left: 20%;
    max-width: 450px;
  }

  input:hover,
  button:hover {
    cursor: pointer;
  }

  .error {
    font-size: 14px;
  }
}
