/**
 * Checkout page styling — matches the plugin's blue/black/white palette
 * and the theme's Rubik body font. Targets WooCommerce Blocks' real
 * class names (wc-block-*), since /checkout/ runs the Block checkout,
 * not the classic shortcode template.
 */

.wc-block-checkout,
.wc-block-checkout * {
  font-family: 'Rubik', sans-serif;
}

/* Same warm paper tone already approved for the Enroll page — keeps the purchase funnel
   (Enroll → Checkout) visually consistent instead of white. Breakout trick again since this
   block sits inside the theme's centered container, narrower than the full browser width. */
.wc-block-checkout {
  position: relative;
  z-index: 0;
  padding: 24px 20px;
}

.wc-block-checkout::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #fbf7f0;
  z-index: -1;
}

.wc-block-components-checkout-step__title {
  color: #056cd3;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wc-block-components-checkout-step__heading-content .wc-block-components-checkout-step__description {
  font-size: 13.5px;
  color: #4c6b85;
  line-height: 1.55;
}

.wc-block-components-text-input label,
.wc-block-components-address-form label {
  font-size: 13px;
  font-weight: 600;
}

.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-address-form input[type="text"] {
  border-radius: 9px;
  font-size: 15px;
  min-height: 46px;
}

.wc-block-components-text-input input:focus,
.wc-block-components-address-form input:focus {
  border-color: #056cd3 !important;
  box-shadow: 0 0 0 1px #056cd3 !important;
}

/* --- Billing field order — WooCommerce Blocks has no server-side API to reorder core checkout
   fields or to interleave a custom (Additional Fields API) field between two core ones; a custom
   field always renders after every core field in its location. .wc-block-components-address-form
   is a flex container (confirmed in WooCommerce's own checkout.css) and every field inside it gets
   a stable className of wc-block-components-address-form__{field_key} (confirmed in WooCommerce's
   own checkout.js), so `order` here is a supported, standard way to control visual sequence without
   touching WooCommerce core files. Requested sequence: First Name, Last Name, Company,
   Job Title, Phone, Address, Country, City, Postal Code, State/County. --- */
.wc-block-components-address-form__first_name { order: 10; }
.wc-block-components-address-form__last_name { order: 20; }
.wc-block-components-address-form__company { order: 30; }
.wc-block-components-address-form__edge-member-platform-job-title { order: 40; }
.wc-block-components-address-form__phone { order: 50; }
.wc-block-components-address-form__address_1 { order: 60; margin-bottom: 20px; }
.wc-block-components-address-form__country { order: 70; }
.wc-block-components-address-form__state { order: 80; }
.wc-block-components-address-form__city { order: 90; }
.wc-block-components-address-form__postcode { order: 100; }

/* Country and State/County share a row like City/Postcode already do — but only text inputs get that
   50%-pairing width by default in WooCommerce's own CSS; Country (a <select>) and State (a locale-
   dependent select/text component) don't, so without this they'd each take a full row on their own. */
.wc-block-components-address-form__country,
.wc-block-components-address-form__state {
  flex: 1 0 calc(50% - 12px);
}

/* --- Confirm Password — injected next to Block Checkout's native "Create a password" field, since
   WooCommerce Blocks doesn't offer a hook to add a matching field into that step server-side
   (see public/js/edge-checkout-confirm-password.js). --- */

.edge-checkout-confirm-password {
  margin-top: -4px;
}

.edge-checkout-field-match {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: #08a34f;
}

.edge-checkout-field-error {
  margin-top: 6px;
  font-size: 12.5px;
  color: #c0392b;
}

/* --- Account summary: once email/password arrive pre-filled from [edge_auth] Sign Up, the raw
   fields collapse behind this one confirmed line instead of asking the member to look at (and
   re-confirm) what they just typed a moment ago. Fields stay in the DOM with real values — only
   display changes — so Block Checkout's own validation/submit never notices anything happened. --- */

.edge-account-field-collapsed {
  display: none !important;
}

.edge-account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f2fbff;
  border: 1px solid #b8e6fb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.edge-account-summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #08a34f;
  color: #fff;
  flex-shrink: 0;
}

.edge-account-summary-text {
  flex: 1;
  color: #14181f;
}

.edge-account-summary-text strong {
  font-weight: 700;
}

.edge-account-summary-edit {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #056cd3;
  cursor: pointer;
  text-decoration: underline;
}

.wc-block-components-radio-control__input:checked {
  border-color: #056cd3;
}

.wc-block-components-radio-control__input:checked:before {
  background: #056cd3;
}

.wc-block-components-checkbox__input:checked + .wc-block-components-checkbox__mark {
  fill: #056cd3;
}

.wc-block-components-checkbox__label {
  font-size: 13px;
  line-height: 1.6;
}

.wc-block-components-checkout-place-order-button {
  background-color: #056cd3 !important;
  border-color: #056cd3 !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9px;
}

.wc-block-components-checkout-place-order-button:hover {
  background-color: #000 !important;
  border-color: #000 !important;
}

.wc-block-checkout__sidebar .wc-block-components-panel,
.wc-block-checkout__sidebar .wc-block-components-order-summary {
  border-radius: 12px;
}

.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: #000;
  font-weight: 700;
}

.wc-block-components-order-summary-item__quantity {
  background-color: #056cd3;
}

/* Same crop issue as the Enroll page's order-bar thumbnail — WooCommerce's own object-fit:cover on
   this 48px product image was cutting the logo off; contain shows the full image instead. */
.wc-block-components-order-summary-item__image img {
  object-fit: contain;
  background: linear-gradient(135deg, #0c1830, #142642);
  border-radius: 6px;
}

.wc-block-checkout__terms a,
.wc-block-components-checkout-step a {
  color: #056cd3;
}

/* --- Disclaimer + Terms of Access (static wp:html content on the Checkout page) --- */

.edge-checkout-disclaimer {
  background: #f7f9fb;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
}

.edge-checkout-disclaimer-tag {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4c6b85;
  margin-bottom: 6px;
}

.edge-checkout-disclaimer p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #4c6b85;
  margin: 0;
}

.edge-checkout-terms-panel {
  background: #fbf7f0;
  border: 1px solid #ecdfc8;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 18px;
}

.edge-checkout-terms-panel h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: #111;
  margin: 0 0 4px;
}

.edge-checkout-terms-sub {
  font-size: 12px;
  color: #4c6b85;
  margin: 0 0 12px;
}

.edge-checkout-terms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edge-checkout-terms-list li {
  font-size: 12.5px;
  line-height: 1.6;
  color: #2b2b2b;
  padding-left: 22px;
  position: relative;
}

/* Plain bullet dot, not the "\2610" checkbox glyph — that read as a clickable checkbox and confused
   members into tapping it, when the real (required) agreement checkboxes live below this list. */
.edge-checkout-terms-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4c6b85;
}

/* ============================================================
   "Pay for order" retry page — classic WooCommerce template
   (checkout/form-pay.php, id="order_review"), not Block Checkout.
   Previously completely unstyled; the client hits this page when
   retrying a payment after closing the Razorpay popup or a decline.
   ============================================================ */

#order_review {
  max-width: 640px;
  margin: 0 auto;
}

#order_review table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e5e2da;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  font-size: 13.5px;
}

#order_review table.shop_table th,
#order_review table.shop_table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #eef1f4;
}

#order_review table.shop_table thead th {
  background: #f7f9fb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c6f81;
  border-bottom: 1px solid #e5e2da;
}

#order_review table.shop_table tbody tr:last-child th,
#order_review table.shop_table tbody tr:last-child td {
  border-bottom: none;
}

#order_review table.shop_table tfoot th,
#order_review table.shop_table tfoot td {
  border-bottom: none;
  border-top: 1px solid #eef1f4;
  font-weight: 700;
}

#order_review table.shop_table tfoot tr:last-child th,
#order_review table.shop_table tfoot tr:last-child td {
  font-size: 18px;
  font-weight: 800;
  color: #14181f;
}

/* Payment method — single radio/label/box per gateway; recolored into a Razorpay-branded card. */
#order_review .wc_payment_methods.payment_methods.methods {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

#order_review .wc_payment_method {
  background: rgba(5, 108, 211, 0.03);
  border: 1.5px solid #056cd3;
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
}

#order_review .wc_payment_method input.input-radio {
  position: absolute;
  top: 19px;
  left: 18px;
  width: 16px;
  height: 16px;
  accent-color: #056cd3;
}

#order_review .wc_payment_method label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  padding-left: 26px;
  color: #14181f;
}

#order_review .wc_payment_method .payment_box {
  padding-left: 26px;
  margin-top: 10px;
}

#order_review .wc_payment_method .payment_box > p:first-child {
  font-size: 12.5px;
  color: #5c6f81;
  line-height: 1.55;
  margin: 0 0 16px;
}

#btn-razorpay {
  background: #056cd3;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 26px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-right: 10px;
}

#btn-razorpay:hover:not(:disabled) {
  background: #000;
}

#btn-razorpay:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#btn-razorpay-cancel {
  background: #fff;
  color: #5c6f81;
  border: 1px solid #d7dce2;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

#btn-razorpay-cancel:hover {
  border-color: #b8c0c9;
}

/* Failed/cancelled banner — injected by public/js/edge-order-pay.js, hidden by default. */
.edge-rzp-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fdf1ef;
  border: 1px solid #f3c6bd;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.edge-rzp-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edge-rzp-alert-body strong {
  display: block;
  font-size: 14.5px;
  color: #7a2419;
  margin-bottom: 3px;
}

.edge-rzp-alert-body span {
  font-size: 12.5px;
  color: #8a4a3f;
  line-height: 1.55;
}

@media (max-width: 480px) {
  #order_review table.shop_table th,
  #order_review table.shop_table td {
    padding: 11px 14px;
  }

  #btn-razorpay,
  #btn-razorpay-cancel {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    text-align: center;
  }
}
