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

/* To remove number wheel */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}
/* ----------------------- */

body,
html {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  /* overflow: hidden; */
}

.main {
  display: flex;
  flex-direction: row;
  /* margin: 0 auto; */
}
.main > img {
  content: url(./images/bg-main-desktop.png);
  max-width: 35%;
  height: 100vh;
  align-self: flex-start;
  object-fit: cover;
}

#formpage_2{
  width: 100%;
  height: fit-content;
  text-align: center;
  margin: 0 auto;
}
#formpage_2> h2,#formpage_2> p {
  letter-spacing: 2px;
}
#formpage_2> p{
  color: grey;
  margin-top: 20px;
}

#checkLogo{
  width: 100px;
  margin-bottom: 20px;
}
#submitBtn_2{
  width: 100%;
  margin-top: 30px;
}
.userInfo {
  z-index: 20;
  height: fit-content;
  width: 85%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0 auto;
  justify-content: center;
  align-self: center;
}
.userInfo p {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 2px;
  color: hsl(278, 68%, 11%);
  margin-bottom: 5px;
  margin-top: 5px;
}
#formpage_1{
  z-index: 20;
  
}

.textbox, .btn {
  width: 100%;
  font-family: inherit;
  padding: 8px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid hsl(270, 2%, 82%);
  color: hsl(279, 6%, 55%);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 2px 0;
  outline: none;
}
.textbox:focus {
  color: black;
  border: 0.5px solid hsl(278, 94%, 30%);
}
/* input:invalid {
  border-color: hsl(0, 100%, 66%);
} */

.btn {
  text-align: center;
  color: hsl(0, 0%, 100%);
  background-color: hsl(278, 68%, 11%);
  border: none;
  margin-top: 10px;
  padding: 15px;
}
.btn:hover {
  background-color: hsl(0, 0%, 3%);
  color: orchid;
  cursor: pointer;
}

#dateCvcSection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: dense;
  justify-content: center;
  align-items: top;
  gap: 5px;
}
#monthInput,
#yearInput {
  width: 4em;
}
#cvcInput {
  width: 100%;
}
.errorMessage {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: none;
  color: hsl(0, 100%, 66%);
  margin: auto;
}

#disclaimer{
  text-align: center;
  font-size: 8px;
}

.card {
  position: absolute;
  width: 50vw;
  height: 100vh;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  color: hsl(0, 0%, 100%);
  overflow: hidden;
}

.front {
  left: 150px;
  top: 150px;
  height: 245px;
  width: 447px;
  max-width: 447px;
  background-image: url(./images/bg-card-front.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 20px;
  gap: 10px;
  overflow: hidden;
  justify-content: space-evenly;
}
.back {
  left: 200px;
  top: 430px;
  height: 245px;
  width: 447px;
  max-width: 447px;
  background-image: url(./images/bg-card-back.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding-right: 50px;
  justify-content: space-around;
  text-align: right;
  overflow: hidden;
}

.logo {
  width: 100%;
  align-items: flex-start;
  height: 100%;
}

.cardInfo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 20px;
}

.logo > img {
  width: 30%;
}
.nameDate {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: bottom;
  justify-content: space-between;
  height: 100%;
}

#expOnCard {
  display: flex;
  flex-direction: row;
}
#numOnCard {
  letter-spacing: 6px;
  margin-top: 20px;
  vertical-align: bottom;
  font-size: 1.5rem;
  font-weight: 500;
}
#nameOnCard,
#expOnCard,
#cvcOnCard {
  font-size: 0.8rem;
  letter-spacing: 2px;
}
#cvcOnCard {
  align-self: flex-end;
}
.front,
.back {
  box-shadow: 0 0 10px 0px hsla(285, 80%, 2%, 0.404);
  border-radius: 8px;
}

#check-logo{
  width: 20%;
}

@media (max-width: 1440px) and (min-width: 940px) {
  .main {
    gap: 10%;
  }
  .main > img {
    width: 25%;
  }
  .userInfo {
    position: relative;
    /* left: 5%; */
    margin: 0 auto;
  }
  .card {
    width: 50%;
    padding: unset;
    padding-right: 80px;
    padding-left: 40px;
  }
  .front {
    left: unset;
    top: 150px;
    width: 100%;
    max-width: 350px;
    max-height: 200px;
    align-self: flex-start;
    flex-wrap: nowrap;
    padding: 20px;
  }
  .back {
    left: unset;
    top: 370px;
    width: 100%;
    max-width: 350px;
    max-height: 200px;
    align-self: flex-end;
    padding-right: 8%;
  }

  #numOnCard {
    font-size: 1.5rem;
    letter-spacing: 2px;
  }
  #nameOnCard,
  #expOnCard,
  #cvcOnCard {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }
}

@media (max-width: 940px) {
  .main {
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    gap: 8%;
  }
  .main > img {
    content: url(./images/bg-main-mobile.png);
    width: 100vw;
    height: 200px;
    max-width: unset;

  }

  .userInfo {
    height:100%;
    margin-top: 10%;
    justify-content: unset;
    justify-content: space-around;
    
  }
  .userInfo p {
    font-size: 12px;
    font-weight: 500;
  }

  .textbox {
    font-size: 16px;
    font-weight: 500;
  }

  .card {
    position: absolute;
    width: 90vw;
    height: 100vh;
    padding-top: 8px;
    max-width: 447px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
  }
  .front {
    padding: 20px;
    margin-left: unset;
    margin-right: unset;
    left: 0;
    top: 110px;
    width: 85%;
    height: 25%;
    z-index: 2;
    gap: 5px;
    max-width: 286.867px;
    max-height: 166.75px;
  }
  .back {
    padding-top: unset;
    margin-left: unset;
    margin-right: unset;
    right: 0;
    left: unset;
    top: 16px;
    width: 85%;
    height: 25%;
    z-index: 1;
    padding-right: 8%;
    max-width: 286.867px;
    max-height: 166.75px;
  }

  .cardInfo {
    gap: 20px;
  }
  .logo img {
    width: 20%;
  }
  #numOnCard {
    text-align: justify;
    font-size: 0.8rem;
    letter-spacing: 5px;
  }
  #nameOnCard,
  #expOnCard,
  #cvcOnCard {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
  }
}
