/* Globals */
:root {
  --linear-gradient: linearGradient(
    #6448fe,
    #600594
  ); /* (active input border) */
  --red: #ff5252; /*(input errors)*/
  --white: #ffffff;
  --light-gray: #d3d3d3;
  --light-grayish-violet: #dedddf;
  --dark-grayish-violet: #8e8593;
  --very-dark-violet: #21092f;
  --black: #222222;
}

body,
html {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Space Grotesk", sans-serif;
}

h1,
h2,
h3,
p {
  text-align: center;
  line-height: 1.5rem;
}

a {
  text-decoration: none;
  color: var(--black);
}

a:hover,
a:focus {
  color: var(--black);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--white);
  background-repeat: no-repeat;
  background-image: url("./images/bg-main-desktop.png");
  background-size: 100% 20em;
  @media screen and (min-width: 1440px) {
    background-size: contain;
  }
}

nav {
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logo img {
  width: 60%;
  @media screen and (min-width: 1440px) {
    width: 15%;
  }
}

.main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  margin-bottom: 54px;
  @media screen and (min-width: 1440px) {
    flex-direction: row;
    align-content: center;
    flex-wrap: wrap;
    height: 100%;
    min-height: 800px;
  }
}

.card-container,
.form-container {
  @media screen and (min-width: 1440px) {
    flex: 1;
    overflow: auto;
  }
}

.card-container {
  z-index: 3;
  display: flex;
  flex-direction: column-reverse;
  position: relative;
  width: 100%;
  padding: 1em 1em 0 1em;
  @media screen and (min-width: 1440px) {
    flex-direction: column;
    overflow: visible;
  }
}

.front-card-container {
  z-index: 2;
  width: 20em;
  height: 11em;
  border-radius: 0.5em;
  display: flex;
  flex-direction: column;
  justify-content: left;
  position: relative;
  top: -4em;
  padding: 1.5rem 0;
  background-image: url("./images/bg-card-front.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: rgba(0, 0, 0, 0.45) 0px 18px 50px -10px;
  @media screen and (min-width: 1440px) {
    justify-content: space-around;
    top: 0em;
    left: 16em;
  }
}

.front-card-container p {
  color: #fff;
  line-height: 0.5rem;
}

.front-card-container .top-row,
.front-card-container .middle-row,
.front-card-container .last-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 1.5rem;
}

.top-row img {
  width: 4rem;
  margin-bottom: 1.5rem;
}

.middle-row {
  justify-content: center;
}

.middle-row p {
  font-size: 1.3rem;
  letter-spacing: 0.1rem;
}

.last-row {
  justify-content: space-between;
}

.last-row p {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.back-card-container {
  width: 20em;
  height: 11em;
  z-index: 1;
  background-image: url("./images/bg-card-back.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  align-self: flex-end;
  box-shadow: rgba(0, 0, 0, 0.45) 0px 18px 50px -10px;
  border-radius: 0.5em;
  @media screen and (min-width: 1440px) {
    margin-top: 2em;
  }
}

.back-card-container p {
  display: inline;
  position: relative;
  color: #fff;
  top: 4.7em;
  left: 15em;
}

form {
  display: block;
  font-size: 12px;
  @media screen and (min-width: 1440px) {
    width: 50%;
    margin: auto;
  }
}

.form-container {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  justify-content: center;
  align-items: center;
}

.card-container {
  z-index: 3;
  display: flex;
  flex-direction: column-reverse;
  position: relative;
  width: 100%;
  padding: 1em 1em 0 1em;
  @media screen and (min-width: 1440px) {
    flex-direction: column;
  }
}

.front-card-container {
  z-index: 2;
  width: 20em;
  height: 11em;
  border-radius: 0.5em;
  display: flex;
  flex-direction: column;
  justify-content: left;
  position: relative;
  top: -4em;
  padding: 1.5rem 0;
  background-image: url("./images/bg-card-front.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: rgba(0, 0, 0, 0.45) 0px 18px 50px -10px;
  @media screen and (min-width: 1440px) {
    justify-content: space-around;
    top: 0em;
    left: 16em;
  }
}

.front-card-container p {
  color: #fff;
  line-height: 0.5rem;
}

.front-card-container .top-row,
.front-card-container .middle-row,
.front-card-container .last-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 1.5rem;
}

.top-row img {
  width: 4rem;
  margin-left: 0.5rem;
  margin-bottom: 1.5rem;
}

.middle-row {
  justify-content: center;
}

.middle-row p {
  font-size: 1.3rem;
  letter-spacing: 0.1rem;
}

.last-row {
  justify-content: space-between;
}

.last-row p {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.back-card-container {
  width: 20em;
  height: 11em;
  z-index: 1;
  background-image: url("./images/bg-card-back.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  align-self: flex-end;
  box-shadow: rgba(0, 0, 0, 0.45) 0px 18px 50px -10px;
  border-radius: 0.5em;
  @media screen and (min-width: 1440px) {
    margin-top: 2em;
  }
}

.back-card-container p {
  display: inline;
  position: relative;
  color: #fff;
  top: 4.7em;
  left: 15em;
}

.card-details-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.expiration-date-container {
  display: flex;
  flex-direction: column;
}
.expiration-date-container__label {
  margin-bottom: 12px;
  /* font-size: 12px;
  white-space: nowrap;  */
}

.expiration-date-container__boxes {
  display: flex;
}

.expiry-input {
  width: 60%;
}

input[type="text"] {
  margin-right: 5px;
  padding: 12px;
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 20px;
}

.input-boxes {
  width: 100%;
}

.cvc-container {
  display: flex;
  flex-direction: column;
  width: 60%;
}

.cvc-container__label {
  margin-bottom: 12px;
}

.cvc-input {
  width: 100%;
}

label {
  display: block;
}

.btn {
  width: 100%;
  color: var(--white);
  background-color: var(--very-dark-violet);
  border-radius: 10px;
  padding: 0.75em 2em;
}

.thank-you-message {
  display: none;
  flex-direction: column;
  width: 50%;
  margin: auto;
}

.thank-you-message img {
  display: flex;
  width: 15%;
  margin: 0 auto;
}

.thank-you-message h2 {
  text-transform: uppercase;
  color: hsl(278, 68%, 11%);
}

.thank-you-message p {
  color: hsl(0, 0%, 48%);
}

footer {
  padding: 1em;
  margin-top: auto;
  border-top: 1px solid #d9d9d9;
  background-color: #fff;
}

footer p {
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.2em;
}

.error {
  color: #ff3860;
  font-size: 12px;
}

.input-control.error input {
  border-color: #ff3860;
}

.input-control input {
  border: 2px solid #f0f0f0;
  border-radius: 4px;
  display: block;
  font-size: 12px;
  padding: 10px;
  width: 100%;
}
