/**
 * My Account.
 *
 * Matches the basket and checkout: light grey page, white cards with a
 * hairline border, navy headings, red primary buttons, and totals
 * right-aligned in the same style as the order summary.
 */

body.woocommerce-account {
	--mr-navy: #0b2856;
	--mr-red: #ed1111;
	--mr-muted: #5b7091;
	--mr-line: #e3e9f2;
	--mr-green: #1f9d55;
	background: #f4f6fa;
}

body.woocommerce-account .woocommerce {
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 32px 40px;
	font-family: Arial, Helvetica, sans-serif;
	color: var(--mr-navy);
}

/* Page title */
body.woocommerce-account .page-header .entry-title,
body.woocommerce-account .entry-title {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.4px;
	text-transform: none;
	color: var(--mr-navy);
}

/* ---------------------------------------------------------------
   Two column shell: navigation card + content card
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce::after { content: none; }

body.woocommerce-account .woocommerce-MyAccount-navigation {
	float: none;
	width: 100%;
	margin: 0 0 20px;
}

body.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: 100%;
	background: #fff;
	border: 1px solid var(--mr-line);
	border-radius: 12px;
	padding: 24px 28px 26px;
	font-size: 15px;
	line-height: 1.6;
}

@media (min-width: 900px) {
	body.woocommerce-account .woocommerce {
		display: grid;
		grid-template-columns: 250px minmax(0, 1fr);
		align-items: start;
		gap: 22px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation { margin: 0; }
}

/* Navigation */
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid var(--mr-line);
	border-radius: 12px;
	overflow: hidden;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	border-bottom: 1px solid var(--mr-line);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 600;
	color: var(--mr-navy);
	text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background: #f6f8fc;
	color: var(--mr-navy);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: #eef3fb;
	color: var(--mr-navy);
	box-shadow: inset 3px 0 0 var(--mr-red);
}

/* ---------------------------------------------------------------
   Headings and intro line
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-content h2,
body.woocommerce-account .woocommerce-order-details__title,
body.woocommerce-account .woocommerce-column__title,
body.woocommerce-account .woocommerce-Address-title h3 {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 800;
	color: var(--mr-navy);
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
	margin: 0 0 18px;
	padding: 12px 16px;
	background: #eef3fb;
	border-radius: 8px;
	font-size: 15px;
}

/* ---------------------------------------------------------------
   Order tables
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table,
body.woocommerce-account table.woocommerce-orders-table {
	width: 100%;
	margin: 0 0 22px;
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
	font-size: 14px;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
body.woocommerce-account table.woocommerce-orders-table th {
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--mr-line);
	background: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--mr-muted);
	text-align: left;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td,
body.woocommerce-account table.woocommerce-orders-table td {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--mr-line);
	background: none;
	color: var(--mr-navy);
	vertical-align: middle;
}

/* Amounts hard right */
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table th:last-child,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table td:last-child,
body.woocommerce-account table.woocommerce-orders-table th:last-child,
body.woocommerce-account table.woocommerce-orders-table td:last-child {
	text-align: right;
	white-space: nowrap;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot th {
	font-size: 14px;
	text-transform: none;
	letter-spacing: 0;
	color: var(--mr-navy);
	font-weight: 700;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot tr:last-child th,
body.woocommerce-account .woocommerce-MyAccount-content table.shop_table tfoot tr:last-child td {
	border-bottom: 0;
	padding-top: 14px;
	font-size: 18px;
	font-weight: 800;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table a {
	color: var(--mr-navy);
	font-weight: 600;
	text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-content table.shop_table a:hover {
	text-decoration: underline;
}

body.woocommerce-account .woocommerce-Price-amount { color: var(--mr-navy); }

body.woocommerce-account small.includes_tax,
body.woocommerce-account small.includes_tax .woocommerce-Price-amount {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 400;
	color: var(--mr-muted);
}

/* ---------------------------------------------------------------
   Addresses
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce-customer-details .woocommerce-columns--addresses,
body.woocommerce-account .u-columns.addresses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
}

body.woocommerce-account .woocommerce-customer-details .col-1,
body.woocommerce-account .woocommerce-customer-details .col-2,
body.woocommerce-account .addresses .col-1,
body.woocommerce-account .addresses .col-2 {
	float: none;
	width: auto;
	padding: 0;
}

body.woocommerce-account address {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid var(--mr-line);
	border-radius: 10px;
	background: #fff;
	font-style: normal;
	font-size: 14px;
	line-height: 1.6;
	color: var(--mr-navy);
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-content .button,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button {
	display: inline-block;
	padding: 11px 20px;
	border: 0;
	border-radius: 6px;
	background: var(--mr-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	text-shadow: none;
}

body.woocommerce-account .woocommerce-MyAccount-content .button:hover,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button:hover {
	background: #143a76;
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-content .button.pay,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-button.pay {
	background: var(--mr-red);
}

body.woocommerce-account .woocommerce-MyAccount-content .button.pay:hover {
	background: #c90d0d;
}

body.woocommerce-account .woocommerce-MyAccount-content .button.cancel {
	background: #fff;
	color: var(--mr-navy);
	border: 1px solid #c8d3e4;
}

/* Form fields, matched to checkout */
body.woocommerce-account .woocommerce-MyAccount-content .input-text,
body.woocommerce-account .woocommerce-MyAccount-content select {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #c8d3e4;
	border-radius: 6px;
	font-size: 14px;
	color: var(--mr-navy);
	background: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-content label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mr-navy);
}

@media (max-width: 700px) {
	body.woocommerce-account .woocommerce { padding: 8px 16px 30px; }
	body.woocommerce-account .woocommerce-customer-details .woocommerce-columns--addresses,
	body.woocommerce-account .u-columns.addresses { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------
   Explicit column placement

   Auto-placement put the navigation in the second track and the content
   in the first, despite correct DOM order and no order/grid-column set
   on either. Placing both explicitly removes the ambiguity.
   --------------------------------------------------------------- */

@media (min-width: 900px) {
	body.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
		grid-column: 1;
		grid-row: 1;
	}

	body.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
		grid-column: 2;
		grid-row: 1;
	}
}

/* ---------------------------------------------------------------
   Fixes

   1. The VAT note: an earlier rule set display:block on both the <small>
      and the price inside it, so "(includes", the amount and "VAT)" each
      took their own line. Only the wrapper should be block.
   2. Order action buttons rendered navy text on a navy background. The
      colour was losing to a link rule, so these selectors include the
      element type to outrank it.
   --------------------------------------------------------------- */

body.woocommerce-account small.includes_tax .woocommerce-Price-amount {
	display: inline;
	white-space: nowrap;
}

body.woocommerce-account small.includes_tax {
	display: block;
	white-space: nowrap;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button,
body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button,
body.woocommerce-account .woocommerce-MyAccount-content button.button,
body.woocommerce-account .woocommerce-MyAccount-content input.button {
	color: #fff;
	background: var(--mr-navy);
	border: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button:hover,
body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button:hover {
	color: #fff;
	background: #143a76;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button.pay {
	background: var(--mr-red);
}

body.woocommerce-account .woocommerce-MyAccount-content a.button.pay:hover {
	background: #c90d0d;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button.cancel,
body.woocommerce-account .woocommerce-MyAccount-content a.button.invoice {
	background: #fff;
	color: var(--mr-navy);
	border: 1px solid #c8d3e4;
}

body.woocommerce-account .woocommerce-MyAccount-content a.button.invoice:hover {
	background: #f6f8fc;
	color: var(--mr-navy);
	border-color: var(--mr-navy);
}

/* Order action cells sit right with a little breathing room */
body.woocommerce-account .woocommerce-MyAccount-content td.order-actions,
body.woocommerce-account .woocommerce-MyAccount-content .order-actions-button {
	text-align: right;
}

/* ---------------------------------------------------------------
   Order action buttons, final

   A single-class selector (a.button) kept losing its colour to a link
   rule, leaving navy text on a navy background. Two classes on the
   anchor wins, which is why the Invoice button already worked.

   Pay is the primary action, View and Invoice are secondary.
   --------------------------------------------------------------- */

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.button {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid #c8d3e4;
	border-radius: 6px;
	background: #fff;
	color: var(--mr-navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.button:hover {
	background: #f6f8fc;
	border-color: var(--mr-navy);
	color: var(--mr-navy);
}

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.pay {
	background: var(--mr-red);
	border-color: var(--mr-red);
	color: #fff;
	font-weight: 700;
}

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.pay:hover {
	background: #c90d0d;
	border-color: #c90d0d;
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.cancel {
	color: var(--mr-muted);
}

body.woocommerce-account .woocommerce-MyAccount-content a.woocommerce-button.cancel:hover {
	color: var(--mr-red);
	border-color: var(--mr-red);
}

/* Space between stacked actions */
body.woocommerce-account .woocommerce-orders-table__cell-order-actions a {
	margin: 2px 0 2px 6px;
}