/*
 * Colors follow WordPress theme presets first, then WooCommerce/theme variables.
 * Every selector is scoped to the WooCommerce account area.
 */
.woocommerce-account {
	--bh-account-accent: var(--wp--preset--color--primary, var(--wp--preset--color--accent, var(--wc-primary, #2271b1)));
	--bh-account-detail: var(--wp--preset--color--secondary, var(--wp--preset--color--accent, var(--bh-account-accent)));
	--bh-account-text: var(--wp--preset--color--contrast, var(--wp--preset--color--foreground, currentColor));
	--bh-account-surface: var(--wp--preset--color--base, #fff);
	--bh-account-muted: color-mix(in srgb, var(--bh-account-text) 62%, transparent);
	--bh-account-border: color-mix(in srgb, var(--bh-account-text) 14%, transparent);
	--bh-account-soft: color-mix(in srgb, var(--bh-account-accent) 8%, var(--bh-account-surface));
	--bh-account-radius: 1rem;
}

.woocommerce-account .woocommerce {
	color: var(--bh-account-text);
}

.woocommerce-account .woocommerce a {
	color: var(--bh-account-accent);
	text-underline-offset: .18em;
}

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
	box-sizing: border-box;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
	width: 25%;
	padding: .5rem;
	border: 1px solid var(--bh-account-border);
	border-radius: var(--bh-account-radius);
	background: var(--bh-account-surface);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	padding: .65rem .85rem;
	border-radius: calc(var(--bh-account-radius) * .65);
	color: inherit;
	font-weight: 550;
	line-height: 1.35;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--bh-account-soft);
	color: var(--bh-account-accent);
}

.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible,
.woocommerce-account .woocommerce a:focus-visible,
.woocommerce-account .woocommerce button:focus-visible,
.woocommerce-account .woocommerce input:focus-visible,
.woocommerce-account .woocommerce select:focus-visible {
	outline: 2px solid var(--bh-account-accent);
	outline-offset: 3px;
}

.woocommerce-account .woocommerce-MyAccount-content {
	width: 72%;
	padding: clamp(1.1rem, 2.5vw, 2rem);
	border: 1px solid var(--bh-account-border);
	border-radius: var(--bh-account-radius);
	background: var(--bh-account-surface);
}

.woocommerce-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

.woocommerce-account .woocommerce-MyAccount-content > :last-child {
	margin-bottom: 0;
}

.woocommerce-account.bh-account-dashboard .woocommerce-MyAccount-navigation {
	display: none;
}

.woocommerce-account.bh-account-dashboard .woocommerce-MyAccount-content {
	float: none;
	width: 100%;
}

.bh-account-cards {
	margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.bh-account-cards > h2 {
	margin: 0 0 1rem;
	font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.bh-account-cards__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .85rem;
}

.bh-account-card {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) auto;
	align-items: center;
	gap: .85rem;
	min-height: 6rem;
	padding: 1rem;
	border: 1px solid var(--bh-account-border);
	border-radius: .9rem;
	background: var(--bh-account-surface);
	color: inherit !important;
	text-decoration: none;
	transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.bh-account-card:hover {
	transform: translateY(-2px);
	border-color: var(--bh-account-detail);
	background: var(--bh-account-soft);
}

.bh-account-card:focus-visible {
	outline: 2px solid var(--bh-account-accent);
	outline-offset: 3px;
}

.bh-account-card__icon {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	border-radius: .85rem;
	background: color-mix(in srgb, var(--bh-account-detail) 12%, var(--bh-account-surface));
	color: var(--bh-account-detail);
}

.bh-account-card__icon svg {
	width: 1.45rem;
	height: 1.45rem;
}

.bh-account-card__copy {
	display: grid;
	gap: .3rem;
}

.bh-account-card__copy strong {
	color: var(--bh-account-text);
	font-size: 1rem;
	line-height: 1.3;
}

.bh-account-card__copy > span {
	color: var(--bh-account-muted);
	font-size: .88rem;
	line-height: 1.45;
}

.bh-account-card__arrow {
	color: var(--bh-account-detail);
	font-size: 1.25rem;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--bh-account-border);
	border-radius: .75rem;
	overflow: hidden;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
	padding: .85rem 1rem;
	border-color: var(--bh-account-border);
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table th {
	background: var(--bh-account-soft);
	color: inherit;
}

.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content button,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
	min-height: 2.75rem;
	padding: .7rem 1.1rem;
	border: 1px solid var(--bh-account-accent);
	border-radius: 999px;
	background: var(--bh-account-accent);
	color: var(--wp--preset--color--base, #fff);
	font: inherit;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .18s ease, transform .18s ease;
}

.woocommerce-account .woocommerce-MyAccount-content .button:hover,
.woocommerce-account .woocommerce-MyAccount-content button:hover,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"]:hover {
	filter: brightness(.92);
}

.woocommerce-account .woocommerce-MyAccount-content .button:active,
.woocommerce-account .woocommerce-MyAccount-content button:active {
	transform: translateY(1px);
}

.woocommerce-account .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row textarea,
.woocommerce-account .woocommerce form .form-row select {
	box-sizing: border-box;
	min-height: 2.8rem;
	padding: .7rem .85rem;
	border: 1px solid var(--bh-account-border);
	border-radius: .65rem;
	background: var(--bh-account-surface);
	color: inherit;
	font: inherit;
}

.woocommerce-account .woocommerce form .form-row textarea {
	min-height: 7rem;
}

.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-error {
	border-top-color: var(--bh-account-accent);
	border-radius: .7rem;
}

.woocommerce-account .woocommerce-info::before,
.woocommerce-account .woocommerce-message::before {
	color: var(--bh-account-accent);
}

.woocommerce-account .woocommerce-Address,
.woocommerce-account .woocommerce-PaymentMethod {
	padding: 1rem;
	border: 1px solid var(--bh-account-border);
	border-radius: .8rem;
}

@media (max-width: 782px) {
	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce-MyAccount-content {
		float: none;
		width: 100%;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		margin: 0 0 1rem;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: .4rem;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		padding: .15rem .15rem .35rem;
		scroll-padding-inline: .15rem;
		scroll-snap-type: inline proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		mask-image: linear-gradient(to right, #000 94%, transparent 100%);
	}

	.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
		display: none;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li a {
		min-height: 2.75rem;
		padding-inline: .9rem;
		white-space: nowrap;
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		padding: 1rem;
	}

	.woocommerce-account.bh-account-dashboard .woocommerce-MyAccount-content {
		width: 100%;
	}

	.bh-account-cards {
		margin-top: 1.35rem;
	}

	.bh-account-cards__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: .65rem;
	}

	.bh-account-card {
		grid-template-columns: 2.8rem minmax(0, 1fr) auto;
		gap: .75rem;
		min-height: 5.25rem;
		padding: .8rem;
	}

	.bh-account-card__icon {
		width: 2.8rem;
		height: 2.8rem;
	}

	.bh-account-card__copy > span {
		font-size: .84rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive {
		display: block;
		border: 0;
		border-radius: 0;
		overflow: visible;
		white-space: normal;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		clip-path: inset(50%);
		border: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive tbody {
		display: grid;
		gap: .75rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		padding: .35rem .8rem;
		border: 1px solid var(--bh-account-border);
		border-radius: .8rem;
		background: var(--bh-account-surface);
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: .75rem;
		padding: .55rem 0;
		border: 0;
		text-align: end;
		white-space: normal;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td::before {
		content: attr(data-title);
		color: var(--bh-account-muted);
		font-size: .82em;
		font-weight: 600;
		text-align: start;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions {
		grid-column: 1 / -1;
		justify-content: flex-start;
		flex-wrap: wrap;
		padding-top: .35rem;
		border-top: 1px solid var(--bh-account-border);
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-number {
		grid-column: 1 / -1;
		padding-bottom: .7rem;
		border-bottom: 1px solid var(--bh-account-border);
		font-size: 1.05rem;
		font-weight: 700;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-total {
		grid-column: 1 / -1;
		padding-top: .7rem;
		border-top: 1px solid var(--bh-account-border);
		font-weight: 650;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive .woocommerce-orders-table__cell-order-actions .button {
		flex: 1 1 7rem;
		justify-content: center;
		text-align: center;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions::before {
		content: none;
	}

	/* Order items become clearly separated product cards on narrow screens. */
	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details {
		display: block;
		border: 0;
		border-radius: 0;
		overflow: visible;
		white-space: normal;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		clip-path: inset(50%);
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tbody {
		display: grid;
		gap: .65rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tr.woocommerce-table__line-item {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: start;
		gap: .5rem 1rem;
		padding: .9rem;
		border: 1px solid var(--bh-account-border);
		border-radius: .8rem;
		background: var(--bh-account-surface);
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tr.woocommerce-table__line-item > td {
		padding: 0;
		border: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details td.woocommerce-table__product-name {
		min-width: 0;
		text-align: start;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details td.woocommerce-table__product-name a {
		font-weight: 650;
		line-height: 1.4;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .wc-item-meta {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		gap: .25rem .5rem;
		margin: .45rem 0 0;
		font-size: .82rem;
		line-height: 1.4;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .wc-item-meta li {
		display: contents;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .wc-item-meta li p {
		margin: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .wc-item-meta strong,
	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .wc-item-meta span {
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details .product-quantity {
		display: inline-flex;
		align-items: center;
		min-height: 1.5rem;
		margin-inline-start: .3rem;
		padding: 0 .45rem;
		border-radius: 999px;
		background: var(--bh-account-soft);
		color: var(--bh-account-accent);
		font-size: .8rem;
		font-weight: 650;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details td.woocommerce-table__product-total {
		text-align: end;
		font-weight: 650;
		white-space: nowrap;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot {
		display: grid;
		gap: .35rem;
		margin-top: .85rem;
		padding: .8rem .9rem;
		border: 1px solid var(--bh-account-border);
		border-radius: .8rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot tr {
		display: flex;
		justify-content: space-between;
		gap: .75rem;
		padding: .35rem 0;
		border: 0;
		background: transparent;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot th,
	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot td {
		padding: 0;
		border: 0;
		text-align: end;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot th {
		text-align: start;
	}

	.woocommerce-account .woocommerce-MyAccount-content table.woocommerce-table--order-details tfoot tr:last-child {
		margin-top: .25rem;
		padding-top: .65rem;
		border-top: 1px solid var(--bh-account-border);
		font-size: 1.05rem;
		font-weight: 700;
	}

	.woocommerce-account .woocommerce form .form-row {
		float: none;
		width: 100%;
		margin-inline: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-content .button,
	.woocommerce-account .woocommerce-MyAccount-content button,
	.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
		min-height: 2.9rem;
	}

	.woocommerce-account .woocommerce-MyAccount-content address,
	.woocommerce-account .woocommerce-MyAccount-content p {
		overflow-wrap: anywhere;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce-account .woocommerce-MyAccount-navigation li a,
	.woocommerce-account .woocommerce-MyAccount-content .button,
	.woocommerce-account .woocommerce-MyAccount-content button {
		transition: none;
	}
}
