/**
 * store.css
 * Stripe Payments Demo. Created by Romain Huet (@romainhuet).
 */

/* Overall Container */

#main {
  width: 100%;
  height: 100vh;
  text-align: center;
  transition: width 0.3s ease-in-out;
}

#main.step2:not(.success):not(.error) {
  width: calc(100% - 450px);
}

/* step2 */

#step2 {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0;
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.5s linear 0.5s;
}


#step2 section {
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left;
}

#step2  h1 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 500;
}

#step2  h2 {
  margin: 15px 0;
  color: #32325d;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 13px;
  font-weight: 500;
}

/* Payment Request */

#payment-request {
  visibility: hidden;
  opacity: 0;
  min-height: 100px;
  padding: 20px 0;
  transition: visibility 0s, opacity 0.3s ease-in;
}

#payment-request.visible {
  visibility: visible;
  opacity: 1;
}

#payment-form {
  margin: 0 -30px;
  padding: 20px 30px;
  border-radius: 4px;
  border: 1px solid #e8e8fb;
}

/* Form */

#step2 fieldset,#step3 fieldset {
  margin-bottom: 20px;
  background: #fff;
  box-shadow: 0 1px 3px 0 rgba(50, 50, 93, 0.15),
    0 4px 6px 0 rgba(112, 157, 199, 0.15);
  border-radius: 4px;
  border: none;
  /*font-size: 0;*/
}

#step2 fieldset label,#step3 fieldset label {
  position: relative;
  display: flex;
  flex-direction: row;
  height: 42px;
  padding: 10px 0;
  align-items: center;
  justify-content: center;
  color: #8898aa;
  font-weight: 400;
  margin-bottom: 0.250rem;
}

#step2 fieldset label:not(:last-child),#step3 fieldset label:not(:last-child) {
  border-bottom: 1px solid #f0f5fa;
}

#step2 fieldset label.state,#step3 fieldset label.state {
  display: inline-flex;
  width: 100%;
}

#step2 fieldset:not(.with-state) label.state,#step3 fieldset:not(.with-state) label.state {
  display: none;
}

#step2 fieldset label.zip,#step3 fieldset label.zip {
  display: inline-flex;
  width: 100%;
  /*padding-right: 60px;*/
}

#step2 fieldset:not(.with-state) label.zip,#step3 fieldset:not(.with-state) label.zip {
  width: 100%;
}

#step2 fieldset label span,#step3 fieldset label span {
  min-width: 150px;
  padding: 0 15px;
  text-align: right;
}

#step2 fieldset .redirect label span,#step3 fieldset .redirect label span {
  width: 100%;
  text-align: center;
}

#step2 p.instruction,#step3 p.instruction {
  /*display: inline-table;*/
  margin-bottom: 0.5rem;
  padding: 0 5px;
  text-align: center;
  /*background: #f8fbfd;*/
  font-size: 14px;
  color: #525f7f;
}

#step2 p.tip,#step3 p.tip {
  margin: -10px auto 10px;
  padding: 5px 0 5px 30px;
  font-size: 14px;
  background: url(/images/tip.svg) left center no-repeat;
}

#step2 .field,#step3 .field {
  flex: 1;
  padding: 0 15px;
  background: transparent;
  font-weight: 400;
  color: #31325f;
  outline: none;
  cursor: text;
}

#step2 .field::-webkit-input-placeholder,#step3 .field::-webkit-input-placeholder {
  color: #aab7c4;
}
#step2 .field::-moz-placeholder,#step3 .field::-moz-placeholder {
  color: #aab7c4;
}
#step2 .field:-ms-input-placeholder,#step3 .field:-ms-input-placeholder {
  color: #aab7c4;
}

#step2 fieldset .select::after,#step3 fieldset .select::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 5px;
  right: 20px;
  top: 50%;
  margin-top: -2px;
  background-image: url(/images/dropdown.svg);
  pointer-events: none;
}

#step2 input,#step3 input {
  flex: 1;
  border-style: none;
  outline: none;
  color: #313b3f;
}

#step2 select,#step3 select {
  flex: 1;
  border-style: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  color: #313b3f;
  cursor: pointer;
  background: transparent;
}

#step2 select:focus,#step3 select:focus {
  color: #666ee8;
}


#step2 input:-webkit-autofill,
select:-webkit-autofill,#step3 input:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #666ee8;
  transition: background-color 100000000s;
  -webkit-animation: 1ms void-animation-out 1s;
}

.StripeElement--webkit-autofill {
  background: transparent !important;
}

#card-element {
  margin-top: -1px;
}

#ideal-bank-element {
  padding: 0;
}

#step2 button,#step3 button {
  display: block;
  border: 0;
  font-weight: 700;
  width: 100%;
  height: 40px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

#country {
  display: flex;
  align-items: center;
}

#country select {
  margin: 0 -15px 0 -30px;
  padding: 0 15px 0 30px;
}

#country::before {
  display: inline-flex;
  content: '';
  width: 21px;
  height: 15px;
  background: url(/static/img/flags.svg);
  background-position: -475px -135px;
  background-repeat: no-repeat;
  margin-right: 10px;
}

#country.at::before {
  background-position: -165px -10px;
}
#country.au::before {
  background-position: -196px -10px;
}
#country.be::before {
  background-position: -227px -10px;
}
#country.br::before {
  background-position: -351px -10px;
}
#country.ca::before {
  background-position: -382px -10px;
}
#country.ch::before {
  background-position: -475px -10px;
}
#country.cn::before {
  background-position: -41px -35px;
}
#country.de::before {
  background-position: -134px -35px;
}
#country.dk::before {
  background-position: -196px -35px;
}
#country.es::before {
  background-position: -320px -35px;
}
#country.eu::before {
  background-position: -351px -35px;
}
#country.fi::before {
  background-position: -382px -35px;
}
#country.fr::before {
  background-position: -413px -35px;
}
#country.gb::before {
  background-position: -475px -35px;
}
#country.hk::before {
  background-position: -41px -60px;
}
#country.ie::before {
  background-position: -196px -60px;
}
#country.it::before {
  background-position: -351px -60px;
}
#country.jp::before {
  background-position: -444px -60px;
}
#country.lu::before {
  background-position: -258px -85px;
}
#country.mx::before {
  background-position: -475px -85px;
}
#country.nl::before {
  background-position: -103px -110px;
}
#country.no::before {
  background-position: -134px -110px;
}
#country.nz::before {
  background-position: -165px -110px;
}
#country.pt::before {
  background-position: -413px -110px;
}
#country.se::before {
  background-position: -103px -135px;
}
#country.sg::before {
  background-position: -134px -135px;
}
#country.us::before {
  background-position: -475px -135px;
}

/* Payment Methods */

#payment-methods {
  margin: 0 0 20px;
  border-bottom: 2px solid #e8e8fb;
}

#payment-methods li {
  display: none;
}

#payment-methods li.visible {
  display: inline-block;
  margin: 0 20px 0 0;
  list-style: none;
}

#payment-methods input {
  display: none;
}

#payment-methods label {
  display: flex;
  flex: 1;
  cursor: pointer;
}

#payment-methods input + label {
  position: relative;
  padding: 5px 0;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
}

#payment-methods label::before {
  content: '';
  position: absolute;
  width: 100%;
  bottom: -2px;
  left: 0;
  border-bottom: 2px solid #6772e5;
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.25s ease-in-out;
}

#payment-methods label:hover {
  color: #6772e5;
  cursor: pointer;
}

#payment-methods input:checked + label {
  color: #6772e5;
}

#payment-methods label:hover::before,
#payment-methods input:checked + label::before {
  opacity: 1;
  transform: scaleX(1);
}

#payment-methods,
.payment-info {
  display: none;
}

.payment-info:not(.card) {
  margin-bottom: 15px;
}

.payment-info.ideal {
  margin-bottom: 0;
}

#payment-methods.visible,
.payment-info.visible {
  display: block;
}

.payment-info.card.visible,
.payment-info.sepa_debit.visible {
  text-align: center;
}

.payment-info p.notice {
  font-size: 14px;
  color: #8898aa;
  text-align: left;
}

#wechat-qrcode img {
  margin: 0 auto;
}

.element-errors {
  display: inline-flex;
  height: 20px;
  margin: 15px auto 0;
  padding-left: 20px;
  color: #e25950;
  opacity: 0;
  transform: translateY(10px);
  transition-property: opacity, transform;
  transition-duration: 0.35s;
  transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
  background: url(/images/error.svg) center left no-repeat;
  background-size: 15px 15px;
}

.element-errors.visible {
  opacity: 1;
  transform: none;
}

.card-number {
  padding-left: 8px;
  white-space: nowrap;
  font-family: Source Code Pro, monospace;
  color: #0d2b3e;
  font-weight: 500;
}

.card-number span {
  display: inline-block;
  width: 8px;
}

/* Media Queries */

@media only screen and (max-width: 1024px) {
  #main.step2:not(.success):not(.error) {
    width: calc(100% - 320px);
  }
  #main.step2:not(.success):not(.error) + #summary {
    right: 0;
  }
}
@media only screen and (max-height: 375px) {
  #step1Content{
    display: none !important;
  }
}
@media only screen and (max-width: 800px) {
  #main.step2:not(.success):not(.error) {
    width: 100%;
  }
  #payment-request {
    padding-top: 0;
    min-height: 80px;
  }
  #summary {
    display: none;
  }
  #confirmation .status {
    width: auto;
    height: auto;
    margin: 30px;
  }
}

@media only screen and (max-width: 500px) {
  #payment-request {
    min-height: 0;
    padding-right: 15px;
    padding-left: 15px;
  }
  #payment-form {
    margin: 0;
    padding: 0 15px;
    border-width: 2px 0 0 0;
    border-radius: 0;
  }
  .payment-info span {
    display: none;
  }
  #step2 fieldset {
    margin-bottom: 15px;
    font-size: 14px !important;
  }
  #step2 fieldset label.state,
  #step2 fieldset label.zip {
    display: flex;
    width: inherit;
    padding: 10px 0;
  }
  #step2 p.instruction {
    margin-top: -12px;
    font-size: 14px;
  }
  #step2 p.tip {
    margin-bottom: 0;
    font-size: 13px;
  }
  #country::before {
    display: none;
  }
  #step2 {
    margin-bottom: 0;
  }
  #confirmation .status {
    width: auto;
    height: auto;
    padding: 120px 15px 15px;
    background: #fff url(/images/order.svg) center 15px no-repeat;
    background-size: 68px 86px;
    box-shadow: 0 1px 3px 0 rgba(50, 50, 93, 0.15);
    border-radius: 6px;
  }
  #confirmation h1 {
    text-align: center;
  }
  #step2 button{
    margin-bottom: 80px;
  }
}
