/* ===================================================================
   WooCommerce My Account > Orders -- modern reskin.
   Pure CSS reskin of WooCommerce's own stock markup (no template
   override exists for this page) plus the Reorder/Cancel Booking/
   Reschedule Booking actions Frontend/MPWPB_Wc_Account_Order_Actions.php
   adds via the woocommerce_my_account_my_orders_actions filter -- those
   render as ordinary `.woocommerce-button.{mpwpb_reorder|mpwpb_cancel|
   mpwpb_reschedule}` links, so no new markup was needed to reskin them.
   =================================================================== */

.woocommerce-MyAccount-content .woocommerce-orders-table {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}

.woocommerce-MyAccount-content .woocommerce-orders-table thead th {
	background: #f8fafc;
	border-bottom: 1px solid #e5e7eb;
	padding: 14px 18px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #64748b;
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody td,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody th {
	padding: 16px 18px;
	border-bottom: 1px solid #f1f5f9;
	font-size: 14px;
	color: #1e293b;
	vertical-align: middle;
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child td,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child th {
	border-bottom: 0;
}

.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:hover {
	background: #fafbfc;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a {
	font-weight: 700;
	color: #1d3fb8;
	text-decoration: none;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-number a:hover {
	text-decoration: underline;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-date {
	color: #64748b;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-total {
	font-weight: 600;
}

/* Status "pill" -- colored via WooCommerce's own per-row status class
   (`.woocommerce-orders-table__row--status-{slug}`, already present on
   every row), so no new PHP/JS is needed to know which color to use. */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-status::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	margin-right: 7px;
	vertical-align: middle;
}

.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status { color: #2563eb; }
.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status { color: #15803d; }
.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status { color: #b45309; }
.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-refunded .woocommerce-orders-table__cell-order-status { color: #dc2626; }

/* Action buttons -- codepoints below are read directly from the Font
   Awesome 6.7.2 Free build this plugin loads site-wide
   (mp_global/assets/admin/all.min.css), same verified-not-guessed
   approach used for the staff dashboard's nav icons. */
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
	white-space: nowrap;
}

/* Desktop: all actions in one row, vertically centered, never wrapping --
   flexbox on the <td> itself rather than per-button margins, which used to
   let buttons wrap onto a second line whenever the column got a bit
   narrow. Scoped to the same breakpoint WooCommerce's own
   shop_table_responsive uses, so the mobile stacked-card layout (each
   button its own line, see the @media block below) is untouched. */
@media (min-width: 769px) {
	.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 6px;
	}
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 6px 10px;
	margin: 2px 0;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	flex: 0 0 auto;
	text-decoration: none;
	border: 1px solid transparent;
	transition: opacity .15s ease, background-color .15s ease;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button::before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 12px;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.view {
	background: #1d3fb8;
	color: #fff;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.view::before {
	content: "\f06e";
	margin-right: 5px;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.view:hover { opacity: .88; }

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reorder {
	background: #fff;
	color: #1d3fb8;
	border-color: #c7d2fe;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reorder::before {
	content: "\f2f9";
	margin-right: 5px;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reorder:hover { background: #eef2ff; }

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reschedule {
	background: #fff;
	color: #475569;
	border-color: #e2e8f0;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reschedule::before {
	content: "\f073";
	margin-right: 5px;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_reschedule:hover { background: #f8fafc; }

.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_cancel {
	background: #fff;
	color: #dc2626;
	border-color: #fecaca;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_cancel::before {
	content: "\f05e";
	margin-right: 5px;
}
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button.mpwpb_cancel:hover { background: #fef2f2; }

/* Mobile -- WooCommerce's own shop_table_responsive breakpoint (768px,
   set via the stylesheet's own `media` attribute, not an @media block
   here) hides <thead> and stacks each <td> as a block with a
   data-title-driven label (::before { content: attr(data-title) },
   handled entirely by WooCommerce's own CSS -- left untouched here).
   This just turns each order row into its own card instead of a
   borderless stacked block. */
@media (max-width: 768px) {
	.woocommerce-MyAccount-content .woocommerce-orders-table {
		border: none;
		box-shadow: none;
		background: transparent;
	}
	.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr {
		display: block;
		margin-bottom: 14px;
		border: 1px solid #e5e7eb;
		border-radius: 12px;
		overflow: hidden;
		box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
	}
	.woocommerce-MyAccount-content .woocommerce-orders-table tbody td,
	.woocommerce-MyAccount-content .woocommerce-orders-table tbody th {
		border-bottom: 1px solid #f1f5f9 !important;
		padding: 12px 16px;
	}
	.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr td:last-child {
		border-bottom: 0 !important;
	}
	.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions .woocommerce-button {
		margin: 4px 4px 0 0;
	}
}
