/* Checkout body (TODO 00001.5.16), DESIGN-GUIDE section 8 Checkout (D6): Woo block checkout styled to the guide.
   Numbered step headings (H3 with a navy number), every field labelled ABOVE it (Woo floats labels inside the
   field; restyled here), section 8 inputs, order summary card on mist sticky on the right from 992, Place order
   primary full width. Gateways and the test-mode payment panel come in 00001.5.18; AI never appears here. */
.p-checkout-body { box-sizing: border-box; padding: var(--wp--preset--spacing--110) var(--wp--custom--gutter--desktop); }
.p-checkout-body *, .p-checkout-body *::before, .p-checkout-body *::after { box-sizing: border-box; }
.p-checkout-body__inner { max-width: var(--wp--custom--layout--wide); margin-inline: auto; }
.p-checkout-body .wp-block-post-content > * { max-width: none; margin-inline: 0; }
.p-checkout-body .wp-block-woocommerce-checkout { margin: 0; padding: 0; color: var(--wp--preset--color--ink); }

.p-checkout-body .wc-block-components-sidebar-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--wp--preset--spacing--100); margin: 0; }
.p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-main { flex: 1 1 0; width: auto; min-width: 0; padding: 0; }
.p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  position: sticky; top: 140px; flex: 0 0 calc((100% - var(--wp--preset--spacing--100)) / 3); width: auto; margin: 0; padding: 0;
}

/* Steps: H3 navy title with a navy number disc; a line rule between steps. */
.p-checkout-body .wc-block-checkout__form { counter-reset: p-step; }
.p-checkout-body .wc-block-components-checkout-step { position: relative; margin: 0; padding: 0 0 var(--wp--preset--spacing--80) 56px; border-bottom: 1px solid var(--wp--preset--color--line); }
.p-checkout-body .wc-block-components-checkout-step + .wc-block-components-checkout-step { padding-top: var(--wp--preset--spacing--80); }
.p-checkout-body .wc-block-components-checkout-step::before, .p-checkout-body .wc-block-components-checkout-step::after { display: none !important; }
.p-checkout-body .wc-block-components-checkout-step__heading { position: relative; margin: 0 0 var(--wp--preset--spacing--60); }
.p-checkout-body .wc-block-components-checkout-step__heading::before {
  counter-increment: p-step; content: counter(p-step); position: absolute; left: -56px; top: -2px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); font-size: 16px; font-weight: 700;
}
.p-checkout-body .wc-block-components-checkout-step__title {
  margin: 0; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--h-3); font-weight: var(--wp--custom--font-weight--h-3); line-height: 1.25;
}
.p-checkout-body .wc-block-components-checkout-step__description { margin: 0 0 var(--wp--preset--spacing--50); color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-checkout-body .wc-block-checkout__guest-checkout-notice { margin: var(--wp--preset--spacing--30) 0 0; color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }

/* Text inputs: label above (14/600 ink), 48px field with a 1px slate border. */
.p-checkout-body .wc-block-components-text-input { display: flex; flex-direction: column-reverse; gap: var(--wp--preset--spacing--30); margin-top: var(--wp--preset--spacing--50); }
.p-checkout-body .wc-block-components-text-input label,
.p-checkout-body .wc-block-components-text-input.is-active label {
  position: static !important; transform: none !important; max-width: none; margin: 0; padding: 0; line-height: 1.5;
  color: var(--wp--preset--color--ink) !important; font-size: var(--wp--preset--font-size--small) !important; font-weight: 600; white-space: normal;
}
.p-checkout-body .wc-block-components-text-input input,
.p-checkout-body .wc-block-components-text-input.is-active input,
.p-checkout-body .wc-block-components-textarea {
  min-height: var(--wp--custom--control); height: var(--wp--custom--control); padding: 0 var(--wp--preset--spacing--50) !important;
  background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--slate) !important; border-radius: var(--wp--custom--radius--default);
  color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body) !important; line-height: 1.5; box-shadow: none !important;
}
.p-checkout-body .wc-block-components-textarea { height: auto; min-height: 120px; padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) !important; }
.p-checkout-body .wc-block-components-text-input input:focus { outline: none; }
.p-checkout-body .wc-block-components-text-input input:focus-visible,
.p-checkout-body .wc-blocks-components-select__select:focus-visible,
.p-checkout-body .wc-block-components-textarea:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange) !important; outline-offset: var(--wp--custom--focus--offset); }
.p-checkout-body .wc-block-components-text-input.has-error input { border: 2px solid var(--wp--preset--color--alert) !important; }
.p-checkout-body .wc-block-components-validation-error { color: var(--wp--preset--color--alert); font-size: var(--wp--preset--font-size--small); }
.p-checkout-body .wc-block-components-validation-error svg { fill: var(--wp--preset--color--alert); }

/* Selects (country, state): label above, chevron inside the 48px field. */
.p-checkout-body .wc-blocks-components-select { margin-top: var(--wp--preset--spacing--50); }
.p-checkout-body .wc-blocks-components-select .wc-blocks-components-select__container {
  position: relative; display: flex; flex-direction: column; gap: var(--wp--preset--spacing--30); height: auto; background: none; border: 0; box-shadow: none;
}
.p-checkout-body .wc-blocks-components-select .wc-blocks-components-select__label {
  position: static; order: -1; transform: none; margin: 0; padding: 0; color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--small); font-weight: 600; line-height: 1.5;
}
.p-checkout-body .wc-blocks-components-select .wc-blocks-components-select__select {
  height: var(--wp--custom--control); padding: 0 var(--wp--preset--spacing--90) 0 var(--wp--preset--spacing--50); appearance: none;
  background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--slate); border-radius: var(--wp--custom--radius--default);
  color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); line-height: 1.5; box-shadow: none;
}
.p-checkout-body .wc-blocks-components-select .wc-blocks-components-select__expand { position: absolute; top: auto; bottom: 12px; right: var(--wp--preset--spacing--50); transform: none; fill: var(--wp--preset--color--ink); }
.p-checkout-body .wc-block-components-address-form { gap: 0 var(--wp--preset--spacing--60); }
.p-checkout-body .wc-block-components-address-form__address_2-toggle { display: inline-flex; align-items: center; min-height: var(--wp--custom--touch); margin-top: var(--wp--preset--spacing--30); color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--small); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Checkboxes: 20px, slate border, navy when checked; 44px row. */
.p-checkout-body .wc-block-components-checkbox { margin-top: var(--wp--preset--spacing--50); }
.p-checkout-body .wc-block-components-checkbox label { display: flex; align-items: center; min-height: var(--wp--custom--touch); color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); }
.p-checkout-body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] {
  width: 20px; height: 20px; min-width: 20px; margin-right: var(--wp--preset--spacing--40); border: 1px solid var(--wp--preset--color--slate); border-radius: var(--wp--custom--radius--default); background: var(--wp--preset--color--white);
}
.p-checkout-body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); }
.p-checkout-body .wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--wp--preset--color--white); left: 2px; top: 50%; margin-top: -8px; }
.p-checkout-body .wc-block-components-checkbox__input:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: 2px; }

/* Notices inside checkout (the no-payment-methods state until 00001.5.18): section 8 notice. */
.p-checkout-body .wc-block-components-notice-banner {
  margin: 0; padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60); gap: var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--mist); border: 1px solid var(--wp--preset--color--line); border-left: 4px solid var(--wp--preset--color--navy);
  border-radius: var(--wp--custom--radius--default); color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body);
}
.p-checkout-body .wc-block-components-notice-banner > svg { background: none; fill: var(--wp--preset--color--navy); }
.p-checkout-body .wc-block-components-notice-banner.is-error { border-left-color: var(--wp--preset--color--alert); }
.p-checkout-body .wc-block-components-notice-banner.is-error > svg { fill: var(--wp--preset--color--alert); }

.p-checkout-body .wc-block-checkout__terms { margin: var(--wp--preset--spacing--60) 0 0; padding: 0; border: 0; color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-checkout-body .wc-block-checkout__actions { padding: var(--wp--preset--spacing--60) 0 0; }
.p-checkout-body .wc-block-checkout__actions_row { display: flex; flex-direction: column-reverse; align-items: stretch; gap: var(--wp--preset--spacing--50); }
.p-checkout-body .wc-block-components-checkout-return-to-cart-button { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--wp--custom--touch); padding-left: 0; color: var(--wp--preset--color--navy); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.p-checkout-body .wc-block-components-checkout-return-to-cart-button svg { display: none; }
.p-checkout-body .wc-block-components-checkout-place-order-button {
  width: 100%; min-height: var(--wp--custom--control); padding: 14px var(--wp--preset--spacing--60); border: 0;
  background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy); border-radius: var(--wp--custom--radius--default);
  font-size: var(--wp--preset--font-size--button); font-weight: var(--wp--custom--font-weight--button);
}
.p-checkout-body .wc-block-components-checkout-place-order-button:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: var(--wp--custom--focus--offset); box-shadow: none; }
.p-checkout-body .wc-block-components-checkout-place-order-button:active { transform: scale(.98); }

/* Order summary card: mist with a line edge. */
.p-checkout-body .wp-block-woocommerce-checkout-order-summary-block {
  margin: 0; padding: var(--wp--preset--spacing--60); background: var(--wp--preset--color--mist);
  border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default);
}
.p-checkout-body .wc-block-components-checkout-order-summary__title { margin: 0 0 var(--wp--preset--spacing--40); }
.p-checkout-body .wc-block-components-checkout-order-summary__title-text,
.p-checkout-body .wc-block-components-order-summary__button-text {
  color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--h-3); font-weight: var(--wp--custom--font-weight--h-3); line-height: 1.25;
}
.p-checkout-body .wc-block-components-order-summary-item { padding: var(--wp--preset--spacing--50) 0; }
.p-checkout-body .wc-block-components-order-summary-item__image img { background: var(--wp--preset--color--white); border-radius: var(--wp--custom--radius--default); }
.p-checkout-body .wc-block-components-order-summary-item__quantity { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); border: 0; box-shadow: none; }
.p-checkout-body .wc-block-components-product-name { color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--body); font-weight: 600; }
.p-checkout-body .wc-block-components-order-summary-item__individual-prices,
.p-checkout-body .wc-block-components-product-metadata { color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-checkout-body .wc-block-components-totals-wrapper { padding: var(--wp--preset--spacing--50) 0; border-top: 1px solid var(--wp--preset--color--line); }
.p-checkout-body .wc-block-components-totals-wrapper:empty { display: none; }
.p-checkout-body .wc-block-components-totals-item { color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); }
.p-checkout-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.p-checkout-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--price); font-weight: var(--wp--custom--font-weight--price); line-height: 1.2;
}
.p-checkout-body .wc-block-components-panel__button { min-height: var(--wp--custom--touch); margin: 0; padding: 0; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--body); font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
  .p-checkout-body .wc-block-components-checkout-place-order-button:hover { box-shadow: inset 0 0 0 100vmax var(--wp--custom--alpha--overlay-navy); background: var(--wp--preset--color--orange); }
  .p-checkout-body .wc-block-components-text-input input:hover, .p-checkout-body .wc-blocks-components-select__select:hover { border-color: var(--wp--preset--color--ink) !important; }
}
@media (max-width: 991.98px) {
  .p-checkout-body { padding: var(--wp--preset--spacing--100) var(--wp--custom--gutter--tablet); }
  .p-checkout-body .wc-block-components-sidebar-layout { flex-direction: column-reverse; align-items: stretch; gap: var(--wp--preset--spacing--80); }
  .p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-main,
  .p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-sidebar { position: static; flex: none; width: 100%; }
}
@media (max-width: 599.98px) {
  .p-checkout-body { padding: var(--wp--preset--spacing--90) var(--wp--custom--gutter--phone); }
  .p-checkout-body .wc-block-components-checkout-step { padding-left: 0; }
  .p-checkout-body .wc-block-components-checkout-step__heading { padding-left: 48px; }
  .p-checkout-body .wc-block-components-checkout-step__heading::before { left: 0; }
}
/* Woo's own "1." counter and the step's left rule are replaced by the navy disc above. */
.p-checkout-body .wc-block-components-checkout-step__title::before,
.p-checkout-body .wc-block-components-checkout-step__content::before { display: none !important; content: none !important; }
.p-checkout-body .wc-block-components-checkout-step__container,
.p-checkout-body .wc-block-components-checkout-step__content { padding-left: 0 !important; margin-left: 0 !important; }
.p-checkout-body .wc-block-components-panel__button { display: flex; align-items: center; justify-content: space-between; }
.p-checkout-body .wc-block-components-panel__button-icon { position: static !important; transform: none; }
/* Woo's medium and mobile layouts print a second summary inside the form and collapse the sidebar one.
   From 992 the sidebar summary stays open on the right and the in-form copy is hidden; under 992 the sidebar is
   hidden and the in-form summary (not a numbered step) closes the form above Place order. */
.p-checkout-body .checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-step__heading::before { display: none; }
.p-checkout-body .checkout-order-summary-block-fill-wrapper .wc-block-components-checkout-step,
.p-checkout-body .checkout-order-summary-block-fill-wrapper { padding-left: 0; border-bottom: 0; }
@media (min-width: 992px) {
  .p-checkout-body .checkout-order-summary-block-fill-wrapper { display: none !important; }
  .p-checkout-body .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content { display: block !important; }
  .p-checkout-body .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title { pointer-events: none; }
  .p-checkout-body .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title-icon,
  .p-checkout-body .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title-price { display: none; }
}
@media (max-width: 991.98px) {
  .p-checkout-body .wc-block-checkout__sidebar { display: none !important; }
}
/* Woo's container-size classes (is-medium, is-mobile) restack the layout; the guide's 8 + 4 split holds from 992. */
@media (min-width: 992px) {
  .p-checkout-body .wc-block-components-sidebar-layout { flex-direction: row !important; flex-wrap: nowrap !important; }
  .p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-main { order: 1; flex: 1 1 0 !important; width: auto !important; }
  .p-checkout-body .wc-block-components-sidebar-layout .wc-block-components-sidebar { order: 2; flex: 0 0 calc((100% - var(--wp--preset--spacing--100)) / 3) !important; width: auto !important; }
}

/* Payment step (00001.5.18): the step description is the test-mode notice panel (mist, navy info icon) above the
   Stripe card field and the offline options; payment methods are radio rows with a line edge, navy when chosen. */
.p-checkout-body .wp-block-woocommerce-checkout-payment-block .wc-block-components-checkout-step__description {
  position: relative; margin: 0 0 var(--wp--preset--spacing--60); padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60) var(--wp--preset--spacing--50) 56px;
  background: var(--wp--preset--color--mist); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default);
  color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); line-height: 1.6;
}
.p-checkout-body .wp-block-woocommerce-checkout-payment-block .wc-block-components-checkout-step__description::before {
  content: ""; position: absolute; left: var(--wp--preset--spacing--60); top: calc(var(--wp--preset--spacing--50) + 3px); width: 20px; height: 20px;
  background: var(--wp--preset--color--navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 100 20 10 10 0 000-20zm1 15H9V9h2v6zm0-8H9V5h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 100 20 10 10 0 000-20zm1 15H9V9h2v6zm0-8H9V5h2v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.p-checkout-body .wc-block-components-radio-control { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--40); border: 0; }
.p-checkout-body .wc-block-components-radio-control-accordion-option,
.p-checkout-body .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option {
  position: relative; margin: 0; background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line) !important; border-radius: var(--wp--custom--radius--default); box-shadow: none !important;
}
.p-checkout-body .wc-block-components-radio-control-accordion-option::after { display: none !important; }
.p-checkout-body .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.p-checkout-body .wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted,
.p-checkout-body .wc-block-components-radio-control-accordion-option:has(> .wc-block-components-radio-control__option-checked),
.p-checkout-body .wc-block-components-radio-control__option-checked { border-color: var(--wp--preset--color--navy) !important; box-shadow: inset 0 0 0 1px var(--wp--preset--color--navy) !important; }
.p-checkout-body .wc-block-components-radio-control__option { min-height: 56px; padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) 56px; color: var(--wp--preset--color--ink); }
.p-checkout-body .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option { border: 0 !important; box-shadow: none !important; }
.p-checkout-body .wc-block-components-radio-control__input {
  left: var(--wp--preset--spacing--50) !important; width: 20px; height: 20px; min-width: 20px; margin: 0; border: 1px solid var(--wp--preset--color--slate); background: var(--wp--preset--color--white);
}
.p-checkout-body .wc-block-components-radio-control__input:checked { border: 6px solid var(--wp--preset--color--navy); background: var(--wp--preset--color--white); }
.p-checkout-body .wc-block-components-radio-control__input:checked::before { display: none; }
.p-checkout-body .wc-block-components-radio-control__input:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: 2px; }
.p-checkout-body .wc-block-components-radio-control__label,
.p-checkout-body .wc-block-components-payment-method-label { color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--body); font-weight: 600; }
.p-checkout-body .wc-block-components-radio-control__secondary-label { color: var(--wp--preset--color--navy); font-weight: 600; }
.p-checkout-body .wc-block-components-radio-control__description,
.p-checkout-body .wc-block-components-radio-control__secondary-description { color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-checkout-body .wc-block-components-radio-control-accordion-content { padding: 0 var(--wp--preset--spacing--50) var(--wp--preset--spacing--50) 56px; color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); line-height: 1.6; }
.p-checkout-body .wc-block-components-radio-control-accordion-content p { margin: 0; }
.p-checkout-body .wc-block-components-radio-control-accordion-content:empty { display: none; }
@media (max-width: 599.98px) {
  .p-checkout-body .wc-block-components-radio-control-accordion-content { padding-left: var(--wp--preset--spacing--50); }
}
