/* ---------------------------------------------------------------------------
 * Account navigation: a 3-dots toggle (mobile only) that collapses/expands the
 * menu. The toggle sits at the far right of the "Hello <name>" greeting; the
 * menu is in normal flow so expanding it pushes the page content below down.
 * ------------------------------------------------------------------------- */
/* Hidden on desktop, where the menu is always shown in the sidebar. */
.rbb-account__list .rbb-account__menu-toggle {
	display: none;
}

.rbb-account__list .rbb-account__menu-toggle-dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--rbb-general-heading-color, #163317);
}

@media (max-width: 767px) {
	/* Greeting on the left, 3-dots toggle on the far right. */
	.rbb-account__header-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-right: 30px;
	}

	/* Circular button with the three dots laid out in a horizontal row. */
	.rbb-account__list .rbb-account__menu-toggle {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: center;
		gap: 3px;
		flex: 0 0 auto;
		width: 36px;
		height: 36px;
		padding: 0;
		border-radius: 50%;
		border: 2px solid var(--rbb-general-button-bg-color, #e5e7eb);
		background: #fff;
		cursor: pointer;
	}

	/* Collapse the menu by default; the toggle adds .is-menu-open to expand it.
	   The theme renders the menu as a grid, so restore grid when expanded. */
	.rbb-account__list > ul {
		display: none;
	}
	.rbb-account__list.is-menu-open > ul {
		display: grid;
	}
}

/* My Account dashboard quick-link cards */
.bs-dashboard-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.bs-dashboard-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 18px;
	padding: 40px 20px;
	border: 2px solid #e5e7eb;
	border-radius: 1rem;
	background: #fff;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.bs-dashboard-card:hover,
.bs-dashboard-card:focus-visible {
	border-color: var(--rbb-general-primary-color, #163317);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.bs-dashboard-card__icon {
	display: inline-block;
	font-size: 40px;
	line-height: 1;
	color: var(--rbb-general-secondary-color, #f3bd66);
}

/* Keep the WooSC wrappers layout-neutral so the icon/label stack like other
 * cards: the outer wrapper stays a grid item, the inner wrapper lets the icon
 * and label become direct flex children of the card column. */
.bs-dashboard-cards .woosc-menu-item,
.bs-dashboard-card .woosc-menu-item-inner {
	display: contents;
}

/* Hide the WooSC compare count badge on the dashboard card. */
.bs-dashboard-cards .woosc-menu-item .woosc-menu-item-inner:after {
	content: none;
	display: none;
}

/* Hide the red count badge when there is nothing to compare (count = 0). */
.woosc-menu-item .woosc-menu-item-inner[data-count="0"]:after {
	content: none;
	display: none;
}

/* Nudge the Compare menu link text 2px to the right to align with the other
 * account navigation items. */
.woocommerce-MyAccount-navigation .woosc-menu-item .woosc-menu-item-inner {
	padding-left: 2px;
}

.bs-dashboard-card__label {
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--rbb-general-heading-color, #163317);
}

/*
 * My Points (YITH) page: align the "My Reward Points" title to the same top
 * row as the "Not <name>? Log out" link instead of stacking below it.
 */
@media (min-width: 768px) {
	.woocommerce-MyAccount-content:has(.ywpar-wrapper) {
		position: relative;
	}

	.woocommerce-MyAccount-content:has(.ywpar-wrapper) > .flex.justify-end {
		position: absolute;
		top: 0;
		right: 0;
		margin: 0;
		min-height: 3rem;
		display: flex;
		align-items: center;
	}

	.ywpar-wrapper > h2 {
		margin-top: 0;
		min-height: 3rem;
		display: flex;
		align-items: center;
	}
}

/*
 * Comfortable, symmetric badge padding. The badges share a row and stretch to
 * equal height; with both the points and rank values pinned to line-height: 1
 * (so neither content is taller than the other), this padding is what gives
 * each block matching top/bottom breathing room.
 */
.ywpar_myaccount_entry_info > div {
	padding-top: 28px;
	padding-bottom: 28px;
}

/*
 * Points summary badge: show "Points" to the right of the points value
 * (e.g. "1000 Points") and hide the "to redeem" sub-title.
 * Scoped to .ywpar_summary_badge so the level / rank badges are unaffected.
 */
.ywpar_myaccount_entry_info .ywpar_summary_badge {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	align-content: center;
	justify-content: center;
	column-gap: 8px;
	/* Equal 50% width with the rank block (min-width:0 lets flex honor it). */
	flex: 1 1 50%;
	min-width: 0;
}

.ywpar_myaccount_entry_info .ywpar_summary_badge .points_collected {
	order: 1;
	/* Match the rank value size. */
	font-size: 45px;
	line-height: 1;
	white-space: nowrap;
}

.ywpar_myaccount_entry_info .ywpar_summary_badge span.ywpar_entry_info_title {
	order: 2;
	display: inline-block;
}

.ywpar_myaccount_entry_info .ywpar_summary_badge .points_worth {
	order: 3;
	flex-basis: 100%;
}

.ywpar_myaccount_entry_info .ywpar_summary_badge span.ywpar_total_collected_title {
	order: 4;
	flex-basis: 100%;
}

.ywpar_myaccount_entry_info .ywpar_summary_badge span.ywpar_to_redeem_title {
	display: none;
}

/*
 * Rank badge: show the rank position 50% larger (30px -> 45px) and the total
 * grower count ("out of N growers") underneath it in a smaller, muted font.
 */
/* Match the points block width for a balanced layout (equal 50%). */
.ywpar_myaccount_entry_info .ywpar_rank_badges {
	flex: 1 1 50%;
	min-width: 0;
	margin-right: 0;
	/* Centre the rank content vertically like the points block, so the space
	   above "My rank" and below "out of N growers" is balanced. Without this
	   the block is top-aligned within the equal-height row, leaving a gap
	   below "out of N growers". */
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.ywpar_myaccount_entry_info .ywpar_rank_badges span.rank {
	font-size: 45px;
	/* Pin to line-height: 1 like the points value (.points_collected) so the
	   rank content isn't taller than the points content — equal content height
	   in the equal-height row means equal top/bottom spacing. */
	line-height: 1;
	/* Plugin sets a large "30px 0"; trim it so the rank badge isn't the tall one. */
	padding: 5px 0;
}

.ywpar_myaccount_entry_info .ywpar_rank_badges .ywpar_rank_total {
	display: block;
	font-size: 0.85em;
	color: #9f9c9c;
}

/* Center-align the "Points" column header in the points history table. */
.ywpar_points_rewards thead th.ywpar_points_rewards-points {
	text-align: center;
}

/*
 * Points history on mobile: WooCommerce's shop_table_responsive stacks the
 * cells but runs consecutive entries together. Turn each row into a bordered
 * card and lay out every field as "Label:  value" (label in a fixed inline
 * column so the values line up). The double-class prefix outranks the core
 * "table.shop_table_responsive tr td" rules.
 */
@media (max-width: 767px) {
	.ywpar_points_rewards.shop_table_responsive,
	.ywpar_points_rewards.shop_table_responsive tbody {
		display: block;
		width: 100%;
	}

	.ywpar_points_rewards.shop_table_responsive tbody tr {
		/* Grid so the date and the action ("Order Completed") share the top row
		   (date left, action right); the order no. and points stack full-width. */
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 12px;
		border: 1px solid #e5e7eb;
		border-radius: 12px;
		padding: 10px 16px;
		margin-bottom: 16px;
	}

	.ywpar_points_rewards.shop_table_responsive tbody tr td {
		display: block;
		width: auto;
		padding: 5px 0;
		text-align: left;
		border: none;
	}

	.ywpar_points_rewards.shop_table_responsive tbody tr td::before {
		content: attr(data-title) ": ";
		display: inline-block;
		min-width: 96px;
		float: none;
		font-weight: 700;
		color: #222;
	}

	/* Top row: date on the left, action/status on the right, no labels. */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-date {
		grid-column: 1;
	}
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-action {
		grid-column: 2;
		text-align: right;
	}
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-date::before,
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-action::before {
		content: none;
	}

	/* Order no. and points span the full width below the top row. */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-order,
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points {
		grid-column: 1 / -1;
	}

	/* Order no.: drop the label and render the link as "Order #13608". The
	   "Order " prefix sits inside the <a>'s ::before, so the whole thing stays
	   clickable. */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-order::before {
		content: none;
	}
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-order a::before {
		content: "Order ";
	}
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-order a {
		color: var(--rbb-general-primary-color, #163317);
		font-weight: 600;
		text-decoration: underline;
	}

	/* Points: pin to the far right and render as "Points Balance: 1001 Points".
	   (The "+N"/"-N" delta span is hidden globally above.) */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points {
		text-align: right;
		/* Fixed line-height (inherited as a length) so the taller 1.3em delta and
		   the balance line share the same line-box height and align vertically. */
		line-height: 1.6em;
		/* Nudge the balance text down 2px; the float's negative margin (below)
		   cancels this so the +N/-N delta keeps its position. */
		padding-top: 7px;
	}
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points::before {
		content: "Points Balance: ";
		display: inline;
		min-width: 0;
		/* Match the points text (not the bold #222 data-title label style). */
		font-weight: inherit;
		font-size: inherit;
		color: inherit;
	}
	/* Pull the "+N" / "-N" delta to the bottom-left, under the order number,
	   leaving the balance ("Points Balance: N Points") on the right. */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points span.ywpar_plus,
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points span.ywpar_minus {
		float: left;
		/* Cancel the cell's extra 2px top padding so the delta stays put while the
		   balance text shifts down. */
		margin-top: -2px;
	}
	/* Suffix the delta with " Points" → "+N Points" / "-N Points". */
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points span.ywpar_plus::after,
	.ywpar_points_rewards.shop_table_responsive tbody tr td.ywpar_points_rewards-points span.ywpar_minus::after {
		content: " Points";
	}
}

/* Center the Convert row ("Convert [input]") and the worth line
 * ("Converts to $10.03"); the submit button below is centered via auto margins. */
#share_points #ywpar-share-points {
	text-align: center;
}
#share_points #ywpar-share-points input#ywpar-share-points__submit {
	margin-left: auto;
	margin-right: auto;
}
/* Center the number in the input and space the "Points" suffix beside it. */
#share_points #ywpar-share-points input#ywpar_share_points_to_share {
	text-align: center;
}
#share_points #ywpar-share-points .ywpar-points-suffix {
	margin-left: 6px;
}
/* Keep "Converts to" and the price ($10.03) together on one line. */
#share_points #ywpar-share-points .ywpar-convert-worth {
	display: block;
	white-space: nowrap;
	margin-top: 10px;
}
#share_points #ywpar-share-points .ywpar-convert-worth .worth-price,
#share_points #ywpar-share-points .ywpar-convert-worth .woocommerce-Price-amount,
#share_points #ywpar-share-points .ywpar-convert-worth .woocommerce-Price-amount bdi {
	display: inline;
	float: none;
}

/*
 * "Convert" (share points) button: a primary gradient pill on its own line
 * below the conversion value, full-width on mobile. The plugin default is an
 * inline grey button trailing the "...coupon value of $X" sentence. The body
 * prefix outranks the plugin's "#share_points input#...__submit" rule.
 */
body #share_points input#ywpar-share-points__submit {
	display: block;
	width: auto;
	margin: 16px 0 0 0;
	padding: 12px 40px;
	border: none;
	border-radius: 56px;
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s linear;
}

@media (max-width: 767px) {
	body #share_points input#ywpar-share-points__submit {
		width: 100%;
	}

	/* Hide the points min/max conversion error message on mobile. */
	.ywpar-share-points-error {
		display: none !important;
	}
}

/* Mobile: 3-column compact layout */
@media (max-width: 767px) {
	.bs-dashboard-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}

	.bs-dashboard-card {
		padding: 20px 8px;
		gap: 10px;
		border-radius: 0.75rem;
	}

	.bs-dashboard-card__icon {
		font-size: 28px;
	}

	.bs-dashboard-card__label {
		font-size: 0.8rem;
	}
}

/* Pull the account content up to sit just below the header. */
.bs-account-grid {
	margin-top: 40px;
}

/* ---------------------------------------------------------------------------
 * Sidebar width: reduce the navigation column ~25% (33% -> 25%) on desktop.
 * ------------------------------------------------------------------------- */
@media (min-width: 768px) {
	.bs-account-grid {
		grid-template-columns: 1fr 3fr;
	}

	.bs-account-grid > .woocommerce-MyAccount-content {
		grid-column: span 1 / span 1;
	}
}

.rbb-account__header.title {
	transition: color 0.2s ease;
	line-height: 24px;
	font-size: 20px;
}

/* Tagline below the greeting: tight top spacing, normal weight. */
body p.rbb-account__tagline {
	padding-top: 1px;
	font-weight: 400;
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Dashboard sections: recent purchase, profile, support.
 * ------------------------------------------------------------------------- */
.bs-account-section {
	margin-top: 48px;
}

.bs-account-section__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.bs-account-section__title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
}

.bs-account-arrow-link {
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-account-link {
	font-weight: 600;
	text-decoration: underline;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-account-arrow-link:hover,
.bs-account-link:hover {
	color: var(--rbb-general-secondary-color, #f3bd66);
}

/* Recent purchase card */
.bs-recent-purchase__card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 24px;
}

.bs-recent-purchase__top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
}

.bs-recent-purchase__meta {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 10px;
	font-size: 0.9rem;
}

.bs-recent-purchase__label {
	text-transform: uppercase;
	color: #9ca3af;
	font-size: 0.7rem;
	letter-spacing: 0.04em;
}

.bs-recent-purchase__value {
	font-weight: 600;
	margin-right: 14px;
}

.bs-recent-purchase__divider {
	height: 1px;
	background: #e5e7eb;
	margin: 18px 0;
}

.bs-recent-purchase__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bs-recent-purchase__items {
	color: #6b7280;
	margin: 0;
}

.bs-recent-purchase__status {
	margin: 0;
}

.bs-recent-purchase__tracking {
	margin: 0;
	color: #6b7280;
}

.bs-recent-purchase__tracking .bs-recent-purchase__provider {
	font-weight: 700;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-recent-purchase__tracking a {
	text-decoration: underline;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-recent-purchase__tracking a:hover {
	color: var(--rbb-general-secondary-color, #f3bd66);
}

/* ---------------------------------------------------------------------------
 * Address cards: tighter header padding, larger title, icon left of the link.
 * ------------------------------------------------------------------------- */
.rbb-account__address-header {
	padding-top: 4px;
	padding-bottom: 4px;
}

/* Show a thin 2px grey edge below the white panel. */
.rbb-address__content {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: 2px;
}

/* "Save address" button: match the site's gradient pill button style. */
.rbb-account__address .woocommerce-Button.button {
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
	color: #fff;
	border-radius: 56px;
	font-size: var(--typography-button-font-size, 16px);
	line-height: 35px;
	letter-spacing: 0;
	min-height: 58px;
	transition: all 0.3s linear;
}

.rbb-account__address .woocommerce-Button.button:hover,
.rbb-account__address .woocommerce-Button.button:focus {
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
	color: #fff;
}

/* Save button: full width on mobile; centered and wider on desktop. */
.rbb-account__address form .woocommerce-Button.button {
	display: block;
	width: 100%;
}

@media (min-width: 768px) {
	.rbb-account__address form .woocommerce-Button.button {
		width: -moz-fit-content;
		width: fit-content;
		margin-left: auto;
		margin-right: auto;
		padding-left: 72px;
		padding-right: 72px;
	}
}

/* Edit-address form: two fields per row on desktop (single column on mobile). */
@media (min-width: 768px) {
	.woocommerce-address-fields__field-wrapper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 30px;
		/* Align inputs to the bottom so a label-less field (e.g. apartment)
		   lines up with the labelled field beside it. */
		align-items: end;
	}
}

.rbb-account__address-header .rbb-account__address-title {
	font-size: 1.0625rem;
}

.rbb-account__edit a.edit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	/* Use the theme's link color scheme so these track other hyperlinks. */
	color: var(--rbb-general-link-color, #163317);
}

.rbb-account__edit a.edit:hover,
.rbb-account__edit a.edit:focus {
	color: var(--rbb-general-link-hover-color, #f3bd66);
}

/* Icons use stroke: currentColor so they track the link text colour
   (e.g. turn yellow when the "Add"/"Edit" word goes yellow). */
.rbb-addr-icon-edit,
.rbb-addr-icon-add {
	display: inline-block;
	flex: 0 0 auto;
}

/* Order details: hide the "Product / Total" header row (and its thick top bar). */
.rbb-account__order-detail-info > .border-b-4 {
	display: none;
}

/* Order details top bar: order number / date on the left, status badge far right. */
.rbb-account__order-detail-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.rbb-order-meta__row {
	line-height: 1.7;
}

/* CryptoWoo "Bitcoin Payment Details" block (woocommerce_view_order hook):
   align with the order number/date bar above it (px-6 sm:px-[30px]). */
.rbb-account__order-detail .thankyou-cryptowoo {
	padding-left: 24px;
	padding-right: 24px;
	padding-bottom: 18px;
}

@media (min-width: 640px) {
	.rbb-account__order-detail .thankyou-cryptowoo {
		padding-left: 30px;
		padding-right: 30px;
	}
}

.rbb-order-meta__label {
	color: #6b7280;
}

.rbb-order-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 14px;
	border-radius: 9999px;
	background: #e7f3ea;
	color: #1b5e20;
	font-weight: 600;
	font-size: 0.8rem;
	white-space: nowrap;
}

/* Custom statuses (Order Status Manager plugin) are wrapped in a <mark>;
   strip the browser's default yellow highlight so the badge colors show. */
mark.order-status {
	background: transparent;
	color: inherit;
	font: inherit;
}

/* Status dot to the left, so it reads as a badge rather than a button. */
.rbb-order-status-badge::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

/* Hide the default address block; the summary footer renders Billed/Shipped. */
.woocommerce-customer-details {
	display: none;
}

/* Right-align the "Paid with" block so it sits below the order total amount
   (which is right-aligned in its row). */
.bs-paid-with {
	text-align: right;
}

/* ---------------------------------------------------------------------------
 * Order line items: image | name / Seed Pack / qty.
 * ------------------------------------------------------------------------- */
.bs-order-item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.bs-order-item__image {
	flex: 0 0 auto;
	display: block;
}

.bs-order-item__img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.bs-order-item__name {
	font-weight: 700;
	line-height: 1.3;
}

/* Seed Pack: value sits to the right of the label. */
.rbb-account__order-detail-product .wc-item-meta {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.rbb-account__order-detail-product .wc-item-meta li {
	display: flex;
	gap: 6px;
	margin: 0;
}

.rbb-account__order-detail-product .wc-item-meta p {
	margin: 0;
	display: inline;
}

/* Quantity below the Seed Pack line. */
.bs-order-item__qty {
	margin-top: 6px;
	color: #6b7280;
}

/* ---------------------------------------------------------------------------
 * Order summary footer (custom view-order layout).
 * ------------------------------------------------------------------------- */
.bs-order-summary {
	margin-top: 24px;
}

.bs-order-summary__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 18px;
}

/* Primary button: match the site's gradient pill button style. */
.bs-order-again {
	display: inline-block;
	width: auto;
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
	color: #fff;
	font-weight: 700;
	padding: 12px 40px;
	border-radius: 56px;
	text-align: center;
	transition: all 0.3s linear;
}

/* Hover/focus reverses the gradient, matching the site's other pill buttons. */
.bs-order-again:hover,
.bs-order-again:focus {
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-accent, #61CE70) 0%, var(--e-global-color-primary, #163317) 100%);
	color: #fff;
}

.bs-order-summary__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	align-items: start;
}

.bs-order-summary__block {
	margin-bottom: 22px;
}

.bs-order-summary__label {
	font-size: 0.95rem;
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-order-summary__value {
	margin: 0;
	line-height: 1.6;
	color: #4b5563;
	font-style: normal;
}

.bs-order-summary__provider {
	font-weight: 700;
	color: var(--rbb-general-heading-color, #163317);
}

.bs-order-summary__right {
	text-align: right;
}

.bs-order-summary__card {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.bs-card-logo {
	display: inline-block;
	width: 34px;
	height: 22px;
	border-radius: 4px;
	background: var(--rbb-general-primary-color, #163317);
}

.bs-card-digits {
	letter-spacing: 1px;
}

@media (max-width: 767px) {
	.bs-order-summary__cols {
		grid-template-columns: 1fr;
	}
	.bs-order-summary__right {
		text-align: left;
	}
}

/* External-link icon next to the tracking number. */
.bs-external-icon {
	display: inline-block;
	vertical-align: -2px;
	margin-left: 4px;
}

/* The recent-purchase "View Details" link is not underlined. */
.bs-recent-purchase__top .bs-account-arrow-link {
	text-decoration: none;
}

/* Profile cards */
.bs-profile__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.bs-profile__card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 24px;
}

.bs-profile__card-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 12px;
}

.bs-profile__card-body {
	flex: 1;
	margin-bottom: 16px;
	color: #4b5563;
	line-height: 1.5;
}

.bs-profile__card-body p {
	margin: 0 0 4px;
}

.bs-profile__points {
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.bs-profile__points-value {
	font-size: 2rem;
	font-weight: 800;
	color: var(--rbb-general-primary-color, #163317);
	line-height: 1;
}

.bs-profile__points-label {
	color: #6b7280;
}

.bs-profile__badge {
	display: inline-block;
	margin-top: 6px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------------
 * Product carousels (Buy it again / You may also like / Saved for Later).
 * ------------------------------------------------------------------------- */
.bs-account-carousel {
	margin-top: 48px;
}

.bs-account-carousel__viewport {
	position: relative;
}

.bs-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 9999px;
	background: #fff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	color: var(--rbb-general-primary-color, #163317);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	display: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.bs-carousel-arrow.is-visible {
	display: flex;
}

.bs-carousel-arrow:hover {
	background: var(--rbb-general-primary-color, #163317);
	color: #fff;
}

.bs-carousel-arrow--prev {
	left: -58px;
}

.bs-carousel-arrow--next {
	right: -58px;
}

.bs-account-carousel__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 10px;
	cursor: grab;
	/* Hide the scrollbar; scrolling is via swipe (touch) or click-drag (mouse). */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE / old Edge */
}

.bs-account-carousel__track::-webkit-scrollbar {
	display: none; /* Chrome / Safari / Edge */
}

.bs-account-carousel__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.bs-account-carousel__track.is-dragging a {
	pointer-events: none;
}

.bs-account-carousel__track > .item {
	flex: 0 0 auto;
	width: 25%;
	scroll-snap-align: start;
}

@media (max-width: 1024px) {
	.bs-account-carousel__track > .item {
		width: 33.333%;
	}
	.bs-profile__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.bs-account-carousel__track > .item {
		width: 70%;
	}

	/*
	 * Keep the carousel track aligned with the container edges (matching the
	 * section head and the cards above, e.g. the "Questions?" support card)
	 * rather than bleeding out to the viewport. The container's own horizontal
	 * padding provides the spacing from the screen edges.
	 */
	.bs-account-carousel__track {
		margin-left: 0;
		margin-right: 0;
	}

	/* Nudge the carousel product cards 4px to the left. */
	.bs-account-carousel__track > .item .product-content {
		transform: translateX(-4px);
	}
}

/*
 * The "Compare" nav item has no <i> icon; the parent theme draws its icon as a
 * ::before on the label with a fixed 2rem gap. Every other item uses
 * "mr-6 lg:mr-8" (1.5rem on mobile, 2rem at the lg breakpoint), so on mobile
 * "Compare" was indented ~0.5rem past the rest. Match the responsive gap.
 */
.rbb-account__list .woocommerce-MyAccount-navigation-link--compare a .align-middle::before {
	margin-right: 1.5rem;
}

@media (min-width: 1024px) {
	.rbb-account__list .woocommerce-MyAccount-navigation-link--compare a .align-middle::before {
		margin-right: 2rem;
	}
}

/* Hide the footer "Subscribe Newsletter" band inside the customer account
   area. account.css only loads on account pages, and the .logged-in guard
   keeps the block on the logged-out login page (a visitor there isn't an
   account holder yet) while removing it once someone is in their account —
   account holders are already subscribed, so it would be redundant.
   We hide the whole .footer-newsletter section (not just the inner block) so
   the .newsletter-top decorative ::before bar doesn't linger as a stray line. */
body.logged-in .footer-newsletter {
	display: none;
}

/* Order total: desktop shows the combined "<total> for N items" string; the
 * split count/amount spans are mobile-only (see the card block below). */
.rbb-account__order-list .bs-order-total__count,
.rbb-account__order-list .bs-order-total__amount {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Orders list — mobile card (below the lg breakpoint, where the table stacks).
 * The parent theme stacks each row and prefixes every cell with an uppercase
 * "<label>:" from its data-title. Turn the stacked row into a tidy card:
 *  - drop the Order / Date / Actions labels;
 *  - keep the order number as a prominent link (it already links to the order);
 *  - float the status as a badge in the top-right (like the order-detail page);
 *  - render the action ("View") as a primary gradient pill button.
 * Selectors carry the .rbb-account__order-list ancestor so they outrank the
 * parent's ".rbb-account__item .rbb-account__table-col" rules.
 * ------------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.rbb-account__order-list .rbb-account__item {
		position: relative;
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
		/* Stack number/date full-width, then put the total and the View button on
		   one shared row (total left, button right). The status badge is absolute
		   so it stays out of the grid flow. */
		display: grid;
		grid-template-columns: 1fr auto;
		column-gap: 12px;
		align-items: center;
	}
	.rbb-account__order-list .rbb-account__item-order-number,
	.rbb-account__order-list .rbb-account__item-order-date {
		grid-column: 1 / -1;
	}
	.rbb-account__order-list .rbb-account__item-order-total {
		grid-column: 1;
		padding-top: 0;
		/* Bottom padding equal to the View button's bottom padding (12px) so the
		   "Total: $X" line's centre lines up with the button text. The button is
		   align-self:end, so matching this offset aligns the two text centres. */
		padding-bottom: 12px;
	}
	.rbb-account__order-list .rbb-account__item-order-actions {
		grid-column: 2;
		justify-self: end;
		/* Bottom-align the button and drop its own bottom padding (Tailwind py-3)
		   so only the card's py-4 remains below it. */
		align-self: end;
		padding-bottom: 0;
	}

	/* Drop the uppercase "ORDER: / DATE: / ACTIONS:" labels. */
	.rbb-account__order-list .rbb-account__item .rbb-account__item-order-number::before,
	.rbb-account__order-list .rbb-account__item .rbb-account__item-order-date::before,
	.rbb-account__order-list .rbb-account__item .rbb-account__item-order-actions::before {
		content: none;
	}

	/* Order number: prominent, clickable; keep clear of the status badge. */
	.rbb-account__order-list .rbb-account__item-order-number {
		padding-right: 7rem;
		padding-bottom: 4px;
		/* Match the badge's text offset (badge top 1.5rem + 5px padding) so the
		   order number's line-box centre aligns with the badge text. The cell and
		   badge share leading-5 (20px), so equal offsets centre the two. */
		padding-top: 5px;
	}
	.rbb-account__order-list .rbb-account__item-order-number a {
		font-size: 1.05rem;
		font-weight: 700;
		color: var(--rbb-general-heading-color, #163317);
	}

	/* Date: secondary detail. Pull it up under the order number by trimming the
	   stacked cell's top padding (~70% off the parent's py-3 / 0.75rem). */
	.rbb-account__order-list .rbb-account__item-order-date {
		color: #6b7280;
		padding-top: 0.2rem;
		padding-bottom: 4px;
	}

	/* Status: badge in the top-right corner (mirrors .rbb-order-status-badge). */
	.rbb-account__order-list .rbb-account__item-order-status {
		position: absolute;
		top: 1.5rem;
		right: 0;
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 0;
		padding: 5px 14px;
		border-radius: 9999px;
		background: #e7f3ea;
		color: #1b5e20;
		font-weight: 600;
		font-size: 0.8rem;
		white-space: nowrap;
	}
	.rbb-account__order-list .rbb-account__item .rbb-account__item-order-status::before {
		content: "";
		display: inline-block;
		width: 8px;
		height: 8px;
		margin: 0;
		border-radius: 50%;
		/* Inherit the badge's text color (green, or amber for processing) so the
		   dot matches it. Without this the dot picks up the parent theme's #222
		   ::before label color and renders black. */
		color: inherit;
		background: currentColor;
	}

	/* "Processing" orders get a yellow badge (the row carries the status class).
	   currentColor drives the text and the dot, so both turn amber. */
	.rbb-account__order-list .woocommerce-orders-table__row--status-processing .rbb-account__item-order-status {
		background: #fbf0cf;
		color: #8a6500;
	}

	/* Total: drop the auto "Total:" data-title label and stack the item count
	   above the total amount (which carries its own "TOTAL:" prefix). */
	.rbb-account__order-list .rbb-account__item .rbb-account__item-order-total::before {
		display: none;
	}
	.rbb-account__order-list .rbb-account__item-order-total .bs-order-total__full {
		display: none;
	}
	.rbb-account__order-list .rbb-account__item-order-total .bs-order-total__count {
		display: block;
		margin-bottom: 2px;
		color: #6b7280;
	}
	.rbb-account__order-list .rbb-account__item-order-total .bs-order-total__amount {
		display: block;
		position: relative;
		top: 2px;
	}
	.rbb-account__order-list .rbb-account__item-order-total .bs-order-total__amount::before {
		content: "Total: ";
		margin-right: 5px;
		font-weight: 700;
		text-transform: uppercase;
	}

	/* Action: primary mobile button — gradient pill matching the site's primary
	   buttons (e.g. the points "Convert" button: 12px 40px padding), ~11% taller
	   than before. Right-aligned in the total row via the grid above. */
	.rbb-account__order-list .rbb-account__item-order-actions a {
		display: inline-block;
		margin: 0;
		padding: 12px 40px;
		border-radius: 56px;
		background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
		color: #fff;
		font-size: 0.85rem;
		font-weight: 700;
		text-align: center;
		transition: all 0.3s linear;
	}
}

/* Edit-account "Save changes" button: match the site's gradient pill button
   style instead of the parent theme's flat #222 / primary-color hover. */
.woocommerce-EditAccountForm .rbb-account-detail__btn,
.woocommerce-Button.rbb-account-detail__btn {
	background-color: transparent !important;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%) !important;
	color: #fff !important;
	border-radius: 56px;
	transition: all 0.3s linear;
}

/* Hover/focus reverses the gradient, matching the site's other pill buttons. */
.woocommerce-EditAccountForm .rbb-account-detail__btn:hover,
.woocommerce-EditAccountForm .rbb-account-detail__btn:focus,
.woocommerce-Button.rbb-account-detail__btn:hover,
.woocommerce-Button.rbb-account-detail__btn:focus {
	background-color: transparent !important;
	background-image: linear-gradient(90deg, var(--e-global-color-accent, #61CE70) 0%, var(--e-global-color-primary, #163317) 100%) !important;
	color: #fff !important;
}

/* ============================================================
   My Account -> Gift Cards (/my-account/giftcards/)
   ============================================================ */

/* Top row: "Your Balance" on the left, "Add a gift card?" block on the right. */
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
	margin-bottom: 32px;
}
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-balance {
	flex: 0 0 auto;
}

/* Tighten the gap under the "Your Balance" heading. */
.woocommerce-MyAccount-content h2:has(+ .woocommerce-MyAccount-Giftcards-balance-amount) {
	margin-bottom: 10px;
}

/* Remove the gap under the balance amount. */
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-balance-amount {
	margin-bottom: 0;
}

/* "Add a gift card?" form — grey block containing heading, field and button.
   Fills the full width to the right of the balance. */
.woocommerce-MyAccount-content form:has(.woocommerce-MyAccount-Giftcards-form) {
	flex: 1 1 360px;
	background-color: #f5f5f3;
	border: 1px solid #e6e3d8;
	border-radius: 16px;
	padding: 24px;
	margin: 0;
	max-width: none;
}
.woocommerce-MyAccount-content form:has(.woocommerce-MyAccount-Giftcards-form) h4 {
	margin: 0 0 16px;
}

/* Field on the left, button on the right. */
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 16px;
}

/* Code input styled to match the theme's form fields. */
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form input.input-text {
	flex: 1 1 auto;
	width: auto;
	margin: 0;
	min-height: 0;
	height: auto;
	padding: 12px 16px;
	line-height: 1.4;
	box-sizing: border-box;
	border: 1px solid #d8d5c7;
	border-radius: 8px;
	background-color: #fff;
	font-size: 0.95rem;
	color: var(--e-global-color-text, #434343);
}
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form input.input-text:focus {
	outline: none;
	border-color: var(--e-global-color-secondary, #006B41);
	box-shadow: 0 0 0 3px rgba(0, 107, 65, 0.12);
}

/* Primary button design + hover, sized to its content (right of the field). */
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form button {
	flex: 0 0 auto;
	display: inline-block;
	width: auto;
	margin: 0;
	padding: 12px 28px;
	border: 0;
	border-radius: 56px;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	text-align: center;
	cursor: pointer;
	background-color: transparent;
	background-image: linear-gradient(90deg, var(--e-global-color-primary, #163317) 0%, var(--e-global-color-accent, #61CE70) 100%);
	transition: all 0.3s linear;
}
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form button:hover,
.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form button:focus {
	background-image: linear-gradient(90deg, var(--e-global-color-accent, #61CE70) 0%, var(--e-global-color-primary, #163317) 100%);
	color: #fff;
}

/* Stack the field and button on small screens. */
@media (max-width: 575px) {
	.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form {
		flex-direction: column;
		align-items: stretch;
	}
	.woocommerce-MyAccount-content .woocommerce-MyAccount-Giftcards-form button {
		width: 100%;
	}
}

/* Make the Active Gift Cards and Activity tables equal (full) width. */
.woocommerce-MyAccount-content .woocommerce-giftcards-table,
.woocommerce-MyAccount-content .woocommerce-giftcards-activity-table {
	width: 100%;
}

/* More breathing room between the gift card / activity table columns. */
@media (min-width: 768px) {
	.woocommerce-MyAccount-content .woocommerce-giftcards-table th,
	.woocommerce-MyAccount-content .woocommerce-giftcards-table td,
	.woocommerce-MyAccount-content .woocommerce-giftcards-activity-table th,
	.woocommerce-MyAccount-content .woocommerce-giftcards-activity-table td {
		padding: 14px 2.5rem 14px 0;
	}

	/*
	 * Right-align the last column of both tables so the Active Gift Cards
	 * "Expires" column lines up with the Activity "Amount" column (the tables
	 * have different column counts, so both are flushed to the shared edge).
	 */
	.woocommerce-MyAccount-content .woocommerce-giftcards-table th:last-child,
	.woocommerce-MyAccount-content .woocommerce-giftcards-table td:last-child,
	.woocommerce-MyAccount-content .woocommerce-giftcards-activity-table th:last-child,
	.woocommerce-MyAccount-content .woocommerce-giftcards-activity-table td:last-child {
		text-align: right;
		padding-right: 0;
	}
}
