/* ==========================================================================
   PrescribedRx — WooCommerce
   Cart, checkout, account and subscriptions keep Woo's own markup and
   behaviour. This file gives them the theme's type, colour and controls, and
   nothing here changes how a form submits.
   ========================================================================== */

/* ------------------------------------------------------------ The price */

.prx-price-block { display: inline-flex; flex-direction: column; gap: 2px; }

.prx-price-week {
  font-family: var(--prx-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--prx-ink);
  line-height: 1.1;
}

/* A bare <strong> resolves to 900 against a variable face, which made the
   weekly price heavier than every other number on the site. */
.prx-price-week strong { font-weight: inherit; }

.prx-price-week .prx-price-unit {
  font-family: var(--prx-font);
  font-size: var(--prx-text-md);
  font-weight: 500;
  color: var(--prx-muted);
}

/* The charge that actually lands is never smaller than a footnote. */
.prx-price-real { font-size: var(--prx-text-md); font-weight: 600; color: var(--prx-ink); }
.prx-price-was s { font-size: var(--prx-text-sm); color: var(--prx-faint); }

.woocommerce-Price-amount { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- Buttons */

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--prx-space-2);
  min-height: var(--prx-btn-h);
  padding: 0 26px;
  border: 0;
  border-radius: var(--prx-r-pill);
  background: var(--prx-red);
  color: var(--prx-on-navy);
  font-family: var(--prx-font);
  font-size: var(--prx-text-lg);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-transform: none;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wc-block-components-button:hover {
  background: var(--prx-red-deep);
  color: var(--prx-on-navy);
}

/* The add-to-cart button on a plan page is the page's one action. */
.single-product form.cart { display: flex; flex-direction: column; gap: var(--prx-space-3); margin: 0; }
.single-product form.cart .quantity { display: none; } /* a plan is not bought by the dozen */
.single-product form.cart button[type="submit"] { width: 100%; min-height: var(--prx-btn-h-lg); font-size: var(--prx-text-xl); }

.single-product .price { margin: 0; }

/* --------------------------------------------------------- Form fields */

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single,
.wc-block-components-text-input input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--prx-line);
  border-radius: var(--prx-r-md);
  background: var(--prx-surface);
  color: var(--prx-ink);
  font-family: var(--prx-font);
  font-size: var(--prx-text-lg);
  box-sizing: border-box;
}

.woocommerce form .form-row label,
.wc-block-components-checkout-step__title { font-weight: 600; color: var(--prx-ink); }

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  outline: 3px solid var(--prx-red);
  outline-offset: 1px;
  border-color: transparent;
}

/* ---------------------------------------------- Notices and messages */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
  background: var(--prx-surface);
  border: 1px solid var(--prx-line);
  border-top: 3px solid var(--prx-navy);
  border-radius: var(--prx-r-md);
  color: var(--prx-body);
  font-size: var(--prx-text-lg);
  padding: var(--prx-space-4) var(--prx-space-5);
  list-style: none;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none; }

.woocommerce-error { border-top-color: var(--prx-red); }

/* ------------------------------------------------- Cart and checkout */

.woocommerce table.shop_table {
  border: 1px solid var(--prx-line);
  border-radius: var(--prx-r-lg);
  border-collapse: separate;
  background: var(--prx-surface);
  font-size: var(--prx-text-lg);
}

.woocommerce table.shop_table th { color: var(--prx-ink); font-weight: 600; }
.woocommerce table.shop_table td { color: var(--prx-body); }

.woocommerce-checkout #payment {
  background: var(--prx-surface);
  border: 1px solid var(--prx-line);
  border-radius: var(--prx-r-lg);
}

.woocommerce-checkout #payment div.payment_box { background: var(--prx-page); color: var(--prx-body); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--prx-page); }

/* A subscription's renewal terms are the thing people most need to read. */
.woocommerce .subscription-details,
.wc-block-components-order-summary__content .subscription-details {
  font-size: var(--prx-text-md);
  color: var(--prx-muted);
}

/* ------------------------------------------------------------ Account */

.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; display: flex; flex-direction: column; gap: var(--prx-space-1); }

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--prx-r-md);
  text-decoration: none;
  font-weight: 600;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--prx-navy); color: var(--prx-on-navy); }

/* -------------------------------------------------------- Related plans */

.related.products,
.up-sells.products { margin-top: var(--prx-section); }

.related.products > h2,
.up-sells.products > h2 {
  font-family: var(--prx-display);
  font-size: var(--prx-h4);
  margin-bottom: var(--prx-space-6);
}

.related.products ul.products,
.up-sells.products ul.products {
  display: grid;
  gap: var(--prx-space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.related.products ul.products::before,
.related.products ul.products::after { display: none; }

.related.products ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; }

/* Woo's default loop markup, when a theme template is not in play. */
.woocommerce ul.products li.product a img { border-radius: var(--prx-r-md); }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--prx-display);
  font-size: var(--prx-text-2xl);
  color: var(--prx-ink);
  padding: var(--prx-space-3) 0 var(--prx-space-2);
}

/* ------------------------------------------------------------ Breadcrumb */

.woocommerce .woocommerce-breadcrumb { font-size: 0.875rem; color: var(--prx-muted); }
