/**
 * BioMed Checkout Layout — My Account order buttons (1.6.2; owner 2026-11-14: "buttons are touching each other, they
 * shouldn't. they should have margins, also they should be aligned … we can keep two line wrap, but the look still needs
 * to be refined").
 *
 * Loaded on My Account pages (the orders list and an order's own page) and on the order-tracking page (biomed-track-order,
 * the order page the e-mails link to; rc.5, QA I-1, 2026-11-15: its two buttons touched, 0 px, with none of these rules),
 * and on the thank-you page (1.6.4, 2026-11-21: a bank-transfer order shows „Apmokėti" and „Atšaukti" there; Woodmart's
 * rules alone leave them 5 px apart and unequal).
 * What Woodmart 8.6.7 does there, measured on staging 2026-11-14:
 *   - list, ≥ 1025 px: `a:not(:last-child) { margin-inline-end: 5px }` — 5 px between buttons, nothing between wrapped
 *     lines, and a wrapped line ends 5 px short of the line below it;
 *   - list, ≤ 1024 px (cards): the buttons sit in a <p> inside the cell with no spacing at all — they touch;
 *   - an order's page: `.button:first-child { margin-inline-end: 5px }`, the same 5 px stagger when the two wrap.
 * Here: 8 px between buttons in both directions, equal widths so stacked buttons line up, and every line ends on the
 * same right edge. Margins rather than a flex gap, so it holds whether or not the buttons sit in that <p>.
 */

/* ── Orders list ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button {
	margin: 4px 0;
	min-width: 96px;
}

.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions a.button + a.button {
	margin-inline-start: 8px;
}

.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions > p {
	margin: 0;
}

/* Table rows keep their height: the cell's 15 px padding becomes 11 px + the buttons' 4 px. */
@media (min-width: 1025px) {
	.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
		padding-top: 11px;
		padding-bottom: 11px;
	}
}

/* Cards (Woodmart's ≤ 1024 px layouts): the buttons on their own line under „Veiksmai", right-aligned, in every card. */
@media (max-width: 1024px) {
	.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions > p {
		flex-basis: 100%;
	}
}

/* ── An order's page, „Veiksmai" (the buttons sit straight in the table cell): in My Account and on the order-tracking
      page, which loads none of Woodmart's order-details rules (its own cell keeps its left alignment) ─────────────── */
.woocommerce-account .woocommerce-table--order-details th.order-actions--heading + td,
.biomed-track-order .woocommerce-table--order-details th.order-actions--heading + td,
.woocommerce-order-received .woocommerce-table--order-details th.order-actions--heading + td {
	padding-top: 11px;
	padding-bottom: 11px;
}

.woocommerce-account .woocommerce-table--order-details th.order-actions--heading + td > a.button,
.biomed-track-order .woocommerce-table--order-details th.order-actions--heading + td > a.button,
.woocommerce-order-received .woocommerce-table--order-details th.order-actions--heading + td > a.button {
	margin: 4px 0;
	min-width: 110px;
}

/* My Account's and the thank-you page's cells are right-aligned (the thank-you page's measured 2026-11-21): the space
   goes before every next button, so a wrapped line still ends on the cell's right edge. */
.woocommerce-account .woocommerce-table--order-details th.order-actions--heading + td > a.button + a.button,
.woocommerce-order-received .woocommerce-table--order-details th.order-actions--heading + td > a.button + a.button {
	margin-inline-start: 8px;
}

/* The tracking page's cell is left-aligned: the space goes after every button but the last, so a wrapped line still
   starts on the cell's left edge (8 px before the next one indented it, measured at 414/390/360 px). */
.biomed-track-order .woocommerce-table--order-details th.order-actions--heading + td > a.button:not(:last-child) {
	margin-inline-end: 8px;
}

/* ── The order-tracking page: Woodmart's own look for an order's buttons (rc.6) ──────────────────────────────────────
   Owner 2026-11-15: "buttons are not green as everywhere, we should maintain buttons look and feel throughout the site".
   Woodmart 8.6.7 gives an order's buttons its accent look (green, white text, rounded) only where it loads its
   order-details part, My Account and the thank-you page (inline style `wd-woo-mod-order-details-inline-css`); the
   tracking page loads it not, so its buttons came grey and square. These are that part's three button rules, word for
   word, under the tracking page's wrapper. The theme's own variables (Theme Settings → Buttons → accent) decide the look,
   so the buttons follow any change made there. After a Woodmart update: compare with the live part (couplings.md). */
.biomed-track-order :is(.woocommerce-order-downloads, .woocommerce-order-details) .button {
	padding: var(--btn-accented-padding, var(--btn-padding, 5px 20px));
	min-height: var(--btn-accented-height, var(--btn-height, 42px));
	font-size: var(--btn-accented-font-size, var(--btn-font-size, 13px));
	border-radius: var(--btn-accented-brd-radius);
	color: var(--btn-accented-color);
	box-shadow: var(--btn-accented-box-shadow);
	background-color: var(--btn-accented-bgcolor);
	text-transform: var(--btn-accented-transform, var(--btn-transform, uppercase));
	font-weight: var(--btn-accented-font-weight, var(--btn-font-weight, 600));
	font-family: var(--btn-accented-font-family, var(--btn-font-family, inherit));
	font-style: var(--btn-accented-font-style, var(--btn-font-style, unset));
}

.biomed-track-order :is(.woocommerce-order-downloads, .woocommerce-order-details) .button:hover {
	color: var(--btn-accented-color-hover);
	box-shadow: var(--btn-accented-box-shadow-hover);
	background-color: var(--btn-accented-bgcolor-hover);
}

.biomed-track-order :is(.woocommerce-order-downloads, .woocommerce-order-details) .button:active {
	box-shadow: var(--btn-accented-box-shadow-active);
	bottom: var(--btn-accented-bottom-active, 0);
}
