html {
  box-sizing: border-box;
}

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

html,
body {
  font: 16px/32px sans-serif;
  color: #000;
  background-color: #2991a8;
  text-transform: uppercase;
}

.container {
  min-height: 25rem;
  padding: 3rem 0;
}

.container-cvv {
  min-height: 15rem;
  padding: 3rem 0;
}

.container-cvv .card.cvv {
  padding: 1rem 1.5rem;
}

.container-cvv .card.cvv .card__field--cvv {
  width: 65px;
}

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

.expiry-cvv {
  display: flex;
}

.expiry-cvv .first, .expiry-cvv .last {
  display: flex;
  align-content: center;
  align-items: flex-end;
}

.expiry-cvv label {
  background: url(../img/arrow.svg) no-repeat center right;
}

.expiry-cvv .first {
  width: 40%;
}

.expiry-cvv .first .card__field--label {
  width: 50px;
}

.expiry-cvv .last {
  width: 40%;
}

.token {
  text-align: center;
  color: #fff;
  max-width: 100%;
  transition: all 0.3s linear 1s;
  display: flex;
  justify-content: center;
}

.token p {
  overflow: auto;
  margin: 0;
  font-size: 0.425rem;
  border-radius: 5px;
  text-align: center;
  max-width: 26.75rem;
  display: inline-block;
  word-wrap: break-word;
  line-height: 0.8rem;
  padding: 0.2rem;
  height: fit-content;
}

.token p.success {
  background: green;
}

.token p.error {
  background: red;
}

.card {
  position: relative;
  width: 28.75rem;
  min-height: 18rem;
  background: url(../img/chip.png) no-repeat 1.4rem 6.5rem;
  background-color: #1b1b6f;
  padding: 1rem 1.5rem 0 1.5rem;
  margin: 0.5rem auto;
  border-radius: 0.75rem;
  box-shadow: 3px 3px 1rem 0 rgba(0, 0, 0, 0.1);
}

.card.cvv {
  min-height: auto;
  width: 16.25rem;
}

.card .card__form.visa .card__type {
  background: url(../img/visa-logo.png) no-repeat right;
}

.card .card__form.mastercard .card__type {
  background: url(../img/master-card-logo.png) no-repeat right;
}

.card .card__form.amex .card__type {
  background: url(../img/amex-logo.png) no-repeat right;
}

.card .card__type {
  position: relative;
  background: url(../img/cards-logo.png) no-repeat;
  background-position: right;
  display: block;
  width: auto;
  height: 2.5rem;
  margin-bottom: 6rem;
}

.card__field--label {
  font-size: 0.675rem;
  color: white;
  line-height: .8rem;
  margin-top: 1rem;
  margin-right: .5rem;
  padding-right: .5rem;
  letter-spacing: 1px;
}

.card .card__field {
  border-bottom: 1px solid #cccccc;
  margin-bottom: .5rem;
  position: relative;
  height: 2rem;
  display: flex;
  align-items: center;
}

.card .card__field--cvv, .card .card__field--expiry {
  height: 1.5rem;
}

.card .card__field--cvv {
  width: 50px;
}

.card .card__field--expiry {
  width: 65px;
}

.card .card__field.is-onfocus {
  border-bottom: 1px solid #cccccc;
}

.card .card__field.is-invalid {
  border-bottom: 1px solid red;
  color: red;
}

.card .card__field.card__field--pan input {
  font-size: 1.75rem;
}

.card .card__field:last-child {
  margin-bottom: 0;
}

.card .card__form .card__submit {
  background: transparent;
  position: absolute;
  cursor: pointer;
  right: 10px;
  bottom: -5rem;
  width: 40%;
  background-color: white;
  display: block;
  outline: 0;
  border: 0;
  margin-left: -120px;
  color: #012834;
  outline: 0;
  font-size: 1.125rem;
  line-height: 1.5rem;
  border-radius: 1.875rem;
  font-weight: bold;
  padding: 1rem 0;
  transition: background 0.3s ease;
}

.card .card__form .card__submit:focus,
.card .card__form .card__submit:hover {
  background-color: #ccc;
}

.clear:hover {
  background-color: white;
}

.clear {
  background: transparent;
  position: absolute;
  cursor: pointer;
  left: 130px;
  bottom: -5rem;
  width: 40%;
  background-color: grey;
  display: block;
  outline: 0;
  border: 0;
  margin-left: -120px;
  color: black;
  outline: 0;
  font-size: 1.125rem;
  line-height: 1.5rem;
  border-radius: 1.875rem;
  font-weight: bold;
  padding: 1rem 0;
  transition: background 0.3s ease;
}
