/* Variables */
#authorization {
  border:3px solid red;
  background: radial-gradient(circle at bottom 1rem right 4rem, red 0%, pink 0%, transparent 0%);
  transition: all .5s linear;
  width: calc(100% - 6px - .5rem);
}

#authorization.ready {
  animation: authorization-focus 1s ease-out;
}

@keyframes authorization-focus {
  0% {
    background: radial-gradient(circle at bottom 1rem right 4rem, red 0%, pink 100%, transparent 0%);
  }
  80% {
    background: radial-gradient(circle at bottom 1rem right 4rem, red 0%, pink 5%, transparent 0%);
  }
  100% {
    background: radial-gradient(circle at bottom 1rem right 4rem, red 0%, pink 0%, transparent 0%);
  }
}

#authorization #accept-terms {
  width:75vw;
}
#authorization #accept-terms-box {
  width: calc(100% - .5rem);
  padding: .25rem
}
div.fieldWrapper>div#accept-terms-box>label {
    flex-grow: 5;
}
div.fieldWrapper>div#accept-terms-box>input[type=checkbox] {
    flex-grow: 0;
    width: 2rem;
    height: 2rem;
    align-self: flex-end;
}

#amountWrapper {
  width:100%;
  margin-bottom: .25rem;
}
#amountWrapper label {
  height:50px;
  display: inline-block;
  line-height: 50px;
  margin:0;
  padding:0;
  flex-grow: 1;
}
#amountWrapper #checkout-amount {
  float:right;
  height:50px;
  margin-bottom:0;
  width:8.5rem;
  background:#607d8b;
  position:relative;
  border-radius:10px;
  color:white;
  font-weight:900;
  /*border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;*/
}
#amountWrapper #checkout-amount:before {
  content:"";
  position:absolute;
  right:97%;
  top:3px;
  width:0;
  height:0;
  border-top:22px solid transparent;
  border-right:26px solid #607d8b;
  border-bottom:22px solid transparent;
}
#amountWrapper #checkout-dollar-sign {
  width:30px;
  height:50px;
  color:white;
  background-color: transparent;
  line-height: 50px;
  font-size: xx-large;
  padding-left:5px;
  display: inline-block;
}
#amountWrapper #checkout-amount-input {
  color:white;
  background-color: transparent;
  border:none;
  height:100%;
  width:6rem;
  text-align: right;
  font-size: xx-large;
  padding:0;
  margin:0;
  display: inline-block;
}

#amountWrapper input.InputElement::-webkit-input-placeholder,
#amountWrapper input.InputElement::placeholder {
  color: #aaa;
}

/* Buttons and links */
button#submit {
  font-size: 1.125rem;
  font-weight: bold;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
  border-radius:.5rem;
}
button#submit:hover {
  filter: contrast(115%);
}

button#submit:disabled {
  opacity: 0.5;
  cursor: default;
}

#card-error {
  position: absolute;
  left: 5rem;
  right: .25rem;
  bottom: 0;
  border-radius: .25rem;
  border: 2px solid #880000;
  background-color: rgb(255, 0, 0);
  color: white;
  text-align: left;
  font-size: 1rem;
  line-height: 1rem;
  margin: 0 0 .5rem;
  padding: .25rem;
  transition: all .2s ease;
  transform: scale(0);
}
#card-error.show {
  transform: scale(1);
}

#card-element {
  border-radius: 4px 4px 0 0 ;
  padding: 0;
  border: 1px solid rgba(50, 50, 93, 0.1);
  height: 2em;
  width: 100%;
  background: white;
  display: initial;
}

.result-message {
  line-height: 1rem;
  font-size: 1rem;
  margin: .25rem;
  margin-left: 6rem;
  margin-bottom: .5rem;
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
}
.result-message a {
  color: rgb(89, 111, 214);
  font-weight: 600;
  text-decoration: none;
}
.hidden {
  display: none;
}

/* doesn't exist, delete? */
#payment-request-button {
  margin-bottom: .5rem;
}

/* spinner/processing state, errors */
.spinner,
.spinner:before,
.spinner:after {
  border-radius: 50%;
}
.spinner {
  color: #ffffff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}
.spinner:before,
.spinner:after {
  position: absolute;
  content: "";
}
.spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #5469d4;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  -webkit-transform-origin: 10.4px 10.2px;
  transform-origin: 10.4px 10.2px;
  -webkit-animation: loading 2s infinite ease 1.5s;
  animation: loading 2s infinite ease 1.5s;
}
.spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #5469d4;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  -webkit-transform-origin: 0px 10.2px;
  transform-origin: 0px 10.2px;
  -webkit-animation: loading 2s infinite ease;
  animation: loading 2s infinite ease;
}
@-webkit-keyframes loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@media only screen and (max-width: 600px) {
  form {
    width: 80vw;
  }
}

#checkout {
  overflow: hidden;
  transform: scale(1,0);
  transform-origin: top;
  transition: all .5s ease;
}

#checkout.show {
  transform: scale(1,1);
}

div#accept-terms-box>label>span.fat-terms-arrow {
  color: red;
  font-size:2rem;
  display: inline-block;
  transform-origin: left;
  margin-right: 1rem;
  margin-top: .25rem;
  vertical-align: top;
}

div#accept-terms-box>label>span.fat-terms-arrow.animate {
  animation: grower 1s infinite ease;
}

@keyframes grower {
  0% {
    transform: scale(.5,1);
  }
  50% {
    transform: scale(2,1);
  }
  100% {
    transform: scale(.5,1);
  }
}

.superbold {
  font-weight: 900;
  color: red;
  padding-inline: .25rem;
}

div#billing-information {
    display: block;
}


div.image-and-label-wrapper {
  flex-direction: column;
  position: relative;
}

button.input-modifier {
  all: unset;
  z-index: 3;
  position: absolute;
  display: grid;
  align-content: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  aspect-ratio: 1;
  font-size: 2rem;
  padding: 0 0.25rem 0.25rem 0.25rem;
  border-radius: 0.5rem;
  color: var(--text-color-bright);
  background-color: rgb(0% 0% 0% / .5);
  user-select: none;
}

button[name="rotate-left"] {
  bottom: .25rem;
  right: 5.75rem;
  transform: scaleX(-1);
}

button[name="rotate-right"] {
  bottom: .25rem;
  right: 3rem;
}

button[name="take-photo"] {
  bottom: .25rem;
}

button[name="zoom-in"] {
  top: 1rem;
  right: 0rem;
  height: 1rem;
  padding: .25rem .25rem .5rem;
  transform: rotate(-90deg);
}

button[name="zoom-out"] {
  bottom: 1rem;
  right: 0rem;
  height: 1rem;
  padding: .25rem .25rem .5rem;
  transform: rotate(-90deg) scaleX(-1);
}

div.identity-image-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1.59fr);
  grid-template-rows: repeat(3, 1fr);
  grid-column-gap: 1rem;
  grid-row-gap: 1rem;
}

div.identity-image-snapshot {
  aspect-ratio: 1.59/1;
  display: grid;
  position: relative;
  align-items: start;
  justify-items: center;
  border-radius: .5rem;
  overflow: clip;
  width: inherit;
}

div.identity-image-snapshot img {
  width: inherit;
  position: absolute;
  top: 0;
  left: 0;
}

div.identity-image-front {
  grid-area: 1 / 1 / 2 / 2;
}
div.identity-image-back {
  grid-area: 1 / 2 / 2 / 3;
}
div.identity-image-canvas {
  grid-area: 2 / 1 / 4 / 3;
}

div.identity-image-canvas {
  width: 100%;
  border-radius: 1rem;
  box-shadow: var(--section-box-shadow);
  border: 2px dashed gray;
  color: var(--text-color-bright);
  background-color: var(--background-color);
}

div.identity-image-snapshot p {
  z-index: 0;
  position: absolute;
  padding: .25rem .5rem;
  margin: .25rem;
  border-radius: .25rem;
  color: var(--text-color-medium-dark);
  background-color: var(--article-background-color);
  text-shadow: 0 0 1px white;
  opacity: .7;
  font-size: small;
}

div.identity-image-snapshot p.text-zoom {
  right: .25rem;
  top: calc(50% - 1.5rem);
  padding: .125rem .25rem;
  writing-mode: vertical-lr;
}

div.identity-image-canvas canvas {
  z-index: 2;
  position: absolute;
/*  aspect-ratio: 1.59/1;*/
  object-fit: contain;
  border-radius: 1rem;
  width: inherit;
  height: inherit;
}
div.identity-image-canvas img.hidden-source {
  display: none;
}


div.image-and-label-wrapper input {
  width: 100%;
}
