main .wp-block-post-content:has(.niomah-account) {
	max-width: var(--wp--style--global--wide-size);
}

main .wp-block-post-content > .niomah-account {
	--account-line: #ded9d2;
	--account-muted: #625b53;
	--account-surface: #f4f1ec;
	max-width: 1160px;
	margin-inline: auto;
	overflow-wrap: anywhere;
}

.niomah-account :is(h1, h2, h3) {
	margin-block: 0 .55em;
}

.niomah-account h1 { font-size: clamp(2.55rem, 6vw, 4.25rem); }
.niomah-account h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.niomah-account h1.niomah-account-guest { text-align: center; }
.niomah-account p.niomah-account-welcome { margin-block: .3rem; }
.niomah-account p.niomah-account-welcome + p { color: var(--account-muted); }

.niomah-account .woocommerce:has(.woocommerce-MyAccount-navigation) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
	align-items: start;
	gap: clamp(1.5rem, 4vw, 4rem);
}

.niomah-account .woocommerce:has(.woocommerce-MyAccount-navigation)::before,
.niomah-account .woocommerce:has(.woocommerce-MyAccount-navigation)::after {
	display: none;
}

.niomah-account .woocommerce:has(.woocommerce-MyAccount-navigation) > :not(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
	grid-column: 1 / -1;
}

.niomah-account .woocommerce :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content, .col2-set .col-1, .col2-set .col-2) {
	float: none;
	width: auto;
	min-width: 0;
}

.niomah-account :is(.woocommerce-MyAccount-navigation ul, .niomah-account-cards, .niomah-account-order-list) {
	list-style: none;
	padding: 0;
	margin: 0;
}

.niomah-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border-bottom: 1px solid var(--account-line); }
.niomah-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	gap: .65rem;
	min-height: 44px;
	padding: .25rem .75rem;
	text-decoration: none;
}

.niomah-account .woocommerce-MyAccount-navigation a::before {
	content: var(--account-icon, '◇') / '';
	flex: 0 0 1.15em;
	text-align: center;
	font-size: 1.15em;
}

.niomah-account .woocommerce-MyAccount-navigation-link--dashboard { --account-icon: '⌂'; }
.niomah-account .woocommerce-MyAccount-navigation-link--orders { --account-icon: '▤'; }
.niomah-account .woocommerce-MyAccount-navigation-link--track-order { --account-icon: '↗'; }
.niomah-account .woocommerce-MyAccount-navigation-link--edit-address { --account-icon: '⌖'; }
.niomah-account .woocommerce-MyAccount-navigation-link--edit-account { --account-icon: '♙'; }
.niomah-account .woocommerce-MyAccount-navigation-link--customer-logout { --account-icon: '→'; }

.niomah-account .woocommerce-MyAccount-navigation :is(.is-active > a, a:hover) {
	background: var(--account-surface);
	box-shadow: inset 2px 0 currentColor;
}

.niomah-account .woocommerce-MyAccount-navigation .is-active > a { font-weight: 700; }

.niomah-account :is(.niomah-account-cards, #customer_login, .woocommerce-Addresses, .niomah-account-addresses) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(.75rem, 2.5vw, 2rem);
}

.niomah-account :is(#customer_login, .woocommerce-Addresses)::before,
.niomah-account :is(#customer_login, .woocommerce-Addresses)::after { display: none; }

.niomah-account #customer_login { max-width: 920px; margin-inline: auto; }
.niomah-account #customer_login > div,
.niomah-account :is(.woocommerce-Address, .niomah-account-address, .niomah-account-empty) {
	padding: clamp(1rem, 2.5vw, 2rem);
	border: 1px solid var(--account-line);
}

.niomah-account .woocommerce-MyAccount-content .niomah-account-cards { margin-bottom: 1.75rem; }
.niomah-account .niomah-account-cards a {
	display: flex;
	justify-content: space-between;
	gap: .5rem;
	align-items: center;
	min-height: 48px;
	padding: .75rem 1rem;
	border: 1px solid var(--account-line);
}
.niomah-account .niomah-account-cards a:hover { background: var(--account-surface); }

.niomah-account .niomah-account-order-list li {
	display: grid;
	grid-template-columns: .7fr 1.2fr 1fr 1fr auto;
	gap: .6rem;
	align-items: center;
	padding: .65rem 0;
	border-bottom: 1px solid var(--account-line);
}

.niomah-account .niomah-account-status,
.niomah-account .woocommerce-orders-table__cell-order-status > span {
	justify-self: start;
	display: inline-block;
	border-radius: .2rem;
	background: var(--account-surface);
	padding: .18rem .55rem;
	font-size: .875rem;
}

.niomah-account .niomah-account-order-list a { padding-block: .6rem; }
.niomah-account :is(.niomah-account-order-list, .woocommerce-Address, .lost_password) a { text-decoration: underline; text-underline-offset: .2em; }

.niomah-account :is(.woocommerce form.login, .woocommerce form.register) { border: 0; padding: 0; margin: 0; }
.niomah-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields, .woocommerce-ResetPassword) { max-width: 650px; }
.niomah-account .woocommerce-ResetPassword { margin-inline: auto; }
.niomah-account fieldset { min-inline-size: 0; margin-block: 1.25rem; border: 1px solid var(--account-line); padding: 1rem; }
.niomah-account fieldset legend { padding-inline: .5rem; }
.niomah-account form .form-row { margin-block: 0 .85rem; }
.niomah-account form .form-row label { display: block; }
.niomah-account form .form-row :is(.input-text, select) {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid #a39b91;
	border-radius: 0;
	min-height: 44px;
	width: 100%;
	padding: .4rem .65rem;
	box-sizing: border-box;
}
.niomah-account form .form-row .password-input input { padding-inline-end: 3rem; }

.niomah-account :is(a, input, button, select, .select2-selection):focus-visible {
	outline: 2px solid var(--wp--preset--color--ink, #252421);
	outline-offset: 3px;
}

.niomah-account .woocommerce :is(a.button, button.button),
.niomah-account a.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-width: 100%;
	box-sizing: border-box;
	color: #fbfaf8;
	background: #252421;
	border-radius: 0;
	padding: .6rem .95rem;
	font-size: .78rem;
	letter-spacing: .04em;
	white-space: normal;
	line-height: 1.25;
}

.niomah-account .woocommerce-LostPassword a,
.niomah-account .woocommerce-Address-title a { display: inline-flex; align-items: center; min-height: 44px; }

.niomah-account .woocommerce table.shop_table {
	border: 1px solid var(--account-line);
	border-radius: 0;
	border-spacing: 0;
	width: 100%;
}
.niomah-account .woocommerce table.shop_table :is(td, th) { padding: .6rem; border-color: var(--account-line); }
.niomah-account .woocommerce table.shop_table .button { margin: .2rem .15rem .2rem 0; }
.niomah-account .woocommerce table.shop_table .nobr { white-space: normal; }

.niomah-account .woocommerce-order-details { margin-block: 1.75rem; }
.niomah-account :is(.niomah-account-payment, .niomah-account-addresses) { margin-block: 1rem 1.5rem; }
.niomah-account .niomah-account-payment { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.niomah-account .niomah-account-payment dt { color: var(--account-muted); }
.niomah-account .niomah-account-payment dd { margin: 0; }
.niomah-account .niomah-account-thumb { width: clamp(40px, 8vw, 68px); display: inline-block; vertical-align: middle; margin-inline-end: .5rem; }
.niomah-account .niomah-account-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.niomah-account .woocommerce-order-details :is(.order-total th, .order-total td) { background: var(--account-surface); }

@media (max-width: 900px) {
	.niomah-account .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: minmax(0, 1fr); }
	.niomah-account .woocommerce-MyAccount-navigation ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
	.niomah-account .woocommerce-orders-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
	.niomah-account .woocommerce table.woocommerce-orders-table :is(tbody, tr, td, th) { display: block; }
	.niomah-account .woocommerce table.woocommerce-orders-table :is(td, th[scope="row"]) {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		align-items: center;
		gap: .25rem .65rem;
		text-align: start !important;
	}
	.niomah-account .woocommerce-orders-table :is(td, th[scope="row"])::before { content: attr(data-title); font-weight: 700; }
	.niomah-account .woocommerce-orders-table tr + tr { border-top: 2px solid var(--account-line); }
}

@media (max-width: 600px) {
	.niomah-account .woocommerce-MyAccount-navigation ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.niomah-account .woocommerce-MyAccount-navigation a { padding-inline: .3rem; gap: .35rem; font-size: .9rem; }
	.niomah-account :is(#customer_login, .woocommerce-Addresses, .niomah-account-addresses) { grid-template-columns: minmax(0, 1fr); }
	.niomah-account .niomah-account-order-list li { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.niomah-account .woocommerce form .form-row { float: none; width: 100%; }
}

.niomah-account .niomah-account-form-title:has(+ .woocommerce-ResetPassword) {
	max-width: 650px;
	margin-inline: auto;
}

.niomah-account .woocommerce .woocommerce-ResetPassword .form-row {
	float: none;
	width: 100%;
}

