/**
 * WooCommerce My Account — editorial layout (Shift52 tokens).
 */

body.shift52-account-page {
	background-color: #fbf9f6;
}

body.shift52-account-page .shift52-wc-shell {
	padding-bottom: 5rem;
}

/* My Account template: one 1200px column — title + Woo shortcode sit inside this */
body.shift52-account-page main.shift52-account-layout .shift52-account-container {
	max-width: 1200px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	body.shift52-account-page main.shift52-account-layout .shift52-account-container {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

/*
 * Shortcode wraps in main > … > div.woocommerce > nav + .woocommerce-MyAccount-content
 * (outer .shift52-wc-shell also has class woocommerce — target inner wrapper with :has)
 */
body.shift52-account-page main .woocommerce:has(.woocommerce-MyAccount-navigation) {
	display: grid;
	gap: 1.25rem 1.5rem;
	width: 100%;
	max-width: 72rem;
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 960px) {
	body.shift52-account-page main .woocommerce:has(.woocommerce-MyAccount-navigation) {
		grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr);
		align-items: start;
	}

	body.shift52-account-page main .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation {
		grid-column: 1;
		position: sticky;
		top: 6.5rem;
	}

	body.shift52-account-page main .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content {
		grid-column: 2;
		min-width: 0;
	}
}

/* Full-width editorial shell (page template) — no narrow inner cap, tighter rail */
body.shift52-account-page main.shift52-account-layout .woocommerce:has(.woocommerce-MyAccount-navigation),
body.shift52-account-page main.shift52-account-layout .woocommerce:not(:has(.woocommerce-MyAccount-navigation)) {
	max-width: none !important;
	width: 100%;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.shift52-account-page main.shift52-account-layout .woocommerce:has(.woocommerce-MyAccount-navigation) {
	gap: 1rem 1.25rem;
}

@media (min-width: 960px) {
	body.shift52-account-page main.shift52-account-layout .woocommerce:has(.woocommerce-MyAccount-navigation) {
		/* Wide enough rail so “Account details” / “Downloads” stay one line */
		grid-template-columns: minmax(15.5rem, 17.5rem) minmax(0, 1fr);
		gap: 1rem 1.25rem;
		align-items: start;
	}

	body.shift52-account-page main.shift52-account-layout .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content {
		min-width: 0;
	}
}

/* Logged-out: single column wrapper */
body.shift52-account-page main .woocommerce:not(:has(.woocommerce-MyAccount-navigation)) {
	max-width: 72rem;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Breadcrumb (usually direct under main, above entry content) */
body.shift52-account-page main > .woocommerce-breadcrumb {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

@media (min-width: 768px) {
	body.shift52-account-page main > .woocommerce-breadcrumb {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

body.shift52-account-page .woocommerce-breadcrumb {
	font-size: 0.8125rem;
	color: #757871;
	margin-bottom: 0.25rem;
}

body.shift52-account-page .woocommerce-breadcrumb a {
	color: #566252;
	text-decoration: none;
}

body.shift52-account-page .woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

/* Side navigation */
body.shift52-account-page .woocommerce-MyAccount-navigation {
	background: #ffffff;
	border: 1px solid rgb(196 200 191 / 0.45);
	border-radius: 1rem;
	box-shadow: 0 1px 0 rgb(86 98 82 / 0.06);
	overflow: visible;
	min-width: 0;
	align-self: stretch;
}

body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-navigation {
	min-width: 15.5rem;
}

body.shift52-account-page .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}

body.shift52-account-page .woocommerce-MyAccount-navigation li {
	margin: 0;
	border-bottom: 1px solid rgb(196 200 191 / 0.25);
}

body.shift52-account-page .woocommerce-MyAccount-navigation li:last-child {
	border-bottom: 0;
}

body.shift52-account-page .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.85rem 1.25rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #444842;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

body.shift52-account-page .woocommerce-MyAccount-navigation a:hover {
	background: #f5f3f0;
	color: #1b1c1a;
}

body.shift52-account-page .woocommerce-MyAccount-navigation li.is-active a {
	background: rgb(86 98 82 / 0.08);
	color: #566252;
	font-weight: 600;
	border-left: 3px solid #566252;
	padding-left: calc(1.25rem - 3px);
}

/* Desktop: pill list inside account template (no heavy dividers) */
@media (min-width: 960px) {
	body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-direction: column;
		gap: 0.2rem;
		padding: 0.5rem;
	}

	body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-navigation li {
		border-bottom: 0;
	}

	body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-navigation a {
		padding: 0.65rem 0.9rem;
		border-radius: 0.5rem;
		font-size: 0.875rem;
	}

	body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-navigation li.is-active a {
		padding-left: 0.9rem;
		border-left: none;
		background: rgb(86 98 82 / 0.12);
		color: #1b1c1a;
		box-shadow: inset 0 0 0 1px rgb(86 98 82 / 0.2);
	}
}

/* Content panel */
body.shift52-account-page .woocommerce-MyAccount-content {
	background: #ffffff;
	border: 1px solid rgb(196 200 191 / 0.45);
	border-radius: 1rem;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 1px 0 rgb(86 98 82 / 0.06);
}

body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-content {
	border-radius: 1rem;
	box-shadow:
		0 1px 0 rgb(86 98 82 / 0.06),
		0 12px 40px rgb(86 98 82 / 0.06);
}

body.shift52-account-page main.shift52-account-layout .woocommerce-MyAccount-content > p:first-of-type {
	font-size: 1.0625rem;
	line-height: 1.7;
	color: #444842;
}

@media (min-width: 768px) {
	body.shift52-account-page .woocommerce-MyAccount-content {
		padding: 2rem 2.25rem;
	}
}

body.shift52-account-page .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

body.shift52-account-page .woocommerce-MyAccount-content > :last-child {
	margin-bottom: 0;
}

body.shift52-account-page .woocommerce-MyAccount-content h2,
body.shift52-account-page .woocommerce-MyAccount-content h3 {
	font-family: "Noto Serif", ui-serif, Georgia, serif;
	font-weight: 400;
	color: #1b1c1a;
	letter-spacing: -0.02em;
}

body.shift52-account-page .woocommerce-MyAccount-content h2 {
	font-size: clamp(1.5rem, 2.5vw, 1.875rem);
	margin: 0 0 1.25rem;
}

body.shift52-account-page .woocommerce-MyAccount-content h3 {
	font-size: 1.25rem;
	margin: 1.75rem 0 1rem;
}

body.shift52-account-page .woocommerce-MyAccount-content p {
	font-size: 1rem;
	line-height: 1.65;
	color: #444842;
}

/* Notices */
body.shift52-account-page .woocommerce-notices-wrapper {
	margin-bottom: 1.25rem;
}

body.shift52-account-page .woocommerce-message,
body.shift52-account-page .woocommerce-info,
body.shift52-account-page .woocommerce-error {
	border-radius: 0.75rem;
	border: none;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.9375rem;
}

body.shift52-account-page .woocommerce-message {
	background: rgb(168 181 162 / 0.25);
	color: #1b1c1a;
}

body.shift52-account-page .woocommerce-info {
	background: #f5f3f0;
	color: #1b1c1a;
}

body.shift52-account-page .woocommerce-error {
	background: rgb(255 218 214 / 0.6);
	color: #1b1c1a;
}

/* Tables (orders, downloads) */
body.shift52-account-page .woocommerce-MyAccount-content .shop_table,
body.shift52-account-page .woocommerce-MyAccount-content table.shop_table {
	border: 1px solid rgb(196 200 191 / 0.5);
	border-radius: 0.75rem;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	width: 100%;
	margin: 1rem 0 1.5rem;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.9375rem;
}

body.shift52-account-page .woocommerce-MyAccount-content .shop_table thead th,
body.shift52-account-page .woocommerce-MyAccount-content table.shop_table thead th {
	background: #f5f3f0;
	color: #1b1c1a;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.6875rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid rgb(196 200 191 / 0.45);
}

body.shift52-account-page .woocommerce-MyAccount-content .shop_table td,
body.shift52-account-page .woocommerce-MyAccount-content table.shop_table td {
	padding: 1rem;
	border-top: 1px solid rgb(196 200 191 / 0.25);
	vertical-align: middle;
	color: #1b1c1a;
}

body.shift52-account-page .woocommerce-MyAccount-content .shop_table tbody tr:first-child td {
	border-top: none;
}

body.shift52-account-page .woocommerce-MyAccount-content .shop_table .button {
	margin: 0;
}

/* Forms inside account */
body.shift52-account-page .woocommerce-MyAccount-content .woocommerce-form-row {
	margin: 0 0 1.25rem;
	float: none !important;
	width: 100% !important;
}

body.shift52-account-page .woocommerce-MyAccount-content .clear {
	display: none;
}

body.shift52-account-page .woocommerce-MyAccount-content fieldset {
	border: 1px solid rgb(196 200 191 / 0.45);
	border-radius: 0.75rem;
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
}

body.shift52-account-page .woocommerce-MyAccount-content fieldset legend {
	font-family: "Noto Serif", ui-serif, Georgia, serif;
	font-size: 1.125rem;
	padding: 0 0.5rem;
	color: #1b1c1a;
}

body.shift52-account-page .woocommerce-MyAccount-content label {
	display: block;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #757871;
	margin-bottom: 0.45rem;
}

body.shift52-account-page .woocommerce-MyAccount-content .input-text,
body.shift52-account-page .woocommerce-MyAccount-content select,
body.shift52-account-page .woocommerce-MyAccount-content textarea {
	width: 100%;
	max-width: 32rem;
	background: #f5f3f0 !important;
	border: none !important;
	border-radius: 0.75rem !important;
	padding: 0.85rem 1.15rem !important;
	font-family: Manrope, system-ui, sans-serif !important;
	font-size: 1rem !important;
	color: #1b1c1a !important;
}

body.shift52-account-page .woocommerce-MyAccount-content .input-text:focus,
body.shift52-account-page .woocommerce-MyAccount-content select:focus,
body.shift52-account-page .woocommerce-MyAccount-content textarea:focus {
	outline: none !important;
	box-shadow: 0 0 0 1px rgb(86 98 82 / 0.35) !important;
}

body.shift52-account-page .woocommerce-MyAccount-content .select2-container {
	max-width: 32rem;
}

body.shift52-account-page .woocommerce-MyAccount-content .select2-container .select2-selection--single {
	background: #f5f3f0 !important;
	border: none !important;
	border-radius: 0.75rem !important;
	min-height: 3rem !important;
	padding: 0.35rem 0.75rem !important;
}

/* Buttons */
body.shift52-account-page .woocommerce-MyAccount-content .button,
body.shift52-account-page .woocommerce-MyAccount-content button.button,
body.shift52-account-page .woocommerce-MyAccount-content a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem !important;
	border-radius: 9999px !important;
	background: #566252 !important;
	color: #ffffff !important;
	border: none !important;
	font-family: Manrope, system-ui, sans-serif !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease;
	cursor: pointer;
	line-height: 1.3;
}

body.shift52-account-page .woocommerce-MyAccount-content .button:hover,
body.shift52-account-page .woocommerce-MyAccount-content a.button:hover {
	background: #bdcab7 !important;
	color: #1b1c1a !important;
}

body.shift52-account-page .woocommerce-MyAccount-content .button.alt,
body.shift52-account-page .woocommerce-MyAccount-content a.button.alt {
	background: #6a5c4f !important;
}

/* Addresses grid */
body.shift52-account-page .woocommerce-Addresses .woocommerce-Address,
body.shift52-account-page .woocommerce-Address {
	background: #f5f3f0;
	border-radius: 0.75rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid rgb(196 200 191 / 0.35);
}

body.shift52-account-page .woocommerce-Addresses {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 640px) {
	body.shift52-account-page .woocommerce-Addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Login / register (logged out) */
body.shift52-account-page .woocommerce-form-login,
body.shift52-account-page .woocommerce-form-register {
	max-width: none;
}

body.shift52-account-page #customer_login.col2-set,
body.shift52-account-page #customer_login.u-columns {
	display: grid;
	gap: 2rem;
	width: 100% !important;
	margin: 0 !important;
}

@media (min-width: 900px) {
	body.shift52-account-page #customer_login.col2-set,
	body.shift52-account-page #customer_login.u-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

body.shift52-account-page #customer_login .col-1,
body.shift52-account-page #customer_login .col-2,
body.shift52-account-page #customer_login .u-column1,
body.shift52-account-page #customer_login .u-column2 {
	width: 100% !important;
	float: none !important;
	background: #ffffff;
	border: 1px solid rgb(196 200 191 / 0.45);
	border-radius: 0.75rem;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 1px 0 rgb(86 98 82 / 0.06);
}

body.shift52-account-page #customer_login h2 {
	font-family: "Noto Serif", ui-serif, Georgia, serif;
	font-size: 1.5rem;
	font-weight: 400;
	color: #1b1c1a;
	margin: 0 0 1.25rem;
}

body.shift52-account-page #customer_login .form-row label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #757871;
	margin-bottom: 0.45rem;
}

body.shift52-account-page #customer_login .input-text {
	width: 100%;
	background: #f5f3f0 !important;
	border: none !important;
	border-radius: 0.75rem !important;
	padding: 0.85rem 1.15rem !important;
	font-size: 1rem !important;
}

body.shift52-account-page #customer_login .woocommerce-form-login__submit,
body.shift52-account-page #customer_login .woocommerce-form-register__submit {
	border-radius: 9999px !important;
	background: #566252 !important;
	color: #fff !important;
	padding: 0.75rem 1.75rem !important;
	font-weight: 600 !important;
	border: none !important;
}

body.shift52-account-page #customer_login .lost_password a {
	color: #566252;
	font-size: 0.9375rem;
}

/* Order actions row */
body.shift52-account-page .woocommerce-orders-table__cell-order-actions .button {
	margin: 0.25rem 0.35rem 0.25rem 0;
}

/* Dashboard intro */
body.shift52-account-page .woocommerce-MyAccount-content .woocommerce-info {
	margin-bottom: 1rem;
}

/* Pagination */
body.shift52-account-page .woocommerce-pagination {
	margin-top: 1.5rem;
}

body.shift52-account-page .woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.shift52-account-page .woocommerce-pagination a,
body.shift52-account-page .woocommerce-pagination span {
	display: inline-flex;
	min-width: 2.5rem;
	height: 2.5rem;
	align-items: center;
	justify-content: center;
	border-radius: 0.5rem;
	background: #f5f3f0;
	color: #1b1c1a;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
}

body.shift52-account-page .woocommerce-pagination a:hover {
	background: #566252;
	color: #fff;
}

body.shift52-account-page .woocommerce-pagination span.current {
	background: #566252;
	color: #fff;
}

/* Mobile: stack nav above content */
@media (max-width: 959px) {
	body.shift52-account-page .woocommerce-MyAccount-navigation {
		margin-bottom: 0;
	}

	body.shift52-account-page .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 0.35rem;
		padding: 0.75rem;
	}

	body.shift52-account-page .woocommerce-MyAccount-navigation li {
		border: none;
	}

	body.shift52-account-page .woocommerce-MyAccount-navigation a {
		padding: 0.5rem 0.85rem;
		border-radius: 9999px;
		background: #f5f3f0;
		font-size: 0.8125rem;
	}

	body.shift52-account-page .woocommerce-MyAccount-navigation li.is-active a {
		border-left: none;
		padding-left: 0.85rem;
		background: rgb(86 98 82 / 0.15);
		color: #566252;
	}
}
