/* ==========================================================================
   Certificates Purchase Page CSS
   ========================================================================== */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.certificates-purchase-page {
  box-sizing: border-box;
}

#PurchaseForm {
  box-sizing: border-box;
}

/* ==========================================================================
   Analyzer Fieldset
   ========================================================================== */

fieldset.analyzer {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  margin-left: 20px;
  border: none;
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
  background-color: rgb(240, 240, 240);
  padding: 30px;
  width: calc(100% - 40px);
  max-width: calc(100% - 40px);
  overflow: hidden;
}

fieldset.analyzer > legend {
  margin-left: 10px;
}

.analyzer legend {
  background-color: #9a6363;
  padding: 0.75rem;
  font-size: 1.3rem;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  transform: translateX(-1.1rem);
  box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.8);
  position: relative;
}

.analyzer legend:after {
  content: "";
  height: 0;
  width: 0;
  background-color: transparent;
  border-top: 0.0rem solid transparent;
  border-right: 0.35rem solid black;
  border-bottom: 0.45rem solid transparent;
  border-left: 0.0rem solid transparent;
  position: absolute;
  left: -0.075rem;
  bottom: -0.45rem;
}

/* ==========================================================================
   Station Fieldset
   ========================================================================== */

.station--fieldset {
  border: 1px inset black;
  border-radius: 3px;
  padding: 35px;
  margin-bottom: 35px;
  overflow: hidden;
}

.station--fieldset:last-child {
  margin-bottom: 0px;
}

.station--fieldset > legend {
  width: auto;
  padding: 0 30px;
}

.station--fieldset .row > .w-100 {
  flex-basis: 100%;
  width: 100%;
}

/* ==========================================================================
   Payment Method Section
   ========================================================================== */

.payment-method {
  min-height: 60px;
  padding-bottom: 30px;
}

.payment-method legend {
  font-size: 20px;
  background: white;
  width: auto;
  padding: 0 20px;
}

.certificate-total-box {
  width: 100%;
  max-width: 100%;
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
  margin-top: 20px;
  background: white;
  padding: 20px;
  border-radius: 2px;
  text-align: right;
}

/* ==========================================================================
   Payment Sprite Images
   ========================================================================== */

.sprite-purchase {
  width: 11.8125rem;
  height: 10.6875rem;
  max-width: 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  overflow: hidden;
}

.sprite-purchase-bank {
  background-image: url(/img/sprite-purchase-bank.png);
  background-size: 35.4375rem 10.6875rem;
}

.sprite-purchase-card {
  background-image: url(/img/sprite-purchase-card.png);
  background-size: 35.4375rem 10.6875rem;
}

.sprite-purchase.disabled {
  display: block;
  background-position-x: -11.8125rem;
}

.sprite-purchase.enabled:hover,
.sprite-purchase.selected {
  background-position-x: -23.625rem;
}

.station--fieldset .col-auto .sprite-purchase {
  margin-right: 15px;
  flex-shrink: 0;
}

.station--fieldset .col-auto {
  min-width: 0;
}

/* ==========================================================================
   Form Utility Classes
   ========================================================================== */

.cert-form-group-margin {
  margin-bottom: 34px;
}

.cert-station-change-label {
  margin-top: 17px;
  margin-bottom: 15px;
}

.cert-station-fieldset-margin {
  margin-bottom: 35px;
}

.cert-analyzer-fieldset-margin {
  margin-bottom: 25px;
}

.cert-total-auth-margin {
  margin-right: 25px;
}

.cert-info-message {
  line-height: 180%;
  font-style: italic;
}

.cert-payment-method-legend {
  width: auto;
  padding: 20px;
  font-size: 20px;
  text-decoration: underline;
}

.cert-radio-font-size {
  font-size: 17px;
}

.cert-payment-method-text {
  margin-left: -5px;
  margin-top: 18px;
  font-size: 13.5px;
}

.cert-purchase-quantity-select {
  max-width: 220px;
}

.cert-price-column {
  padding-top: 7px;
}

.cert-payment-radio-column {
  padding-top: 70px;
}

.cert-submit-button {
  min-width: 200px;
  margin-top: 50px;
}

/* ==========================================================================
   Mobile Responsive Styles (max-width: 768px)
   ========================================================================== */

@media only screen and (max-width: 768px) {
  /* Mobile spacer utility for payment method sprites */
  .margin-top-spacer {
    margin-top: 20px !important;
  }

  .certificates-purchase-page {
    margin: 0;
    padding: 0 10px;
  }

  .station--fieldset {
    padding: 20px 15px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding-right: 15px;
  }

  .station--fieldset > legend {
    padding: 0 15px;
    font-size: 1.1rem;
  }

  .station--fieldset .row {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
  }

  /* Radio button column */
  .station--fieldset .col-auto.cert-payment-radio-column {
    padding-top: 0;
    margin-bottom: 0;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    align-items: center;
  }

  .station--fieldset .col-auto.cert-payment-radio-column .radio {
    display: flex;
    align-items: center;
    margin: 0;
  }

  /* Sprite column */
  .station--fieldset .row > .col-auto.cert-payment-radio-column + .col-auto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    margin-left: 10px;
    margin-top: 0;
    width: auto;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    min-width: 0;
  }

  .station--fieldset .sprite-purchase {
    flex-shrink: 0;
    margin-bottom: 8px;
    margin-left: 0;
    margin-right: 0;
  }

  .station--fieldset .col-auto > .cert-payment-method-text,
  .station--fieldset .col-auto > div {
    margin-left: 0;
    margin-top: 0;
    max-width: 100%;
    width: 100%;
    text-align: left;
  }

  /* Analyzer fieldset */
  fieldset.analyzer {
    margin-left: 0;
    padding: 20px 15px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  fieldset.analyzer * {
    max-width: 100%;
  }

  .analyzer legend {
    font-size: 1.1rem;
    padding: 0.5rem;
    transform: translateX(-0.5rem);
  }

  fieldset.analyzer .form-control.purchase-quantity.cert-purchase-quantity-select,
  fieldset.analyzer .form-control.purchase-quantity {
    max-width: 100%;
    width: 100%;
  }

  fieldset.analyzer .form-group,
  fieldset.analyzer .col-auto {
    max-width: 100%;
    overflow: visible;
    width: 100%;
  }

  fieldset.analyzer .container {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  fieldset.analyzer .row {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  fieldset.analyzer .purchase-quantity {
    margin-bottom: 5px;
  }

  fieldset.analyzer .row > .col.cert-price-column,
  fieldset.analyzer .container .row > .col {
    width: 100%;
    max-width: 100%;
    padding-top: 10px;
    padding-left: 0;
    padding-right: 0;
    margin-top: 10px;
  }

  fieldset.analyzer .row > .col,
  fieldset.analyzer .row > .col-auto {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* Payment method */
  .payment-method {
    padding: 15px;
    padding-bottom: 25px;
    width: 100%;
    max-width: 100%;
  }

  .payment-method legend {
    font-size: 18px;
    padding: 0 15px;
  }

  .certificate-total-box {
    padding: 15px;
  }

  /* Sprite sizing */
  .sprite-purchase {
    width: 9.375rem;
    height: 8.5rem;
  }

  .sprite-purchase-bank,
  .sprite-purchase-card {
    background-size: 28.125rem 8.5rem;
  }

  .sprite-purchase.disabled {
    background-position-x: -9.375rem;
  }

  .sprite-purchase.enabled:hover,
  .sprite-purchase.selected {
    background-position-x: -18.75rem;
  }
}
