* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.container {
  background: rgb(212, 216, 222);
  height: calc(100vh - 142px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.main {
  background-color: #fff;
  box-shadow: 0.7px 0.9px 2.2px rgba(0, 0, 0, 0.02),
    1.8px 2.1px 5.3px rgba(0, 0, 0, 0.028), 3.4px 4px 10px rgba(0, 0, 0, 0.035),
    6px 7.1px 17.9px rgba(0, 0, 0, 0.042),
    11.3px 13.4px 33.4px rgba(0, 0, 0, 0.05), 27px 32px 80px rgba(0, 0, 0, 0.07);
  width: 90%;
  padding: 20px;
  margin: auto;
  height: max-content;
  border-radius: 20px;
  display: flex;
}
.payment {
  padding: 20px 60px 20px 40px;
  width: 60%;
}
.payment h1 {
  font-size: 18px;
  margin-bottom: 32px;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
label {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  display: block;
  color: #666;
  margin-bottom: 8px;
}
input {
  width: 100%;
  border: 0.8px solid #999;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 16px;
  outline: none;
}
input:focus {
  /* border: 0.8px solid #5f9fd7af; */
  border: 0.8px solid #1b9c85;
  /* box-shadow: 0px 0px 0px 01px #5f9fd7af inset; */
  box-shadow: 0px 0px 0px 01px #1b9c85 inset;
}
.number-input {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.smallInp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.smallInp > div > div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
select {
  height: 39.5px;
  width: 100%;
  border: 0.8px solid #999;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  background-color: #fff;
}
/* .checkbox {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
}
.checkbox input {
  width: 16px;
  height: 16px;
  aspect-ratio: 1/1;
  accent-color: #1b9c85;
}
.checkbox label {
  margin-bottom: 0;
}
.hide {
  display: none;
} */
form button {
  width: 100%;
  /* border: 1px solid #1b9c85; */
  border: none;
  outline: none;
  background-color: #1b9c85;
  padding: 14px;
  color: white;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.2s;
  margin-top: 40px;
}
form button:hover {
  cursor: pointer;
  background-color: #0c806b;
  /* color: #1b9c85; */
}
.sidebar {
  background-color: #eee;
  width: 40%;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.card {
  margin: 40px auto;
  width: 80%;
  aspect-ratio: 3375/2125;
  perspective: 1800px;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
@media (hover: hover) {
  .card:hover .card-inner {
    transform: rotateY(-180deg);
  }
}
.front,
.back {
  /* margin: 40px auto; */
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: rgb(27, 156, 133);
  background: linear-gradient(
    135deg,
    rgba(27, 156, 133, 1) 20%,
    rgba(3, 120, 99, 1) 100%
  );
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 2px 2px 20px #707070;
  color: white;
  text-shadow: 0 1px 1px hsla(0, 0, 0, 0.3);
  font-family: "Inconsolata", monospace;
}
.flip {
  transform: rotateY(-180deg);
}
.back {
  transform: rotateY(180deg);
}
.logo-bar {
  display: flex;
  justify-content: space-between;
}
.logo img {
  height: 40px;
  width: auto;
}
.front {
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.card-number {
  display: grid;
  place-items: center;

  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  font-size: calc(16px + 1.2vmax);
  overflow: hidden;
}
.card-details {
  display: flex;
  justify-content: space-between;

  align-items: flex-start;
}
.card-details div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-details div:last-child {
  justify-content: flex-end;
  align-items: flex-end;
}
.card-details div > span:first-child {
  font-size: calc(1px + 0.8vmax);
  color: #ccc;
}
.card-details div > span:last-child {
  font-size: calc(12px + 0.8vmax);
}
.back {
  display: flex;
  flex-direction: column;
}
.black-bar {
  width: 100%;
  height: 30px;
  background: rgb(33, 33, 33);
  background: linear-gradient(
    90deg,
    rgba(33, 33, 33, 1) 50%,
    rgba(23, 23, 23, 1) 100%
  );
  margin: 20px 0 16px;
}
.cvv-bar {
  display: flex;
  width: 90%;
  flex-direction: column;
  margin: auto;
}
.cvv-bar > div {
  display: flex;
}
.cvv-bar > div:first-child {
  align-self: flex-end;
  font-size: 10px;
  color: #ddd;
  margin-bottom: 4px;
  padding-right: 8px;
}
.hidden {
  width: 75%;
  height: 24px;
  border-radius: 8px 0 0 8px;
  background-color: #7a928e8d;
  display: flex;
  justify-content: space-between;
  /* gap: 7px; */
  overflow: hidden;
}
.hidden span {
  width: 2px;
  height: 80px;
  margin-top: -20px;
  background-color: white;
  rotate: 30deg;
}
.cvv {
  width: 25%;
  background-color: white;
  border-radius: 0 8px 8px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Inconsolata", monospace;
  font-size: 16px;
  color: black;
}
.back-logo {
  display: flex;
  justify-content: flex-end;
  width: 90%;
  margin: auto;
  margin-top: 12px;
}
.footer {
  width: 80%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 1rem 0 2rem;
}
.footer a {
  text-decoration: none;
  color: #1b9c85;
  transition: all 0.2s;
}
.footer a:hover {
  color: #0d584b;
  text-decoration: underline;
}
.footer span {
  font-family: "Poiret One", cursive;
  font-size: 1.4rem;
  color: var(--text-light);
  margin: 1rem 0;
  text-align: center;
  overflow-wrap: break-word;
}
.footer .socialIcon {
  color: #a5a5a5;
  font-size: 1.8rem;
  margin: 0 8px;
  transition: all 0.2s ease-in-out;
}
.footer .linked:hover {
  color: #0e76a8;
}
.footer .github:hover {
  color: #171515;
}
@media screen and (max-width: 1200px) {
  .card {
    width: 90%;
  }
}
@media screen and (max-width: 1000px) {
  .main {
    flex-direction: column-reverse;
    gap: 30px;
    width: 60%;
    margin: 180px auto 80px;
  }
  .container {
    height: max-content;
  }
  .payment {
    width: 100%;
    padding: 20px;
  }
  .sidebar {
    width: 80%;
    align-self: center;
    margin-top: -150px;
    background: rgb(212, 216, 222);
  }

  .card {
    margin: 20px auto;
  }
}
@media screen and (max-width: 850px) {
  .sidebar {
    width: 90%;
  }
}
@media screen and (max-width: 768px) {
  .main {
    width: 70%;
  }
}
@media screen and (max-width: 600px) {
  .main {
    width: 80%;
  }
  .footer span {
    font-size: 1.2rem;
  }
}
@media screen and (max-width: 550px) {
  .main {
    width: 90%;
  }
}
@media screen and (max-width: 468px) {
  .sidebar {
    width: 95%;
  }
  .card {
    width: 95%;
    margin: 10px auto;
  }
  .card-number {
    gap: 10px;
  }
}
@media screen and (max-width: 400px) {
  .card-number {
    font-size: 24px;
  }
  .smallInp {
    grid-template-columns: repeat(1, 1fr);
  }
  .main {
    padding: 10px;
  }
  .card {
    margin: 0 auto;
    width: 100%;
  }
  .sidebar {
    margin-top: -100px;
  }
  .number-input {
    grid-template-columns: repeat(2, 2fr);
  }
}
@media screen and (max-width: 340px) {
  .card-number {
    font-size: 20px;
  }
  .card-details div > span:last-child {
    font-size: 16px;
  }
}
@media screen and (max-width: 340px) {
  .sidebar {
    width: 98%;
  }
  .main {
    padding: 4px;
  }
}
@media screen and (max-height: 700px) {
  .container {
    height: max-content;
  }
  .main {
    margin: 40px auto;
  }
}
