/* MY ACCOUNT-1.0 — presentation of native Woo templates and extension endpoints. */
/* MY ACCOUNT-1.1 — use the existing body/main flow, as in Classic Cart C15. */
body.scc-account {
	display: flex;
	flex-direction: column;
	min-block-size: 100vh;
	min-block-size: 100dvh;
}
body.scc-account.admin-bar {
	min-block-size: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
	min-block-size: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}
body.scc-account > #primary { flex: 1 0 auto; min-inline-size: 0; }
body.scc-account > :is(.scc-header, .scc-footer) { flex: 0 0 auto; }
.scc-account #primary {
	padding-block: var(--scc-space-8) var(--scc-space-10);
}
.scc-account #primary .entry-header { margin-block-end: var(--scc-space-7); }
.scc-account #primary .entry-title {
	font-size: var(--scc-type-h1-size);
	line-height: var(--scc-type-h1-line-height);
}
.scc-account #primary .woocommerce {
	min-inline-size: 0;
	color: var(--scc-brand-foreground);
	font-size: var(--scc-type-body-large-size);
	line-height: var(--scc-type-body-large-line-height);
}
/* Only the logged-in account root has these direct children. Notices stay full width. */
.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation) {
	display: grid;
	grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
	gap: var(--scc-space-7) var(--scc-space-9);
	align-items: start;
}
.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation)::before,
.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation)::after { content: none; }
.scc-account #primary .woocommerce > .woocommerce-MyAccount-navigation {
	float: none;
	inline-size: auto;
	min-inline-size: 0;
	grid-column: 1;
}
.scc-account #primary .woocommerce > .woocommerce-MyAccount-content {
	float: none;
	inline-size: auto;
	min-inline-size: 0;
	grid-column: 2;
}
.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation) > :not(.woocommerce-MyAccount-navigation):not(.woocommerce-MyAccount-content) {
	grid-column: 1 / -1;
	min-inline-size: 0;
}
.scc-account #primary .woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.scc-account #primary .woocommerce-MyAccount-navigation li { margin: 0; border-block-end: 1px solid var(--scc-color-line); }
.scc-account #primary .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-block-size: var(--scc-control-min-target);
	padding: var(--scc-space-3) var(--scc-space-4);
	border-inline-start: 1px solid transparent;
	color: var(--scc-brand-foreground);
	text-decoration: none;
	overflow-wrap: anywhere;
}
.scc-account #primary .woocommerce-MyAccount-navigation .is-active > a,
.scc-account #primary .woocommerce-MyAccount-navigation a[aria-current="page"] {
	border-inline-start-color: var(--scc-brand-accent);
	font-weight: 600;
	color: var(--scc-brand-primary-background);
}
.scc-account #primary a:hover { color: var(--scc-brand-primary-background); }
.scc-account #primary :where(a, button, input, select, textarea):focus-visible {
	outline: var(--scc-focus-ring-width) solid var(--scc-brand-foreground);
	outline-offset: var(--scc-focus-ring-offset);
}
.scc-account #primary .woocommerce-MyAccount-content { overflow-wrap: anywhere; }
.scc-account #primary .woocommerce-MyAccount-content > p { margin-block: 0 var(--scc-space-5); max-inline-size: 75ch; }
.scc-account #primary .woocommerce h2 {
	font-size: var(--scc-type-h3-size);
	line-height: var(--scc-type-h3-line-height);
	margin-block: 0 var(--scc-space-5);
}
.scc-account #primary .woocommerce h3 {
	font-size: var(--scc-type-h4-size);
	line-height: var(--scc-type-h4-line-height);
}
/* The native login/register columns and native address cards share Woo's col2-set. */
.scc-account #primary .woocommerce .col2-set {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--scc-space-7);
	inline-size: 100%;
}
.scc-account #primary .woocommerce .col2-set::before,
.scc-account #primary .woocommerce .col2-set::after { content: none; }
.scc-account #primary .woocommerce .col2-set > .col-1,
.scc-account #primary .woocommerce .col2-set > .col-2 {
	float: none;
	inline-size: auto;
	min-inline-size: 0;
}
.scc-account #primary .woocommerce form.login,
.scc-account #primary .woocommerce form.register {
	margin-block: var(--scc-space-5) 0;
	padding: var(--scc-space-6);
	border: 1px solid var(--scc-brand-border);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-background);
	max-inline-size: 100%;
}
.scc-account #primary .woocommerce form.login { max-inline-size: 36rem; }
.scc-account #primary .woocommerce form .form-row { min-inline-size: 0; margin-block: 0 var(--scc-space-5); padding: 0; }
.scc-account #primary .woocommerce form .form-row label {
	font-size: var(--scc-type-body-size);
	line-height: var(--scc-type-body-line-height);
	margin-block-end: var(--scc-space-2);
}
.scc-account #primary .woocommerce form :where(input.input-text, textarea, select),
.scc-account #primary .select2-container .select2-selection--single {
	min-block-size: 48px;
	max-inline-size: 100%;
	inline-size: 100%;
	padding: var(--scc-space-3);
	border: 1px solid var(--scc-brand-border);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-background);
	color: var(--scc-brand-foreground);
	font-size: var(--scc-type-h4-size);
	line-height: var(--scc-type-body-line-height);
}
.scc-account #primary .woocommerce form textarea { min-block-size: 120px; resize: vertical; }
.scc-account #primary .woocommerce form .password-input { position: relative; inline-size: 100%; }
/* Reserve space even when Woo changes the native input type from password to text. */
.scc-account #primary .woocommerce form .password-input > input.input-text {
	padding-inline-end: calc(var(--scc-control-min-target) + var(--scc-space-3));
}
.scc-account #primary .woocommerce form .show-password-input {
	display: flex;
	align-items: center;
	justify-content: center;
	block-size: var(--scc-control-min-target);
	inline-size: var(--scc-control-min-target);
	min-block-size: var(--scc-control-min-target);
	min-inline-size: var(--scc-control-min-target);
	margin: 0;
	padding: 0;
	inset-block-start: 50%;
	inset-inline-end: 2px;
	transform: translateY(-50%);
}
.scc-account #primary .woocommerce form .show-password-input:focus-visible { outline-offset: -2px; }
.scc-account #primary .select2-container .select2-selection__rendered { padding: 0; line-height: var(--scc-space-6); }
.scc-account #primary .select2-container .select2-selection__arrow { block-size: 46px; }
.scc-account #primary .woocommerce form fieldset {
	min-inline-size: 0;
	margin-block: var(--scc-space-7);
	padding: var(--scc-space-5) 0 0;
	border: 0;
	border-block-start: 1px solid var(--scc-color-line);
}
.scc-account #primary .woocommerce form legend { padding-inline: 0 var(--scc-space-3); font-weight: 600; }
.scc-account #primary .woocommerce form :where(.woocommerce-form__label-for-checkbox, label.checkbox) {
	display: inline-flex;
	align-items: center;
	gap: var(--scc-space-2);
	min-block-size: var(--scc-control-min-target);
}
.scc-account #primary .woocommerce input[type="checkbox"],
.scc-account #primary .woocommerce input[type="radio"] { flex: 0 0 auto; accent-color: var(--scc-brand-primary-background); }
.scc-account #primary .woocommerce :where(a.button, button.button, input.button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: var(--scc-control-min-target);
	max-inline-size: 100%;
	padding: var(--scc-space-3) var(--scc-space-5);
	margin: var(--scc-space-1) var(--scc-space-1) var(--scc-space-1) 0;
	border: 1px solid var(--scc-brand-border);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-background);
	color: var(--scc-brand-foreground);
	font-size: var(--scc-type-body-size);
	font-weight: 600;
	line-height: var(--scc-type-body-line-height);
	white-space: normal;
	text-align: center;
	text-decoration: none;
}
.scc-account #primary .woocommerce button.button[type="submit"],
.scc-account #primary .woocommerce input.button[type="submit"] {
	background: var(--scc-brand-primary-background);
	border-color: var(--scc-brand-primary-background);
	color: var(--scc-color-white);
}
.scc-account #primary .woocommerce a.button:hover { border-color: var(--scc-brand-primary-background); color: var(--scc-brand-primary-background); text-decoration: none; }
.scc-account #primary .woocommerce button.button[type="submit"]:hover,
.scc-account #primary .woocommerce input.button[type="submit"]:hover {
	background: color-mix(in srgb, var(--scc-brand-primary-background) 90%, var(--scc-color-ink));
	color: var(--scc-color-white);
}
.scc-account #primary .woocommerce :where(button, input):disabled { opacity: var(--scc-state-disabled-opacity); cursor: not-allowed; }
.scc-account #primary .woocommerce .woocommerce-Address { padding-block-end: var(--scc-space-6); border-block-end: 1px solid var(--scc-color-line); }
.scc-account #primary .woocommerce .woocommerce-Address-title { display: flex; flex-wrap: wrap; gap: var(--scc-space-3); align-items: baseline; justify-content: space-between; }
.scc-account #primary .woocommerce .woocommerce-Address-title .edit { min-block-size: 44px; display: inline-flex; align-items: center; }
.scc-account #primary .woocommerce address { font-style: normal; line-height: var(--scc-type-body-large-line-height); overflow-wrap: anywhere; }
.scc-account #primary .woocommerce table.shop_table {
	inline-size: 100%;
	max-inline-size: 100%;
	border: 0;
	border-collapse: collapse;
	font-size: var(--scc-type-body-size);
	line-height: var(--scc-type-body-line-height);
}
.scc-account #primary .woocommerce table.shop_table th,
.scc-account #primary .woocommerce table.shop_table td {
	padding: var(--scc-space-4) var(--scc-space-3);
	border: 0;
	border-block-end: 1px solid var(--scc-color-line);
	vertical-align: top;
	overflow-wrap: anywhere;
	background: var(--scc-brand-background);
}
.scc-account #primary .woocommerce table.shop_table .nobr { white-space: normal; }
.scc-account #primary .woocommerce table.shop_table .woocommerce-Price-amount { font-variant-numeric: tabular-nums; }
.scc-account #primary .woocommerce table.woocommerce-table--order-details { table-layout: fixed; }
.scc-account #primary .woocommerce .woocommerce-Pagination { display: flex; flex-wrap: wrap; gap: var(--scc-space-3); margin-block-start: var(--scc-space-6); }
.scc-account #primary .flexible-invoices-document { margin-block-start: var(--scc-space-7); }
.scc-account #primary .flexible-invoices-document a { display: inline-flex; align-items: center; min-block-size: var(--scc-control-min-target); }
.scc-account #primary .woocommerce :where(.woocommerce-message, .woocommerce-info, .woocommerce-error) { font-size: var(--scc-type-body-size); overflow-wrap: anywhere; }
.scc-account #primary .woocommerce :where(.woocommerce-message, .woocommerce-info) {
	border: 1px solid var(--scc-brand-border);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-background);
	color: var(--scc-brand-foreground);
	box-shadow: none;
}
.scc-account #primary .woocommerce :where(.woocommerce-message, .woocommerce-info)::before { color: var(--scc-brand-primary-background); }
/* AC03: target only Woo's email-verification prompt, not other account notices.
 * The native link precedes a text node. Its explicit second grid row leaves
 * the first row for that anonymous text item, without changing the DOM. */
.scc-account #primary .woocommerce .woocommerce-info:has(> a.button.wc-forward[href*="wc_send_verification=1"]) {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: var(--scc-space-3);
	min-inline-size: 0;
}
.scc-account #primary .woocommerce .woocommerce-info:has(> a.button.wc-forward[href*="wc_send_verification=1"])::after { content: none; }
.scc-account #primary .woocommerce .woocommerce-info > a.button.wc-forward[href*="wc_send_verification=1"] {
	grid-row: 2;
	justify-self: start;
	float: none;
	inline-size: fit-content;
	min-inline-size: 0;
	max-inline-size: 100%;
	min-block-size: var(--scc-control-min-target);
	margin: 0;
	padding: var(--scc-space-3) var(--scc-space-5);
	border: 1px solid var(--scc-brand-primary-background);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-primary-background);
	color: var(--scc-color-white);
	font-size: var(--scc-type-body-size);
	font-weight: 600;
	line-height: var(--scc-type-body-line-height);
	white-space: normal;
	overflow-wrap: anywhere;
	text-decoration: none;
}
.scc-account #primary .woocommerce .woocommerce-info > a.button.wc-forward[href*="wc_send_verification=1"]:not(.disabled):not([aria-disabled="true"]):is(:hover, :active) {
	background: color-mix(in srgb, var(--scc-brand-primary-background) 90%, var(--scc-color-ink));
	color: var(--scc-color-white);
	text-decoration: none;
}
.scc-account #primary .woocommerce .woocommerce-info > a.button.wc-forward[href*="wc_send_verification=1"]:is(.disabled, [aria-disabled="true"]) {
	opacity: var(--scc-state-disabled-opacity);
	cursor: not-allowed;
}
/* AC05: primary styling for the existing view/details and empty-state actions only. */
.scc-account #primary .woocommerce :is(
	.woocommerce-orders-table__cell-order-actions > a.button.view,
	.ezw-account-table td > a.button[href*="ezw_request_id="],
	.woocommerce-MyAccount-content > .woocommerce-info > a.button.wc-forward:not([href*="wc_send_verification="])
) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: var(--scc-control-min-target);
	max-inline-size: 100%;
	padding: var(--scc-space-3) var(--scc-space-5);
	border: 1px solid var(--scc-brand-primary-background);
	border-radius: var(--scc-control-radius);
	background: var(--scc-brand-primary-background);
	color: var(--scc-color-white);
	font-size: var(--scc-type-body-size);
	font-weight: 600;
	line-height: var(--scc-type-body-line-height);
	white-space: normal;
	overflow-wrap: anywhere;
	text-decoration: none;
}
.scc-account #primary .woocommerce :is(
	.woocommerce-orders-table__cell-order-actions > a.button.view,
	.ezw-account-table td > a.button[href*="ezw_request_id="],
	.woocommerce-MyAccount-content > .woocommerce-info > a.button.wc-forward:not([href*="wc_send_verification="])
):not(.disabled):not([aria-disabled="true"]):is(:hover, :active) {
	background: color-mix(in srgb, var(--scc-brand-primary-background) 90%, var(--scc-color-ink));
	border-color: var(--scc-brand-primary-background);
	color: var(--scc-color-white);
	text-decoration: none;
}
.scc-account #primary .woocommerce :is(
	.woocommerce-orders-table__cell-order-actions > a.button.view,
	.ezw-account-table td > a.button[href*="ezw_request_id="],
	.woocommerce-MyAccount-content > .woocommerce-info > a.button.wc-forward:not([href*="wc_send_verification="])
):is(.disabled, [aria-disabled="true"]) {
	opacity: var(--scc-state-disabled-opacity);
	cursor: not-allowed;
}
/* AC06: the native downloads empty-state text stays above its existing Shop link. */
.scc-account.woocommerce-downloads #primary .woocommerce-MyAccount-content > .woocommerce-info:has(> a.button.wc-forward) {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: var(--scc-space-3);
	min-inline-size: 0;
}
.scc-account.woocommerce-downloads #primary .woocommerce-MyAccount-content > .woocommerce-info:has(> a.button.wc-forward)::after { content: none; }
.scc-account.woocommerce-downloads #primary .woocommerce-MyAccount-content > .woocommerce-info > a.button.wc-forward {
	grid-row: 2;
	justify-self: start;
	float: none;
	inline-size: fit-content;
	min-inline-size: 0;
	max-inline-size: 100%;
	margin: 0;
}
@media (max-width: 63.999rem) {
	.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation) { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: var(--scc-space-6); }
}
/* AC04: the anonymous native text item fills column one; the real link uses column two. */
@media (min-width: 48rem) {
	/* AC09: downloads text on the left and the native Shop action on the right. */
	.scc-account.woocommerce-downloads #primary .woocommerce-MyAccount-content > .woocommerce-info:has(> a.button.wc-forward) {
		grid-template-columns: minmax(0, 1fr) minmax(0, auto);
		column-gap: var(--scc-space-6);
		align-items: center;
	}
	.scc-account.woocommerce-downloads #primary .woocommerce-MyAccount-content > .woocommerce-info > a.button.wc-forward {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}
	.scc-account #primary .woocommerce .woocommerce-info:has(> a.button.wc-forward[href*="wc_send_verification=1"]) {
		grid-template-columns: minmax(0, 1fr) minmax(0, auto);
		column-gap: var(--scc-space-6);
		align-items: center;
	}
	.scc-account #primary .woocommerce .woocommerce-info > a.button.wc-forward[href*="wc_send_verification=1"] {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}
	.scc-account #primary .woocommerce .woocommerce-info:has(> a.button.wc-forward[href*="wc_send_verification=1"])::before {
		top: 50%;
		transform: translateY(-50%);
	}
}
@media (max-width: 47.999rem) {
	.scc-account #primary { padding-block: var(--scc-space-6) var(--scc-space-8); }
	.scc-account #primary .woocommerce:has(> .woocommerce-MyAccount-navigation) { grid-template-columns: minmax(0, 1fr); }
	.scc-account #primary .woocommerce > .woocommerce-MyAccount-content { grid-column: 1; }
	.scc-account #primary .woocommerce-MyAccount-navigation ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--scc-space-2); }
	.scc-account #primary .woocommerce-MyAccount-navigation a { padding-inline: var(--scc-space-3); }
	.scc-account #primary .woocommerce .col2-set { grid-template-columns: minmax(0, 1fr); gap: var(--scc-space-6); }
	.scc-account #primary .woocommerce form .form-row-first,
	.scc-account #primary .woocommerce form .form-row-last { float: none; inline-size: 100%; }
	.scc-account #primary .woocommerce form.login,
	.scc-account #primary .woocommerce form.register { padding: var(--scc-space-4); }
	.scc-account #primary .woocommerce table.shop_table_responsive thead { display: none; }
	.scc-account #primary .woocommerce table.shop_table_responsive tbody tr { display: block; margin-block-end: var(--scc-space-6); }
	.scc-account #primary .woocommerce table.shop_table_responsive tbody tr > th,
	.scc-account #primary .woocommerce table.shop_table_responsive tbody tr > td { display: block; text-align: end; }
	.scc-account #primary .woocommerce table.shop_table_responsive tbody tr > [data-title]::before { content: attr(data-title) ": "; float: inline-start; font-weight: 600; margin-inline-end: var(--scc-space-3); }
	.scc-account #primary .woocommerce table.shop_table_responsive .order-actions::before { content: none; }
	/* AC07: omit only the generated action label, retaining the actual cell and link. */
	.scc-account #primary .woocommerce table.ezw-account-table.shop_table_responsive tbody tr > td[data-title="Akcja"]::before { content: none; }
	/* AC08: keep the separator between address blocks, not after the final block. */
	.scc-account #primary .woocommerce .woocommerce-Addresses > .woocommerce-Address:last-child { border-block-end: 0; }
	.scc-account #primary .woocommerce table.shop_table_responsive .order-actions { text-align: start; }
	.scc-account #primary .woocommerce .woocommerce-customer-details address { padding: var(--scc-space-4); }
	.scc-account #primary .woocommerce :is(
		.woocommerce-orders-table__cell-order-actions > a.button.view,
		.ezw-account-table td > a.button[href*="ezw_request_id="]
	) { inline-size: 100%; margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.scc-account #primary .woocommerce :where(a, button, input, select, textarea) { transition: none; animation: none; }
}
