/**
 * My Account – minimal restyle. Targets default WooCommerce markup only.
 * No template overrides; no hiding of elements. Safe additive styles.
 */

/* Only on account page */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	box-sizing: border-box;
}

/* Messages unread badge in My Account sidebar (matches header account dropdown pill) */
.woocommerce-account .woocommerce-MyAccount-navigation-link--messages a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--messages .erm-messages-unread-badge--my-account-nav .ermw-messages-unread-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 6px;
	border-radius: 999px;
	background: #ef4444;
	color: #ffffff !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

/* Nav: spacing and active/hover (default WC uses .is-active on current item) */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0 0 4px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
	background: #eef4ff;
	color: #1f4d92;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: #eef4ff;
	color: #1f4d92;
	font-weight: 600;
}

/* Content area: card feel, padding */
.woocommerce-account .woocommerce-MyAccount-content {
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

/* Orders empty state: style the default WC notice + button */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info {
	padding: 1.5rem 1.25rem;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #f8fafc;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button.wc-forward {
	display: inline-block;
	margin-top: 12px;
	padding: 10px 20px;
	border-radius: 10px;
	font-weight: 600;
	background: #1f4d92;
	color: #fff;
	border: 0;
	text-decoration: none;
	transition: background 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-content .woocommerce-info .button:hover,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Button.wc-forward:hover {
	background: #173e75;
	color: #fff;
}

/**
 * --------------------------------------------------------------------------
 * Orders list (/my-account/orders/) — modern table + status badges
 * --------------------------------------------------------------------------
 */
.woocommerce-account {
	--erm-ma-border: #e5e7eb;
	--erm-ma-surface: #f8fafc;
	--erm-ma-text: #0f172a;
	--erm-ma-muted: #64748b;
	--erm-ma-accent: #1f4d92;
	--erm-ma-accent-soft: #edf4ff;
	--erm-ma-teal: #0e7490;
	--erm-ma-teal-soft: rgba(14, 116, 144, 0.1);
	--erm-ma-radius: 12px;
	--erm-ma-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.woocommerce-account .woocommerce-MyAccount-orders.shop_table {
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--erm-ma-radius);
	overflow: hidden;
	border: 1px solid var(--erm-ma-border);
	box-shadow: var(--erm-ma-shadow);
	background: #fff;
}

.woocommerce-account .woocommerce-MyAccount-orders thead {
	background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
}

.woocommerce-account .woocommerce-MyAccount-orders thead th {
	padding: 14px 16px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--erm-ma-muted);
	border-bottom: 1px solid var(--erm-ma-border);
	vertical-align: middle;
}

.woocommerce-account .woocommerce-MyAccount-orders thead .woocommerce-orders-table__header-order-status {
	text-align: center;
}

.woocommerce-account .woocommerce-MyAccount-orders tbody tr {
	transition: background 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-orders tbody tr:hover {
	background: var(--erm-ma-accent-soft);
}

.woocommerce-account .woocommerce-MyAccount-orders tbody td,
.woocommerce-account .woocommerce-MyAccount-orders tbody th {
	padding: 16px;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
	vertical-align: middle;
	font-size: 0.9375rem;
	color: var(--erm-ma-text);
}

.woocommerce-account .woocommerce-MyAccount-orders tbody tr:last-child td,
.woocommerce-account .woocommerce-MyAccount-orders tbody tr:last-child th {
	border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-number a {
	font-weight: 600;
	color: var(--erm-ma-accent);
	text-decoration: none;
}

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

.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-date time {
	color: var(--erm-ma-muted);
	font-size: 0.9rem;
}

/* Status column: compact pill on inner span (see child theme orders.php) */
.woocommerce-account .woocommerce-MyAccount-orders td.woocommerce-orders-table__cell-order-status {
	text-align: center;
	vertical-align: middle;
}

.woocommerce-account .erm-account-order-status-pill {
	display: inline-block;
	max-width: 100%;
	padding: 0.28rem 0.7rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
	border-radius: 999px;
	box-sizing: border-box;
	background: #f1f5f9;
	color: #475569;
	box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.45);
}

.woocommerce-account .erm-account-order-status-pill--pending,
.woocommerce-account .erm-account-order-status-pill--on-hold {
	background: #fffbeb;
	color: #b45309;
	box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.woocommerce-account .erm-account-order-status-pill--processing,
.woocommerce-account .erm-account-order-status-pill--wc-in-progress,
.woocommerce-account .erm-account-order-status-pill--in-progress {
	background: #e0f2fe;
	color: #0369a1;
	box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.35);
}

.woocommerce-account .erm-account-order-status-pill--wc-dispatched,
.woocommerce-account .erm-account-order-status-pill--dispatched {
	background: #ede9fe;
	color: #5b21b6;
	box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.woocommerce-account .erm-account-order-status-pill--completed {
	background: #ecfdf5;
	color: #047857;
	box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.woocommerce-account .erm-account-order-status-pill--cancelled,
.woocommerce-account .erm-account-order-status-pill--failed {
	background: #fef2f2;
	color: #b91c1c;
	box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.woocommerce-account .erm-account-order-status-pill--refunded {
	background: #f5f3ff;
	color: #6d28d9;
	box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.4);
}

.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-total {
	font-weight: 600;
	color: var(--erm-ma-text);
}

/* View / Pay buttons */
.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-actions a.button,
.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-actions a.woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.35rem;
	padding: 0.45rem 1.1rem;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	border: 1px solid rgba(31, 77, 146, 0.35);
	background: linear-gradient(180deg, #2563c4 0%, var(--erm-ma-accent) 100%);
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-actions a.button:hover,
.woocommerce-account .woocommerce-MyAccount-orders .woocommerce-orders-table__cell-order-actions a.woocommerce-button:hover {
	filter: brightness(1.05);
	box-shadow: 0 2px 8px rgba(31, 77, 146, 0.25);
	color: #fff !important;
}

.woocommerce-account .woocommerce-Pagination {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.woocommerce-account .woocommerce-Pagination a.button {
	border-radius: 8px;
	font-weight: 600;
	padding: 0.5rem 1rem;
}

@media screen and (max-width: 768px) {
	.woocommerce-account table.shop_table_responsive.woocommerce-MyAccount-orders tbody tr td {
		padding: 10px 12px;
	}

	.woocommerce-account .woocommerce-MyAccount-orders td.woocommerce-orders-table__cell-order-status {
		text-align: left;
	}

	.woocommerce-account .erm-account-order-status-pill {
		white-space: normal;
		max-width: 100%;
	}
}

/**
 * --------------------------------------------------------------------------
 * View single order (/my-account/view-order/x/)
 * --------------------------------------------------------------------------
 */
.woocommerce-view-order .erm-account-order-intro {
	margin: 0 0 1.5rem;
	padding: 1.15rem 1.35rem;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--erm-ma-text);
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid var(--erm-ma-border);
	border-radius: var(--erm-ma-radius);
	box-shadow: var(--erm-ma-shadow);
}

.woocommerce-view-order .erm-account-order-intro mark {
	background: transparent;
	color: inherit;
	font-weight: 600;
	padding: 0;
}

.woocommerce-view-order .erm-account-order-intro mark.order-number {
	color: var(--erm-ma-accent);
}

.woocommerce-view-order .erm-account-order-intro mark.order-date {
	color: var(--erm-ma-muted);
	font-weight: 500;
}

.woocommerce-view-order .erm-account-order-intro mark.order-status {
	display: inline-block;
	margin-left: 0.15em;
	padding: 0.25em 0.65em;
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.02em;
	border-radius: 999px;
	vertical-align: middle;
}

/* Status badge colors (slug from order) */
.woocommerce-view-order mark.order-status--pending,
.woocommerce-view-order mark.order-status--on-hold {
	background: #fffbeb;
	color: #b45309;
	box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.woocommerce-view-order mark.order-status--processing,
.woocommerce-view-order mark.order-status--wc-in-progress,
.woocommerce-view-order mark.order-status--in-progress {
	background: #e0f2fe;
	color: #0369a1;
	box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.35);
}

.woocommerce-view-order mark.order-status--wc-dispatched,
.woocommerce-view-order mark.order-status--dispatched {
	background: #ede9fe;
	color: #5b21b6;
	box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.woocommerce-view-order mark.order-status--completed {
	background: #ecfdf5;
	color: #047857;
	box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.woocommerce-view-order mark.order-status--cancelled,
.woocommerce-view-order mark.order-status--failed {
	background: #fef2f2;
	color: #b91c1c;
	box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.woocommerce-view-order mark.order-status--refunded {
	background: #f5f3ff;
	color: #6d28d9;
	box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.4);
}

/* Order details section */
.woocommerce-view-order .woocommerce-order-details {
	margin-bottom: 1.75rem;
	padding: 1.25rem 1.35rem 1.5rem;
	background: #fff;
	border: 1px solid var(--erm-ma-border);
	border-radius: var(--erm-ma-radius);
	box-shadow: var(--erm-ma-shadow);
}

.woocommerce-view-order .woocommerce-order-details__title {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--erm-ma-text);
}

.woocommerce-view-order .woocommerce-table--order-details {
	border: none;
	border-radius: 10px;
	overflow: hidden;
	margin: 0;
}

.woocommerce-view-order .woocommerce-table--order-details thead th {
	padding: 12px 14px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--erm-ma-muted);
	background: var(--erm-ma-surface);
	border-bottom: 1px solid var(--erm-ma-border);
}

.woocommerce-view-order .woocommerce-table--order-details tbody td,
.woocommerce-view-order .woocommerce-table--order-details tbody th {
	padding: 14px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: top;
}

.woocommerce-view-order .woocommerce-table--order-details tbody tr:last-child td,
.woocommerce-view-order .woocommerce-table--order-details tbody tr:last-child th {
	border-bottom: none;
}

.woocommerce-view-order .woocommerce-table--order-details tbody a {
	color: var(--erm-ma-accent);
	font-weight: 500;
	text-decoration: none;
}

.woocommerce-view-order .woocommerce-table--order-details tbody a:hover {
	text-decoration: underline;
}

.woocommerce-view-order .woocommerce-table--order-details tfoot th,
.woocommerce-view-order .woocommerce-table--order-details tfoot td {
	padding: 12px 14px;
	background: #fafbfc;
	font-size: 0.9rem;
	border-top: 1px solid var(--erm-ma-border);
}

.woocommerce-view-order .woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-view-order .woocommerce-table--order-details tfoot tr:last-child td {
	font-size: 1.05rem;
	font-weight: 700;
	background: var(--erm-ma-accent-soft);
	color: var(--erm-ma-text);
}

.woocommerce-view-order .woocommerce-table--order-details .order-actions-button,
.woocommerce-view-order .woocommerce-table--order-details a.button {
	border-radius: 8px;
	font-weight: 600;
	margin-right: 0.35rem;
	margin-bottom: 0.25rem;
}

/* Back to orders (view single order) */
.woocommerce-view-order .erm-account-back-to-orders {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 1rem;
	padding: 0.4rem 0.75rem 0.4rem 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--erm-ma-accent);
	border: 1px solid rgba(31, 77, 146, 0.28);
	border-radius: 0.5rem;
	background: rgba(31, 77, 146, 0.06);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.woocommerce-view-order .erm-account-back-to-orders:hover,
.woocommerce-view-order .erm-account-back-to-orders:focus {
	background: rgba(31, 77, 146, 0.11);
	border-color: rgba(31, 77, 146, 0.45);
	color: #173e75;
	text-decoration: none;
}

.woocommerce-view-order .erm-account-back-to-orders-icon {
	font-size: 1.05em;
	line-height: 1;
	opacity: 0.9;
}

/* Customer address cards — override WC .col2-set floats so columns sit side by side */
.woocommerce-view-order .woocommerce-customer-details {
	margin-top: 0.5rem;
	clear: both;
}

.woocommerce-view-order .woocommerce-columns--addresses.col2-set {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
	width: 100% !important;
	max-width: 100%;
	margin: 0.75rem 0 0;
	padding: 0;
	float: none !important;
	clear: both;
}

.woocommerce-view-order .woocommerce-columns--addresses.col2-set::before,
.woocommerce-view-order .woocommerce-columns--addresses.col2-set::after {
	display: none !important;
	content: none !important;
}

.woocommerce-view-order .woocommerce-columns--addresses .woocommerce-column--billing-address.col-1,
.woocommerce-view-order .woocommerce-columns--addresses .woocommerce-column--shipping-address.col-2,
.woocommerce-view-order .woocommerce-columns--addresses .col-1,
.woocommerce-view-order .woocommerce-columns--addresses .col-2 {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
}

@media screen and (max-width: 640px) {
	.woocommerce-view-order .woocommerce-columns--addresses.col2-set {
		grid-template-columns: 1fr;
	}
}

.woocommerce-view-order .woocommerce-column__title {
	margin: 0 0 0.65rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--erm-ma-muted);
}

.woocommerce-view-order .woocommerce-customer-details address,
.woocommerce-view-order .woocommerce-columns--addresses address {
	margin: 0;
	padding: 1rem 1.1rem;
	font-style: normal;
	line-height: 1.55;
	color: var(--erm-ma-text);
	background: #fff;
	border: 1px solid var(--erm-ma-border);
	border-radius: 10px;
	box-shadow: var(--erm-ma-shadow);
}

.woocommerce-view-order .woocommerce-customer-details--phone,
.woocommerce-view-order .woocommerce-customer-details--email {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--erm-ma-muted);
}

/* Order notes timeline */
.woocommerce-view-order .woocommerce-OrderUpdates.notes {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.woocommerce-view-order .woocommerce-OrderUpdate {
	margin: 0 0 0.75rem;
	padding: 0;
	border: 1px solid var(--erm-ma-border);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	box-shadow: var(--erm-ma-shadow);
}

.woocommerce-view-order .woocommerce-OrderUpdate-inner {
	padding: 0;
}

.woocommerce-view-order .woocommerce-OrderUpdate-meta {
	margin: 0;
	padding: 0.65rem 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erm-ma-muted);
	background: var(--erm-ma-surface);
	border-bottom: 1px solid var(--erm-ma-border);
}

.woocommerce-view-order .woocommerce-OrderUpdate-description {
	padding: 0.85rem 1rem 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* Orders endpoint: page title spacing */
.woocommerce-orders .woocommerce-MyAccount-content > h2:first-child,
.woocommerce-view-order .woocommerce-MyAccount-content > h2:first-child {
	margin-top: 0;
	font-size: clamp(1.25rem, 2vw, 1.45rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.woocommerce-view-order .woocommerce-MyAccount-content > h2:not(:first-child) {
	margin: 1.5rem 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--erm-ma-text);
}
