* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
}
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  padding: auto;
  margin: auto;
}
.card-left {
  min-width: 40%;
  min-height: 100vh;
  background-image: url("./images/bg-main-desktop.png");
  background-size: cover;
}
.card-front {
  position: absolute;
  z-index: 1;
  background-image: url("./images/bg-card-front.png");
  background-size: cover;
  background-position: center;
  width: 400px;
  height: 200px;
  left: 15%;
  top: 15%;
  border-radius: 12px;
  padding: 1rem;
}
.card-front img {
  margin-bottom: 2rem;
}
.card-front input {
  border: none;
  outline: none;
  background: transparent;
  color: white;
  padding: 0.5rem 0;
}
#front-card-number {
  font-size: 18px;
  letter-spacing: 4px;
  text-align: left;
  width: 95%;
  padding-left: 4px;
}
.card-front-name-container {
  display: flex;
  justify-content: space-between;
}
#card-front-name {
  width: 70%;
  font-size: 14px;
}
.exp-date input {
  width: 40px;
  text-align: left;
  font-size: 14px;
}
.exp-date span {
  color: white;
  margin: 0 2px;
}
.card-back {
  position: absolute;
  z-index: 1;
  background-image: url("./images/bg-card-back.png");
  background-size: cover;
  background-position: center;
  width: 400px;
  height: 200px;
  left: 20%;
  top: 50%;
  border-radius: 12px;
}
.card-back-cvc-container {
  position: absolute;
  top: 45%;
  right: 2%;
  width: 60px;
}
#card-back-cvc {
  border: none;
  outline: none;
  background: transparent;
  color: white;
  padding: 0.5rem 0;
}
.card-right {
  width: 60%;
  background-color: hsl(0, 100%, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}
form {
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.5rem;
  width: 50%;
}
.form-group {
  margin-bottom: 1rem;
}
label {
  font-size: 12px;
  color: hsl(278, 68%, 11%);
  font-weight: 500;
  width: 100%;
}
form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid hsl(270, 3%, 87%);
  margin-top: 0.5rem;
}
#card-number,
#cardholder-name {
  width: 80%;
}
#form-dates {
  display: flex;
  justify-content: space-between;
}
.exp-date > input {
  width: 20%;
}
.form-cvv input {
  width: 55%;
}
.form-submit-button {
  background-color: hsl(278, 68%, 11%);
  color: hsl(0, 100%, 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  cursor: pointer;
  width: 80%;
}
.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 1rem;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
  }
  .container {
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
  }
  .card-left {
    width: 100%;
    padding: 0.5rem;
  }
  .card-front {
    width: 70%;
    height: 150px;
    top: 3%;
  }
  .card-front img {
    margin-bottom: 1rem;
  }
  #front-card-number {
    font-size: 14px;
    letter-spacing: 2px;
  }
  #card-front-name,
  .exp-date input,
  #card-back-cvc {
    font-size: 12px;
  }
  .card-back {
    width: 70%;
    height: 150px;
    top: 33%;
  }
  .card-back-cvc-container {
    top: 42%;
  }
  .card-right {
    width: 100%;
    padding: 1rem;
  }
  form {
    width: 90%;
    margin-bottom: 2rem;
  }
  footer {
    text-align: center;
  }
}
