/* Match the screenshot look: simple serif, soft shadows, gray cards */
:root{
  --bg: #ffffff;
  --card: #d7d7d7;
  --shadow: rgba(0,0,0,.35);
  --shadow2: rgba(0,0,0,.25);
  --ink: #111;
  --border: #8a8a8a;
  --input-border: #9c9c9c;
  --input-text: #6f6f6f;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  background: var(--bg);
  font-family: "Times New Roman", Times, serif;
  color: var(--ink);
}

.stage{
  position: relative;
  width: 604px;
  height: 420px;
  margin: 0 auto;
  padding-top: 10px;
}

/* Cards */
.card{
  position:absolute;
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 6px 10px var(--shadow);
}

.card-front{
  width: 500px;
  height: 250px;
  left: 40px;
  top: 35px;
  padding: 18px 18px 0 18px;
  z-index: 2;
}

.card-back{
  width: 510px;
  height: 250px;
  left: 155px;   
  top: 95px;
  z-index: 1;
  box-shadow: 0 6px 10px var(--shadow2);
}


/* Front content */
.total{
  margin: 0;
  font-size: 18px;
}

.mini-card{
  position:absolute;
  right: 44px;
  top: 18px;
  width: 56px;
  height: 40px;
  border: 1px solid #bdb58e;
  background: #efe3a7;
  box-shadow: 1px 1px 0 rgba(0,0,0,.15);
}
.mini-card__stripe{
  position:absolute;
  left: 3px;
  top: 6px;
  width: 50px;
  height: 8px;
  background: #2b6cb0;
}
.mini-card__line{
  position:absolute;
  left: 6px;
  height: 2px;
  background: rgba(0,0,0,.35);
}
.mini-card__line--1{ top: 22px; width: 32px; }
.mini-card__line--2{ top: 28px; width: 24px; }

#cc-form{
  position:absolute;
  left: 18px;
  top: 60px;
  width: calc(100% - 36px);
}

.field label{
  display:block;
  font-size: 16px;
  letter-spacing: .4px;
  margin: 0 0 6px 0;
}

.field input{
  width: 300px;
  height: 34px;
  border: 2px solid var(--input-border);
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--input-text);
  background: #fff;
  outline: none;
}

.field input:focus{
  border-color: #6b6b6b;
}

.field-number{ margin-left: 0; }

.field-holder{
  position:absolute;
  left: 0;
  top: 82px;
}
.field-holder input{ width: 275px; }

.field-exp{
  position:absolute;
  left: 290px;
  top: 82px;
}

.field-exp .exp-label{ margin-bottom: 6px; }

.exp-row{
  display:flex;
  gap: 12px;
}

.exp-row input{
  width: 60px;
  text-align: left;
}

/* Back content */
.mag-stripe{
  position:absolute;
  left: 0;
  top: 22px;
  width: 100%;
  height: 46px;
  background:#000;
}

.cvc-block{
  position:absolute;
  right: 5px; /* was 34px */
  top: 98px;
  width: 110px;
  text-align:left;
}


.cvc-block label{
  display:block;
  font-size: 16px;
  margin-bottom: 6px;
  letter-spacing: .4px;
}

.cvc-block input{
  width: 110px;
  height: 34px;
  border: 2px solid var(--input-border);
  border-radius: 2px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--input-text);
  background: #fff;
  outline:none;
}

/* Submit button */
.submit{
  position:absolute;
  right: 10px;   /* was 44px */
  bottom: 10px;  /* was 34px */
  width: 110px;
  height: 40px;
  border: 2px solid #3a3a3a;
  border-radius: 6px;
  background: #f2f2f2;
  font-family: inherit;
  font-size: 16px;
  box-shadow: 3px 3px 0 rgba(0,0,0,.25);
  cursor:pointer;
}

.submit:active{ transform: translate(1px,1px); box-shadow: 2px 2px 0 rgba(0,0,0,.25); }

/* Accessible helpers */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Modal popup */
.modal{
  position:fixed;
  inset: 0;
  display:none;
  z-index: 50;
}
.modal[aria-hidden="false"]{ display:block; }

.modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.35);
}

.modal__dialog{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width: 420px;
  background:#fff;
  border: 2px solid #3a3a3a;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
  padding: 16px 16px 12px 16px;
}

.modal__title{
  margin: 0 0 8px 0;
  font-size: 18px;
}

.modal__body{
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.modal__close{
  display:block;
  margin-left:auto;
  width: 80px;
  height: 34px;
  border: 2px solid #3a3a3a;
  border-radius: 6px;
  background: #f2f2f2;
  font-family: inherit;
  font-size: 16px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.2);
  cursor:pointer;
}

.modal__close:active{ transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,.2); }
