/* A readable, restrained returning-customer prompt. */
body.woocommerce-checkout #main-content .woocommerce-form-login-toggle .woocommerce-info {
  padding: 16px 20px !important;
  border: 1px solid var(--felius-line, #e5e1dd) !important;
  border-radius: 6px;
  background: var(--felius-checkout-surface, #faf9f8) !important;
  color: #403b39 !important;
  font-size: 15px;
  line-height: 1.55;
}
body.woocommerce-checkout #main-content .woocommerce-form-login-toggle .woocommerce-info a.showlogin {
  color: var(--felius-ink, #201d1c) !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.woocommerce-checkout #main-content .woocommerce-form-login-toggle .woocommerce-info a.showlogin:hover {
  color: var(--felius-rose, #7e5458) !important;
}
body.woocommerce-checkout #main-content .woocommerce-form-login-toggle .woocommerce-info a.showlogin:focus-visible {
  outline: 2px solid var(--felius-rose, #7e5458);
  outline-offset: 3px;
}

/* Checkout: customer details first, order summary and payment alongside. */
body.woocommerce-checkout:not(.woocommerce-order-received) #main-content form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  grid-template-areas: "details heading" "details review";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 64px);
  align-items: start;
  color: var(--felius-ink, #201d1c);
}
body.woocommerce-checkout #main-content form.checkout::before,
body.woocommerce-checkout #main-content form.checkout::after { display: none; }
body.woocommerce-checkout #customer_details { grid-area: details; width: 100%; }
body.woocommerce-checkout #order_review_heading { grid-area: heading; }
body.woocommerce-checkout #order_review { grid-area: review; min-width: 0; }
body.woocommerce-checkout #customer_details > :is(.col-1, .col-2) {
  float: none;
  width: 100% !important;
}
body.woocommerce-checkout #customer_details > .col-2 { margin-top: 28px; }
body.woocommerce-checkout #main-content :is(#customer_details h3, #order_review_heading) {
  margin: 0 0 22px;
  padding: 0;
  color: var(--felius-ink, #201d1c);
  font-size: 24px;
  font-weight: var(--felius-weight-regular, 400);
  line-height: 1.25;
  letter-spacing: -.025em;
}
body.woocommerce-checkout #main-content #ship-to-different-address { font-size: 16px; margin-bottom: 16px; letter-spacing: 0; }
/* The unchecked address must not appear when gallery/theme scripts are delayed. */
body.woocommerce-checkout .woocommerce-shipping-fields:not(:has(#ship-to-different-address-checkbox:checked)) .shipping_address { display: none !important; }
body.woocommerce-checkout .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:checked) .shipping_address { display: block !important; }

body.woocommerce-checkout #main-content form.checkout .form-row { margin-bottom: 16px; }
body.woocommerce-checkout #main-content form.checkout .form-row label { margin-bottom: 7px; line-height: 1.4; font-size: 14px; }
body.woocommerce-checkout #main-content form.checkout :is(input.input-text, textarea, select) {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--felius-field-border, #847c76);
  border-radius: 6px;
  background: #fff;
  color: var(--felius-ink, #201d1c);
  font-size: 16px;
  line-height: 1.4;
}
body.woocommerce-checkout #main-content form.checkout textarea { min-height: 96px; }
/* Select2 replaces WooCommerce's country select after the page loads. */
body.woocommerce-checkout #main-content .select2-container .select2-selection--single {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--felius-field-border, #847c76);
  border-radius: 6px;
  background: #fff;
}
body.woocommerce-checkout #main-content .select2-container .select2-selection__rendered {
  padding: 0;
  color: var(--felius-ink, #201d1c);
  font-size: 16px;
  line-height: 26px;
}
body.woocommerce-checkout #main-content .select2-container .select2-selection__arrow { height: 46px; right: 12px; }
body.woocommerce-checkout #main-content form.checkout :is(input, textarea, select, button, a):focus-visible {
  outline: 2px solid var(--felius-rose, #7e5458);
  outline-offset: 2px;
}
body.woocommerce-checkout #order_review {
  padding: 24px;
  border: 1px solid var(--felius-line, #e5e1dd);
  border-radius: 6px;
  background: var(--felius-checkout-surface, #faf9f8);
}
body.woocommerce-checkout #order_review table.shop_table { margin: 0 0 24px; border: 0; }
body.woocommerce-checkout #order_review table.shop_table :is(th, td) { padding: 14px 0; border-color: var(--felius-line, #e5e1dd); }
/* Keep product details readable and amounts aligned in the order summary. */
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--felius-ink, #201d1c);
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table :is(th, td) {
  line-height: 1.5;
  vertical-align: top;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table :is(th, td):first-child {
  width: 62%;
  padding-right: 16px;
  overflow-wrap: anywhere;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table thead th {
  padding-top: 0;
  color: var(--felius-text-secondary, #625d59);
  font-size: 13px;
  font-weight: 500;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table :is(.product-total, .cart-subtotal td, .order-total td) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table .product-quantity {
  display: inline-block;
  color: var(--felius-text-secondary, #625d59);
  font-weight: 400;
  white-space: nowrap;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table .order-total :is(th, td) {
  padding-top: 18px;
  font-size: 17px;
  font-weight: 600;
}
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table .order-total .includes_tax {
  display: block;
  margin-top: 4px;
  color: var(--felius-text-secondary, #625d59);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

body.woocommerce-checkout #payment { background: transparent; border-radius: 0; }
body.woocommerce-checkout #payment ul.payment_methods { padding: 0 0 16px; border-color: var(--felius-line, #e5e1dd); }
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
  position: relative;
  margin: 0;
  padding: 15px 0 15px 30px;
  border-bottom: 1px solid var(--felius-line, #e5e1dd);
  line-height: 1.4;
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method:last-child { border-bottom: 0; }
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > input {
  position: absolute;
  left: 0;
  top: 16px;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--felius-ink, #201d1c);
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  margin: 0;
  color: var(--felius-ink, #201d1c);
  font-size: 15px;
  font-weight: var(--felius-weight-medium, 500);
  cursor: pointer;
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label .reepay-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label img {
  width: auto;
  max-width: 48px;
  max-height: 24px;
  margin: 0;
  object-fit: contain;
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method .payment_box {
  width: auto;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  background: #f1efed;
  color: #514b47;
  font-size: 14px;
  line-height: 1.5;
}
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method .payment_box::before { display: none; }
body.woocommerce-checkout #payment div.form-row { padding: 20px 0 0; }
body.woocommerce-checkout #payment #place_order { width: 100%; }

@media (max-width: 767px) {
  body.woocommerce-checkout:not(.woocommerce-order-received) #main-content form.checkout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "details" "heading" "review";
    row-gap: 0;
  }
  body.woocommerce-checkout #order_review_heading { margin-top: 32px !important; }
  body.woocommerce-checkout #order_review { padding: 20px; }
}

/* Shipmondo's old arrow geometry must not constrain the change label. */
body.woocommerce-checkout #shipping_method .selected_service_point::after {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin-top: 8px;
  transform: none !important;
  white-space: normal;
  line-height: 1.4;
}
