/* ============================================================================
 * Orders LIST — customer-facing /my-account/orders/ table, reworked into a
 * modern, scannable card list (row-cards on desktop, stacked cards on mobile).
 *
 * Loaded ONLY on the orders endpoint (orders_list.php enqueue). Everything is
 * scoped under .woocommerce-orders-table so it can never leak to other pages.
 *
 * WooCommerce's semantic <table> markup is kept intact; we only restyle it and
 * place each cell into a CSS-grid card via its stable
 * .woocommerce-orders-table__cell-{key} class. No layout shift, focus-visible,
 * prefers-reduced-motion aware, dark-scheme aware, no emojis (inline SVG).
 * ========================================================================== */

.woocommerce-orders-table {
	--acc-ol-accent: #f80031;
	--acc-ol-accent-2: #ff6e40;
	--acc-ol-ink: #16161c;
	--acc-ol-ink-2: #3a3a44;
	--acc-ol-muted: #6b7280;
	--acc-ol-line: rgba(17, 17, 26, 0.10);
	--acc-ol-line-strong: rgba(17, 17, 26, 0.16);
	--acc-ol-card: #ffffff;
	--acc-ol-card-2: #f7f8fa;
	--acc-ol-radius: 16px;
	--acc-ol-radius-sm: 10px;
	--acc-ol-shadow: 0 1px 2px rgba(17, 17, 26, 0.04), 0 6px 20px rgba(17, 17, 26, 0.06);
	--acc-ol-shadow-hover: 0 2px 4px rgba(17, 17, 26, 0.05), 0 14px 34px rgba(17, 17, 26, 0.11);

	/* status accent (default / neutral) */
	--acc-ol-st: #6b7280;
	--acc-ol-st-tint: #eef0f3;
	--acc-ol-st-ink: #3f4652;
}

/* --- Modern minimalist TABLE: keep WooCommerce's <table> semantics, restyle. --- */
.woocommerce-orders-table,
.woocommerce-orders-table > tbody,
.woocommerce-orders-table > thead,
.woocommerce-orders-table > tbody > tr,
.woocommerce-orders-table > tbody > tr > td,
.woocommerce-orders-table > tbody > tr > th {
	background: transparent;
}
.woocommerce-orders-table {
	width: 100%;
	margin: 0 0 8px;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 14.5px;
	color: var(--acc-ol-ink);
	background: var(--acc-ol-card);
	border: 1px solid var(--acc-ol-line);
	border-radius: var(--acc-ol-radius);
	overflow: hidden;
	box-shadow: var(--acc-ol-shadow);
}
/* Visible, quiet header row (a real table now, not a card list). */
.woocommerce-orders-table > thead > tr > th {
	text-align: left;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--acc-ol-muted);
	padding: 13px 16px;
	background: var(--acc-ol-card-2);
	border: 0 !important;
	border-bottom: 1px solid var(--acc-ol-line) !important;
	white-space: nowrap;
}
.woocommerce-orders-table > thead > tr > th.woocommerce-orders-table__header-order-status,
.woocommerce-orders-table > thead > tr > th.woocommerce-orders-table__header-order-actions {
	text-align: right;
}
/* Body rows — clean separators + hover. */
.woocommerce-orders-table > tbody > tr.order {
	border-bottom: 1px solid var(--acc-ol-line) !important;
	transition: background 0.15s ease;
}
.woocommerce-orders-table > tbody > tr.order:last-child { border-bottom: 0 !important; }
.woocommerce-orders-table > tbody > tr.order:hover { background: var(--acc-ol-card-2); }
/* Status-coloured spine on the leading cell — instant at-a-glance scanning. */
.woocommerce-orders-table > tbody > tr.order > td:first-child {
	box-shadow: inset 3px 0 0 var(--acc-ol-st);
}
/* Cells. */
.woocommerce-orders-table > tbody > tr.order > td,
.woocommerce-orders-table > tbody > tr.order > th {
	padding: 14px 16px !important;
	margin: 0;
	min-width: 0;
	vertical-align: middle;
	font-weight: 400;
	text-align: left;
	border: 0 !important;
}
.woocommerce-orders-table__cell-order-status { text-align: right; }
.woocommerce-orders-table__cell-order-status .acc-ol-status { align-items: flex-end; }
.woocommerce-orders-table__cell-order-actions { text-align: right; white-space: nowrap; }
/* JS-enhanced whole-row click affordance (only when orders-list.js ran). */
.woocommerce-orders-table.acc-ol-js > tbody > tr.acc-ol-clickable { cursor: pointer; }
.woocommerce-orders-table.acc-ol-js > tbody > tr.acc-ol-clickable:hover { background: var(--acc-ol-card-2); }
.woocommerce-orders-table.acc-ol-js > tbody > tr.acc-ol-clickable:focus-visible {
	outline: 2px solid var(--acc-ol-accent);
	outline-offset: -2px;
}
/* Inline per-cell labels (.acc-ol-k) are for the MOBILE stacked view only —
   on desktop the thead carries the column names. */
.acc-ol-k { display: none; }
/* the WC responsive-table pseudo label is off on the desktop table. */
.woocommerce-orders-table > tbody > tr.order > td::before {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Service (order-product) — the visual anchor
 * ------------------------------------------------------------------------- */
.acc-ol-svc {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-width: 0;
}
.acc-ol-svc-thumb {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
	border: none;
	display: grid;
	place-items: center;
}
.acc-ol-svc-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
	max-width: none;
}
.acc-ol-svc-body {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	min-width: 0;
}
.acc-ol-svc-name {
	font-weight: 650;
	font-size: 15.5px;
	line-height: 1.28;
	color: var(--acc-ol-ink);
	letter-spacing: -0.01em;
	text-align: left;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
}
.acc-ol-svc-more {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--acc-ol-muted);
}
.acc-ol-svc--empty { color: var(--acc-ol-muted); }

/* ---------------------------------------------------------------------------
 * Order number (order-number)
 * ------------------------------------------------------------------------- */
.acc-ol-num {
	display: inline-flex;
	align-items: baseline;
	gap: 1px;
	font-weight: 700;
	font-size: 14px;
	color: var(--acc-ol-muted) !important;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}
.acc-ol-num:hover,
.acc-ol-num:focus-visible { color: var(--acc-ol-accent) !important; }
.acc-ol-num:focus-visible { outline: 2px solid var(--acc-ol-accent); outline-offset: 2px; border-radius: 5px; }
.acc-ol-num-hash { opacity: 1; font-weight: inherit; }
.acc-ol-num-row {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.acc-ol-num-sub {
	display: block;
	margin-top: 1px;
	font-size: 12px;
	font-weight: 600;
	color: var(--acc-ol-muted);
}

/* ---------------------------------------------------------------------------
 * Meta cells: date + link + start
 * ------------------------------------------------------------------------- */
.acc-ol-date {
	display: flex;
	flex-direction: column;
	gap: 1px;
	line-height: 1.25;
}
.acc-ol-date time {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--acc-ol-ink-2);
}
.acc-ol-date-rel {
	font-size: 12px;
	color: var(--acc-ol-muted);
}

.acc-ol-target-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	max-width: 100%;
}
.acc-ol-target {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	min-width: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--acc-ol-ink-2);
	text-decoration: none;
	border-radius: 8px;
}
a.acc-ol-target:hover .acc-ol-target-t,
a.acc-ol-target:focus-visible .acc-ol-target-t {
	color: var(--acc-ol-accent);
	text-decoration: underline;
}
a.acc-ol-target:focus-visible { outline: 2px solid var(--acc-ol-accent); outline-offset: 2px; }
.acc-ol-target svg {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	color: var(--acc-ol-muted);
}
.acc-ol-target-t {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}
.acc-ol-target--empty { color: var(--acc-ol-muted); font-weight: 500; }

/* Copy-link affordance — quiet until hovered/focused; swaps to a check on copy. */
.acc-ol-copy {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--acc-ol-muted);
	cursor: pointer;
	opacity: 0.65;
	transition: opacity 0.14s ease, color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.acc-ol-copy:hover,
.acc-ol-copy:focus-visible {
	opacity: 1;
	color: var(--acc-ol-ink);
	background: var(--acc-ol-card-2);
	border-color: var(--acc-ol-line);
}
.acc-ol-copy:focus-visible { outline: 2px solid var(--acc-ol-accent); outline-offset: 1px; }
/* Never inherit the theme's dark/filled button look on tap/focus/active — a WC
   <button> otherwise flashes a solid black fill on click. Pin our own quiet look
   in every state; the hover/copied rules below still win by ordering/specificity. */
.acc-ol-copy,
.acc-ol-copy:active,
.acc-ol-copy:focus,
.acc-ol-copy:focus:not(:focus-visible) {
	background: transparent !important;
	color: var(--acc-ol-muted) !important;
	box-shadow: none !important;
	border-color: transparent !important;
	-webkit-tap-highlight-color: transparent;
}
.acc-ol-copy:hover,
.acc-ol-copy:focus-visible {
	background: var(--acc-ol-card-2) !important;
	color: var(--acc-ol-ink) !important;
	border-color: var(--acc-ol-line) !important;
}
.acc-ol-copy:active { background: var(--acc-ol-card-2) !important; }
.acc-ol-copy svg { width: 15px; height: 15px; }
.acc-ol-copy > svg:last-child { display: none; }
.acc-ol-copy.is-copied,
.acc-ol-copy.is-copied:hover,
.acc-ol-copy.is-copied:active,
.acc-ol-copy.is-copied:focus {
	opacity: 1;
	color: #12805c !important;
	background: #eafaef !important;
	border-color: #bfe6cf !important;
}
.acc-ol-copy.is-copied > svg:first-child { display: none; }
.acc-ol-copy.is-copied > svg:last-child { display: block; }
/* The order-number copy button sits inline with the number — a touch tighter. */
.acc-ol-copy--num { width: 24px; height: 24px; }
.acc-ol-copy--num svg { width: 13px; height: 13px; }

.acc-ol-stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--acc-ol-ink-2);
	font-variant-numeric: tabular-nums;
}
.acc-ol-stat svg {
	width: 14px;
	height: 14px;
	color: var(--acc-ol-muted);
}
.acc-ol-stat--empty { color: var(--acc-ol-muted); font-weight: 500; }

/* Inline per-column key labels are MOBILE-only (the thead carries the names on
   desktop) — hidden on desktop, re-shown in the ≤860px stacked view below. */
.acc-ol-k {
	display: none;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--acc-ol-muted);
	margin-bottom: 3px;
}

/* ---------------------------------------------------------------------------
 * Progress (order-quantity) — real progress bar + "X of Y"
 * ------------------------------------------------------------------------- */
.acc-ol-prog {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 360px;
	min-width: 50px;
}
.acc-ol-prog-bar {
	position: relative;
	height: 7px;
	border-radius: 999px;
	background: var(--acc-ol-line);
	overflow: hidden;
}
.acc-ol-prog-fill {
	position: absolute;
	inset: 0 auto 0 0;
	height: 100%;
	min-width: 7px;
	border-radius: 999px;
	background: var(--acc-ol-st);
	transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.acc-ol-prog-text {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--acc-ol-ink-2);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------------------
 * Status block (order-status) — pill + one-line caption
 * ------------------------------------------------------------------------- */
.acc-ol-status {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	text-align: right;
}
.acc-ol-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.005em;
	line-height: 1.2;
	white-space: nowrap;
	background: var(--acc-ol-st-tint);
	color: var(--acc-ol-st-ink);
}
.acc-ol-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--acc-ol-st);
	flex: 0 0 auto;
}
.acc-ol-caption {
	max-width: 240px;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--acc-ol-muted);
}

/* ---------------------------------------------------------------------------
 * Actions rail (order-actions)
 * ------------------------------------------------------------------------- */
.woocommerce-orders-table__cell-order-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}
.woocommerce-orders-table__cell-order-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	box-sizing: border-box;
	min-height: 40px;
	padding: 9px 14px;
	margin: 0 !important;
	border-radius: var(--acc-ol-radius-sm);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid var(--acc-ol-line-strong);
	background: var(--acc-ol-card);
	color: var(--acc-ol-ink) !important;
	transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.woocommerce-orders-table__cell-order-actions a::before {
	content: "";
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.woocommerce-orders-table__cell-order-actions a:hover {
	transform: translateY(-1px);
	border-color: var(--acc-ol-ink);
}
.woocommerce-orders-table__cell-order-actions a:focus-visible {
	outline: 2px solid var(--acc-ol-accent);
	outline-offset: 2px;
}

/* visual order in the rail: primary CTA first, then view, then secondary/cancel */
.woocommerce-orders-table__cell-order-actions a.pay,
.woocommerce-orders-table__cell-order-actions a.reorder,
.woocommerce-orders-table__cell-order-actions a.paused-restart { order: 1; }
.woocommerce-orders-table__cell-order-actions a.view { order: 2; }
.woocommerce-orders-table__cell-order-actions a.paused-update { order: 3; }
.woocommerce-orders-table__cell-order-actions a.cancel { order: 4; }

/* Two DISTINCT conversion CTAs in the site palette (neither ever grey):
   reorder = brand RED; pay / resume-delivery = brand ORANGE. */
.woocommerce-orders-table__cell-order-actions a.reorder {
	background: linear-gradient(130deg, #f80031, #ff2e55);
	border-color: transparent;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(248, 0, 49, 0.22);
}
.woocommerce-orders-table__cell-order-actions a.reorder:hover {
	border-color: transparent;
	box-shadow: 0 6px 18px rgba(248, 0, 49, 0.30);
	filter: saturate(1.05);
}
.woocommerce-orders-table__cell-order-actions a.pay,
.woocommerce-orders-table__cell-order-actions a.paused-restart {
	background: linear-gradient(130deg, #ff6e40, #ff8f3f);
	border-color: transparent;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(255, 110, 64, 0.26);
}
.woocommerce-orders-table__cell-order-actions a.pay:hover,
.woocommerce-orders-table__cell-order-actions a.paused-restart:hover {
	border-color: transparent;
	box-shadow: 0 6px 18px rgba(255, 110, 64, 0.34);
	filter: saturate(1.05);
}

/* View = calm secondary */
.woocommerce-orders-table__cell-order-actions a.view {
	background: var(--acc-ol-card-2);
	border-color: var(--acc-ol-line-strong);
	color: var(--acc-ol-ink) !important;
}

/* Cancel = de-emphasised */
.woocommerce-orders-table__cell-order-actions a.cancel {
	background: transparent;
	border-color: transparent;
	color: var(--acc-ol-muted) !important;
	min-height: 32px;
	font-weight: 600;
	box-shadow: none;
}
.woocommerce-orders-table__cell-order-actions a.cancel:hover {
	color: #dc2626 !important;
	transform: none;
}

/* action icons (mask so they inherit currentColor incl. white on accent) */
.woocommerce-orders-table__cell-order-actions a.view::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.woocommerce-orders-table__cell-order-actions a.reorder::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E");
}
.woocommerce-orders-table__cell-order-actions a.pay::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
}
.woocommerce-orders-table__cell-order-actions a.paused-restart::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='6 4 20 12 6 20 6 4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='6 4 20 12 6 20 6 4'/%3E%3C/svg%3E");
}
.woocommerce-orders-table__cell-order-actions a.paused-update::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E");
}
.woocommerce-orders-table__cell-order-actions a.cancel::before { display: none; }

/* ---------------------------------------------------------------------------
 * Per-status accent tokens (row spine, pill, dot, progress fill)
 * driven by WC's row modifier class .woocommerce-orders-table__row--status-*
 * ------------------------------------------------------------------------- */
.woocommerce-orders-table__row--status-completed {
	--acc-ol-st: #12805c; --acc-ol-st-tint: #e6f5ee; --acc-ol-st-ink: #0c6045;
}
.woocommerce-orders-table__row--status-processing,
.woocommerce-orders-table__row--status-in-progress {
	--acc-ol-st: #2563eb; --acc-ol-st-tint: #e8effd; --acc-ol-st-ink: #1d4ed8;
}
.woocommerce-orders-table__row--status-partial {
	--acc-ol-st: #b45309; --acc-ol-st-tint: #fbefdc; --acc-ol-st-ink: #92400e;
}
.woocommerce-orders-table__row--status-paused {
	--acc-ol-st: #d9480f; --acc-ol-st-tint: #ffe9df; --acc-ol-st-ink: #b3350a;
}
.woocommerce-orders-table__row--status-pending,
.woocommerce-orders-table__row--status-on-hold {
	--acc-ol-st: #8a6d00; --acc-ol-st-tint: #f7f0d4; --acc-ol-st-ink: #6b5400;
}
.woocommerce-orders-table__row--status-failed {
	--acc-ol-st: #dc2626; --acc-ol-st-tint: #fdeaea; --acc-ol-st-ink: #b91c1c;
}
.woocommerce-orders-table__row--status-cancelled,
.woocommerce-orders-table__row--status-refunded {
	--acc-ol-st: #6b7280; --acc-ol-st-tint: #eef0f3; --acc-ol-st-ink: #4b5563;
}

/* ---------------------------------------------------------------------------
 * Empty state — routes a no-orders customer to Services / top-up (recurring rev)
 * ------------------------------------------------------------------------- */
.acc-ol-empty {
	max-width: 560px;
	margin: 8px auto 4px;
	padding: 40px 28px;
	text-align: center;
	background: var(--acc-ol-card);
	border: 1px solid rgba(17, 17, 26, 0.10);
	border-radius: 20px;
	box-shadow: 0 1px 2px rgba(17, 17, 26, 0.04), 0 10px 30px rgba(17, 17, 26, 0.07);
}
.acc-ol-empty-ic {
	width: 60px;
	height: 60px;
	margin: 0 auto 18px;
	display: grid;
	place-items: center;
	border-radius: 18px;
	color: #fff;
	background: linear-gradient(130deg, #f80031, #ff6e40);
	box-shadow: 0 8px 22px rgba(248, 0, 49, 0.28);
}
.acc-ol-empty-ic svg { width: 30px; height: 30px; }
.acc-ol-empty-h {
	margin: 0 0 8px;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #16161c;
}
.acc-ol-empty-p {
	margin: 0 auto 22px;
	max-width: 440px;
	font-size: 14.5px;
	line-height: 1.55;
	color: #5b6270;
}
.acc-ol-empty-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.acc-ol-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 12px;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.16s ease;
}
.acc-ol-btn svg { width: 17px; height: 17px; }
.acc-ol-btn--primary {
	background: linear-gradient(130deg, #f80031, #ff6e40);
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(248, 0, 49, 0.26);
}
.acc-ol-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(248, 0, 49, 0.34); }
.acc-ol-btn--ghost {
	background: #fff;
	color: #16161c !important;
	border: 1px solid rgba(17, 17, 26, 0.16);
}
.acc-ol-btn--ghost:hover { transform: translateY(-1px); border-color: #16161c; }
.acc-ol-btn:focus-visible { outline: 2px solid #f80031; outline-offset: 2px; }

/* when the custom empty hero is present, suppress WC's plain fallback notice.
   Scoped to a sibling of .acc-ol-empty (only printed when there are no orders),
   so it can never hide unrelated notices. */
.acc-ol-empty ~ .woocommerce-info,
.acc-ol-empty ~ .woocommerce-message.woocommerce-info { display: none; }

/* ---------------------------------------------------------------------------
 * Pagination — NUMERIC. WooCommerce core's myaccount/orders.php ships only a
 * Previous/Next pager (.woocommerce-pagination--without-numbers); we hide that
 * and render a numbered pager (orders_list.php → paginate_links) so a customer
 * with many orders can jump straight to a page.
 * ------------------------------------------------------------------------- */
.woocommerce-account .woocommerce-orders-table ~ .woocommerce-pagination--without-numbers { display: none; }
.woocommerce-account .woocommerce-orders-table + .acc-ol-pagination { margin-top: 18px; }
.acc-ol-pagination { text-align: center; }
.acc-ol-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.acc-ol-pagination ul.page-numbers li { margin: 0; }
/* Match the balance/rewards history pager (.acc-pagination .acc-page): flat
   light-grey pills sized by padding, muted text, a solid red "current", no
   borders — instead of the bordered/dark-current chips this pager used before. */
.acc-ol-pagination li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 13px;
	border: 0;
	border-radius: 10px;
	background: #f7f8f9;
	color: #777;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.acc-ol-pagination li a.page-numbers:hover,
.acc-ol-pagination li a.page-numbers:focus-visible {
	background: #eef0f3;
	color: #16161c;
	outline: none;
}
.acc-ol-pagination li .page-numbers.current {
	background: #f80031;
	color: #ffffff;
}
.acc-ol-pagination li .page-numbers.dots {
	background: transparent;
	color: #777;
}

/* ---------------------------------------------------------------------------
 * Mobile — stacked single-column cards
 * ------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------
 * Mobile: a wide 8-column table can't stay a table on a phone, so each row
 * collapses into a compact card and every cell becomes a label→value line
 * (the .acc-ol-k inline labels — hidden on desktop — reappear here).
 * ------------------------------------------------------------------------- */
@media (max-width: 860px) {
	.woocommerce-orders-table {
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible;
	}
	.woocommerce-orders-table > thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.woocommerce-orders-table > tbody {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}
	.woocommerce-orders-table > tbody > tr.order {
		display: flex;
		flex-direction: column;
		gap: 9px;
		padding: 16px 16px 16px 20px !important;
		background: var(--acc-ol-card);
		border: 1px solid var(--acc-ol-line) !important;
		border-radius: var(--acc-ol-radius);
		box-shadow: var(--acc-ol-shadow);
	}
	.woocommerce-orders-table > tbody > tr.order:hover { background: var(--acc-ol-card); }
	.woocommerce-orders-table > tbody > tr.order > td {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 12px;
		padding: 4px 0 !important;
		text-align: right;
		box-shadow: none !important;
	}
	/* Status spine moves to the whole card's left edge. */
	.woocommerce-orders-table > tbody > tr.order {
		position: relative;
		overflow: hidden;
	}
	.woocommerce-orders-table > tbody > tr.order::before {
		content: "";
		position: absolute;
		inset: 0 auto 0 0;
		width: 4px;
		background: var(--acc-ol-st);
	}
	/* Service + Actions span the full card width, stacked. */
	.woocommerce-orders-table__cell-order-product,
	.woocommerce-orders-table__cell-order-actions {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
	}
	/* The inline label reappears on the left of each stacked line. */
	.acc-ol-k { display: inline-flex; color: var(--acc-ol-muted); font-size: 12px; font-weight: 600; }
	.woocommerce-orders-table__cell-order-status,
	.woocommerce-orders-table__cell-order-status .acc-ol-status { text-align: right; align-items: flex-end; }
	.acc-ol-caption { max-width: none; }
	.acc-ol-prog { max-width: none; }
	/* Order number stays a clean, full-width flex row (label left, value right).
	   Max-specificity selector variant included: theme/WC-core responsive-table
	   rules (loaded outside this plugin) were out-ranking the plain class here
	   and re-adding cell padding on phones. */
	.woocommerce-orders-table__cell-order-number,
	.woocommerce-account table.woocommerce-orders-table td.woocommerce-orders-table__cell.woocommerce-orders-table__cell-order-number {
		display: flex !important;
		justify-content: space-between;
		align-items: center;
		padding: 0px !important;
	}
	.woocommerce-orders-table__cell-order-actions { flex-direction: row; flex-wrap: wrap; }
	.woocommerce-orders-table__cell-order-actions a { flex: 1 1 130px; }
	.woocommerce-orders-table__cell-order-actions a.cancel { flex-basis: 100%; }
}

@media (max-width: 400px) {
	.woocommerce-orders-table__cell-order-actions a { flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------
 * Reduced motion
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.woocommerce-orders-table > tbody > tr.order,
	.woocommerce-orders-table__cell-order-actions a,
	.acc-ol-btn,
	.acc-ol-copy,
	.acc-ol-prog-fill {
		transition: none !important;
	}
	.woocommerce-orders-table.acc-ol-js > tbody > tr.acc-ol-clickable:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * Dark-scheme UAs — keep the cards legible if the store renders dark
 * ------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	.woocommerce-orders-table {
		--acc-ol-ink: #f3f4f6;
		--acc-ol-ink-2: #d6d9e0;
		--acc-ol-muted: #9aa1ad;
		--acc-ol-line: rgba(255, 255, 255, 0.12);
		--acc-ol-line-strong: rgba(255, 255, 255, 0.22);
		--acc-ol-card: #16171b;
		--acc-ol-card-2: #1e2026;
		--acc-ol-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
		--acc-ol-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 34px rgba(0, 0, 0, 0.6);
	}
	.woocommerce-orders-table__cell-order-actions a.view {
		background: #1e2026;
		color: var(--acc-ol-ink) !important;
	}
	.acc-ol-copy.is-copied { color: #34d399; }
	.acc-ol-empty { background: #16171b; border-color: rgba(255, 255, 255, 0.12); }
	.acc-ol-empty-h { color: #f3f4f6; }
	.acc-ol-empty-p { color: #9aa1ad; }
	.acc-ol-btn--ghost { background: #1e2026; color: #f3f4f6 !important; border-color: rgba(255, 255, 255, 0.22); }
	.acc-ol-pagination li .page-numbers {
		background: #1e2026;
		color: #9aa1ad;
	}
	.acc-ol-pagination li a.page-numbers:hover,
	.acc-ol-pagination li a.page-numbers:focus-visible {
		background: #2a2d34;
		color: #f3f4f6;
	}
	.acc-ol-pagination li .page-numbers.current {
		background: #f80031;
		color: #ffffff;
	}
	.acc-ol-pagination li .page-numbers.dots {
		background: transparent;
		color: #9aa1ad;
	}
}

/* ---------------------------------------------------------------------------
 * Requested tweaks: status row layout, order-row buttons, mobile stacking.
 * ------------------------------------------------------------------------- */
.woocommerce-orders-table__cell-order-status .acc-ol-status {
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 5px;
	text-align: right;
}
.woocommerce table.my_account_orders .button {
	padding: 5px 10px;
	justify-content: center;
	display: flex;
	border-width: 0;
	border-radius: 14px;
}
.woocommerce-orders-table > tbody > tr.order::before { width: 0; }
@media (max-width: 860px) {
	.woocommerce-orders-table > tbody > tr.order > td {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 12px;
		padding: 0 !important;
		text-align: right;
		box-shadow: none !important;
	}
	.woocommerce-orders-table__cell-order-status,
	.woocommerce-orders-table__cell-order-status .acc-ol-status {
		text-align: right;
		align-items: center;
	}
	.woocommerce-orders-table > tbody > tr.order { border-radius: 26px; }
}

/* ---------------------------------------------------------------------------
 * Button hover on My-Account orders + order (view-order) pages. The theme's
 * default `.button:hover` fills them with var(--contrast) (near-black) + white
 * text; restyle the hover on-brand (accent gradient, readable) so they never
 * go black. Loaded on every account page, so covers the list AND view-order.
 * ------------------------------------------------------------------------- */
.woocommerce-account .woocommerce-orders-table .button:hover,
.woocommerce-account .woocommerce-orders-table .button:focus,
.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .button:focus,
body.acc-thankyou .woocommerce .button:hover,
body.acc-thankyou .woocommerce .button:focus {
	color: #fff !important;
	background: linear-gradient(130deg, #f80031, #ff6e40) !important;
	background-color: #f80031 !important;
	border-color: transparent !important;
}

/* Requested: order-status left-aligned + roomier gap; lighter caption weight. */
.woocommerce-orders-table__cell-order-status .acc-ol-status { text-align: left; gap: 10px; }
.acc-ol-caption { font-weight: 400; }
@media (max-width: 860px) {
	.woocommerce-orders-table__cell-order-status,
	.woocommerce-orders-table__cell-order-status .acc-ol-status { text-align: left; }
}

/* Requested: order-action buttons use the calm "View" look EXCEPT the two
   conversion CTAs — reorder (brand RED) and pay (brand ORANGE) — which this
   blanket !important rule was silently turning grey (it out-ranked their
   gradient rules above). Restart no longer renders here at all (the paused
   order page owns the restart flow), but the :not() stays as a guard. */
.woocommerce-orders-table__cell-order-actions a.button:not(.paused-restart):not(.reorder):not(.pay) {
	background: var(--acc-ol-card-2) !important;
	border-color: var(--acc-ol-line-strong) !important;
	color: var(--acc-ol-ink) !important;
}
.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button:not(.paused-restart):not(.reorder):not(.pay):hover,
.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button:not(.paused-restart):not(.reorder):not(.pay):focus {
	background: var(--acc-ol-line-strong) !important;
	border-color: var(--acc-ol-line-strong) !important;
	color: var(--acc-ol-ink) !important;
}

/* Motion system: delivery-progress fills grow in from the left on first paint
   (matches the view-order hero bar); disabled for reduced-motion visitors. */
@media (prefers-reduced-motion: no-preference) {
	.acc-ol-prog-fill {
		transform-origin: left center;
		animation: acc-ol-grow .7s cubic-bezier(.2, .7, .2, 1) both;
	}
	@keyframes acc-ol-grow {
		from { transform: scaleX(0); }
		to { transform: scaleX(1); }
	}
}

/* Requested: left-align the status flex content (overrides justify-content:center
   above) and the status/actions column headers (overrides the right-align set
   near the top). Newest source-order → final say. */
.woocommerce-orders-table__cell-order-status .acc-ol-status {
	justify-content: start;
}
.woocommerce-orders-table > thead > tr > th.woocommerce-orders-table__header-order-status,
.woocommerce-orders-table > thead > tr > th.woocommerce-orders-table__header-order-actions {
	text-align: left;
}
