/* KINGTV CHECKOUT FINAL REVIEW FIX V6
   CSS only. Final checkout alignment, headings, terms row and sidebar cleanup.
   No JS. No payment values, gateway order, captcha, terms or order logic changes. */

/* Keep checkout centered and stable. */
#order-standard_cart form#frmCheckout {
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Restore desktop sidebar panel contents. */
#order-standard_cart .sidebar .panel,
#order-standard_cart .sidebar .panel-collapse,
#order-standard_cart .sidebar .panel-collapse.collapse,
#order-standard_cart .sidebar .panel-body,
#order-standard_cart .sidebar .list-group {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#order-standard_cart .sidebar .list-group-item {
  display: block !important;
  height: auto !important;
  min-height: 44px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Final section heading system. Centered title with a calm divider behind it. */
#order-standard_cart form#frmCheckout .sub-heading {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 34px !important;
  margin: 46px 0 26px !important;
  padding: 0 !important;
  border: 0 !important;
  text-align: center !important;
  line-height: 1 !important;
  overflow: visible !important;
  z-index: 2 !important;
}

#order-standard_cart form#frmCheckout .sub-heading:before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 50% !important;
  height: 1px !important;
  transform: translateY(-50%) !important;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.34), transparent) !important;
  z-index: 0 !important;
}

#order-standard_cart form#frmCheckout .sub-heading:after {
  display: none !important;
  content: none !important;
}

#order-standard_cart form#frmCheckout .sub-heading span {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: calc(100% - 48px) !important;
  margin: 0 auto !important;
  padding: 8px 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(30,58,138,0.92), rgba(15,35,88,0.96)) !important;
  border: 1px solid rgba(96,165,250,0.28) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  text-align: center !important;
  box-shadow: 0 8px 18px rgba(2,6,23,0.18) !important;
}

/* Do not let any fields clip icons or headings. */
#order-standard_cart form#frmCheckout .row,
#order-standard_cart form#frmCheckout .prepend-icon,
#order-standard_cart form#frmCheckout .field-container {
  overflow: visible !important;
}

#order-standard_cart form#frmCheckout .field-container {
  margin-bottom: 18px !important;
}

/* Slightly reduce dense payment help panel text. */
#order-standard_cart #paymentGatewaysContainer > div:first-child:not(.ktv-v488-gateway-grid):not(#creditCardInputFields) h3,
#order-standard_cart #paymentGatewaysContainer > div:first-child:not(.ktv-v488-gateway-grid):not(#creditCardInputFields) h4 {
  margin-bottom: 10px !important;
}

#order-standard_cart #paymentGatewaysContainer > div:first-child:not(.ktv-v488-gateway-grid):not(#creditCardInputFields) p,
#order-standard_cart #paymentGatewaysContainer > div:first-child:not(.ktv-v488-gateway-grid):not(#creditCardInputFields) span {
  line-height: 1.5 !important;
}

/* Gateway cards final readability. */
#order-standard_cart .ktv-v488-gateway-card {
  min-height: 132px !important;
}

#order-standard_cart .ktv-v488-gateway-desc {
  line-height: 1.48 !important;
}

/* Terms row. Keep checkbox, sentence and link on one clean line when possible. */
#order-standard_cart .accepttos,
#order-standard_cart .checkbox-inline {
  display: block !important;
  width: 100% !important;
  max-width: 640px !important;
  margin: 18px auto 0 !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

#order-standard_cart .accepttos input[type="checkbox"],
#order-standard_cart .checkbox-inline input[type="checkbox"] {
  position: static !important;
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  margin: 0 10px 0 0 !important;
  vertical-align: middle !important;
  flex: none !important;
}

#order-standard_cart .accepttos a,
#order-standard_cart .checkbox-inline a {
  display: inline !important;
  white-space: normal !important;
}

/* Captcha and button spacing. */
#order-standard_cart .recaptcha-container,
#order-standard_cart .g-recaptcha {
  margin-top: 18px !important;
}

#order-standard_cart #btnCompleteOrder {
  margin-top: 18px !important;
}

/* Security message should stay readable, not oversized. */
#order-standard_cart .checkout-security-msg {
  margin-top: 28px !important;
  max-width: 900px !important;
}

/* Mobile specific finishing. */
@media (max-width: 767px) {
  #order-standard_cart form#frmCheckout {
    max-width: 100% !important;
  }

  #order-standard_cart form#frmCheckout .sub-heading {
    margin: 44px 0 26px !important;
    min-height: 34px !important;
  }

  #order-standard_cart form#frmCheckout .sub-heading:first-of-type {
    margin-top: 42px !important;
  }

  #order-standard_cart form#frmCheckout .sub-heading span {
    max-width: calc(100% - 42px) !important;
    padding: 8px 18px !important;
    font-size: 15px !important;
  }

  #order-standard_cart #paymentGatewaysContainer > div:first-child:not(.ktv-v488-gateway-grid):not(#creditCardInputFields) {
    padding: 20px 18px !important;
  }

  #order-standard_cart .ktv-v488-gateway-card {
    min-height: 0 !important;
    padding: 18px !important;
  }

  #order-standard_cart .accepttos,
  #order-standard_cart .checkbox-inline {
    max-width: 300px !important;
    margin-top: 20px !important;
    text-align: center !important;
    font-size: 13px !important;
  }

  #order-standard_cart .accepttos input[type="checkbox"],
  #order-standard_cart .checkbox-inline input[type="checkbox"] {
    margin-right: 8px !important;
  }

  #order-standard_cart .recaptcha-container,
  #order-standard_cart .g-recaptcha {
    max-width: 100% !important;
    overflow: hidden !important;
  }
}
