/* Scoped to the explicitly enabled preview/public audience and audited pages. */
body.medq-enabled {
  --medq-green: #12664d;
  --medq-dark: #153a2f;
  --medq-line: #dce5de;
  --medq-surface: #fff;
  --medq-muted: #4f6259;
}
body.medq-enabled .medq-intro { margin: 0 0 1.5rem; color: var(--medq-muted); }
body.medq-enabled .medq-step { color: var(--medq-green); font-weight: 600; }
body.medq-enabled .medq-continue {
  width: 100%;
  min-height: 3rem;
  margin: 1rem 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.medq-product form.cart .med-mois { margin-block: 1.25rem; }
body.medq-product form.cart .med-total:not([hidden]) { margin-block: 1.25rem 0; }
body.medq-checkout #content .page-wrap--narrow {
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: 74rem;
  margin-inline: auto;
  padding-block: clamp(1.5rem, 3vw, 2.75rem);
}
body.medq-checkout #content .page-header { margin-bottom: 1.25rem; }
body.medq-checkout #content .page-header__title { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; }
body.medq-checkout .entry-content > .woocommerce { max-width: 72rem; margin-inline: auto; }
body.medq-checkout form.checkout.woocommerce-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  column-gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}
body.medq-checkout form.checkout::before,
body.medq-checkout form.checkout::after { display: none; }
body.medq-checkout form.checkout > #customer_details {
  grid-column: 1;
  width: 100%;
  min-width: 0;
}
body.medq-checkout #customer_details > .col-1,
body.medq-checkout #customer_details > .col-2 {
  float: none;
  width: 100%;
  max-width: none;
}
body.medq-checkout form.checkout > .medq-order-pane {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  float: none;
}
body.medq-checkout .medq-order-pane > .medq-edit-cart { margin: 0 0 .75rem; }
body.medq-checkout .medq-order-pane > #order_review_heading { margin-top: 0; }
body.medq-checkout .medq-order-pane > #order_review_heading,
body.medq-checkout .medq-order-pane > #order_review { width: 100%; min-width: 0; float: none; }
body.medq-checkout form.checkout > :not(#customer_details):not(.medq-order-pane) { grid-column: 1 / -1; }
body.medq-checkout #order_review { overflow-wrap: anywhere; }
body.medq-checkout .shop_table { margin-bottom: 1.25rem; }
/* The theme stacks generic content tables once on load. WooCommerce replaces
   this table after recalculation, so both marked and unmarked copies must keep
   the same native two-column table layout. No other content table is targeted. */
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table {
  display: table;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
  border: 1px solid var(--medq-line);
  background: var(--medq-surface);
  overflow: hidden;
}
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table thead { display: table-header-group; }
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table tbody { display: table-row-group; }
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table tfoot { display: table-footer-group; }
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table tr {
  display: table-row;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table th,
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table td {
  display: table-cell;
  width: auto;
  min-width: 0;
  padding: .625rem .5rem;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: start;
}
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table thead .product-name { width: 64%; }
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table thead .product-total { width: 36%; }
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table th::before,
body.medq-enabled.medq-checkout #order_review table.woocommerce-checkout-review-order-table td::before { display: none; content: none; }
body.medq-checkout #payment { background: var(--medq-surface); border: 1px solid var(--medq-line); border-radius: 1rem; }
body.medq-checkout #customer_details .form-row input.input-text,
body.medq-checkout #customer_details .form-row textarea,
body.medq-checkout #customer_details .form-row select { font-size: 16px; max-width: 100%; }
body.medq-checkout .medq-optional { margin-block: .6rem 1rem; }
body.medq-checkout .medq-optional > summary { color: var(--medq-green); padding-block: .6rem; min-height: 2.75rem; }
body.medq-checkout .medq-optional[open] > summary { margin-bottom: .4rem; }
body.medq-checkout .medq-optional .form-row { width: 100%; float: none; }
body.medq-checkout .medq-additional > h3 { font-size: 1.1rem; margin-bottom: .5rem; }
body.medq-enabled .medq-preview-notice {
  max-width: 72rem;
  margin: 1.5rem auto;
  padding: .9rem 1.2rem;
  background: #fff9eb;
  border: 1px solid #d9c395;
  border-radius: .6rem;
  color: #54401d;
}
@media (max-width: 850px) {
  body.medq-checkout form.checkout.woocommerce-checkout { display: block; }
  body.medq-checkout form.checkout > #customer_details,
  body.medq-checkout form.checkout > .medq-order-pane { width: 100%; float: none; }
  body.medq-checkout .medq-order-pane > .medq-edit-cart { margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.medq-enabled .medq-continue { transition: none; }
}
