/* Dark-mode supplements — live selectors only.
 *
 * This sheet used to be 580 lines of patches for an exported Elementor /
 * WooCommerce theme: `ul.products`, `woocommerce-loop-product__title`,
 * `.elementor-widget-*`, `.rc-custom`, `.wp-block-code`. None of those
 * elements exist in this application — the storefront is plain PHP views and
 * the `woocommerce` / `elementor` strings on a page are body classes inherited
 * from bundle.css. The rules were removed; the classes they targeted are gone,
 * so nothing changes visually and 88 !important declarations left the cascade.
 *
 * What remains are the four surfaces that are real markup and were never
 * reached by the token board:
 *
 *   1. `.bg-accent-btn` — the nav CTA's Tailwind utility class (49 uses).
 *   2. `.sh-login-popup-cta .button` — the auth popup primary.
 *   3. `.page-content` — body copy on the policy pages (6 uses).
 *   4. `.product_title`, `.acct-item-qty` — single live overrides.
 *
 * Colour comes from `--hb-*` in system.css. The `--hbg-*` names below are
 * aliases kept so older markup that reads them still resolves; new rules use
 * `--hb-*` directly.
 */

:root {
	--hbg-ink: var(--hb-ink);
	--hbg-inverse: var(--hb-inverse);
	--hbg-page: var(--hb-bg);
	--hbg-surface: var(--hb-card);
	--hbg-surface-2: var(--hb-bg-2);
	--hbg-line: var(--hb-line);
	--hbg-line-strong: var(--hb-line-strong);
	--hbg-muted: var(--hb-muted);
	--hbg-faint: var(--hb-faint);
	--hbg-accent: var(--hb-accent);
	--hbg-accent-hi: var(--hb-accent-hi);
	--hbg-accent-ink: var(--hb-accent-ink);
	--hbg-accent-soft: var(--hb-accent-soft);
	--hbg-accent-line: var(--hb-accent-line);
	--hbg-accent-glow: rgb(101 113 255 / 0.32);
}

/* --------------------------------------------------------- product page */

/* Elementor's heading widget painted the title through a four-class selector,
 * so the plain `.product_title` rule still needs the override weight against
 * whatever bundle.css ships for an `h1.entry-title`. */
body.dark .product_title,
body.dark h1.product_title.entry-title {
	color: var(--hb-ink) !important;
}

/* --------------------------------------------------- policy page copy */

/* Body copy links inside long-form text keep the vendor's #2b2b2b ink, which
 * disappears on dark. Buttons keep their own foreground. */
body.dark .page-content a:not(.button) {
	color: var(--hb-accent-ink) !important;
	text-decoration-color: var(--hb-accent-line);
}

body.dark ::selection {
	background: rgb(101 113 255 / 0.4);
	color: #ffffff;
}

/* ------------------------------------------------------ nav accent CTA */

/* The vendored bar paints this with Tailwind utilities at a specificity the
 * plain class cannot reach, so the fill carries !important. */
.bg-accent-btn {
	border-color: transparent !important;
	background-color: var(--hb-btn-primary) !important;
	background-image: linear-gradient(
		180deg,
		var(--hb-btn-primary-hi),
		var(--hb-btn-primary) 55%,
		var(--hb-btn-primary-lo)
	) !important;
	color: var(--hb-btn-primary-ink) !important;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.28),
		0 1px 2px rgb(16 18 24 / 0.1),
		0 8px 18px -10px rgb(101 113 255 / 0.65) !important;
}

.bg-accent-btn:hover {
	background-image: linear-gradient(
		180deg,
		var(--hb-btn-primary-hi),
		var(--hb-btn-primary) 55%,
		var(--hb-btn-primary-lo)
	) !important;
	color: var(--hb-btn-primary-ink) !important;
	filter: saturate(1.06) brightness(1.03) !important;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.34),
		0 3px 6px rgb(16 18 24 / 0.12),
		0 14px 26px -12px rgb(101 113 255 / 0.75) !important;
}

.bg-accent-btn:active {
	box-shadow:
		inset 0 2px 6px rgb(24 28 90 / 0.24),
		0 1px 2px rgb(16 18 24 / 0.12) !important;
}

.bg-accent-btn:focus-visible {
	outline: 2px solid var(--hb-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------- auth popup primary */

.sh-login-popup-cta .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--hb-btn-radius);
	background-color: var(--hb-btn-primary);
	background-image: linear-gradient(
		180deg,
		var(--hb-btn-primary-hi),
		var(--hb-btn-primary) 55%,
		var(--hb-btn-primary-lo)
	);
	color: var(--hb-btn-primary-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.28),
		0 1px 2px rgb(16 18 24 / 0.1),
		0 8px 18px -10px rgb(101 113 255 / 0.65);
	transition:
		transform var(--hb-dur) var(--hb-ease),
		box-shadow var(--hb-dur) ease,
		filter var(--hb-dur) ease;
}

.sh-login-popup-cta .button:hover {
	transform: translateY(-1px);
	color: var(--hb-btn-primary-ink);
	filter: saturate(1.06) brightness(1.03);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.34),
		0 3px 6px rgb(16 18 24 / 0.12),
		0 14px 26px -12px rgb(101 113 255 / 0.75);
}

.sh-login-popup-cta .button:active {
	transform: translateY(0);
	filter: none;
	box-shadow:
		inset 0 2px 6px rgb(24 28 90 / 0.24),
		0 1px 2px rgb(16 18 24 / 0.12);
}

.sh-login-popup-cta .button:focus-visible {
	outline: 2px solid var(--hb-accent);
	outline-offset: 2px;
}

/* ------------------------------------------------- cart line quantity */

.acct-item-qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 8px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-sm);
	color: var(--hb-muted);
	font-size: 12.5px;
	font-weight: 600;
}

/* ------------------------------------------------ vendored dark gaps */

/* bundle.css paints these two with a literal #fff. Both are real controls:
 * the back-to-top affordance and the tab strip inside the auth popup. */
body.dark .sh-back-to-top {
	background-color: var(--hb-card);
	border-color: var(--hb-line);
	color: var(--hb-muted);
}

body.dark .sh-back-to-top:hover {
	background-color: var(--hb-bg-3);
	color: var(--hb-ink);
}

body.dark .sh-login-popup-tabs {
	background-color: var(--hb-bg-2);
	border-color: var(--hb-line);
}

body.dark .sh-login-popup-tabs a,
body.dark .sh-login-popup-tabs button {
	color: var(--hb-muted);
}

body.dark .sh-login-popup-tabs .active,
body.dark .sh-login-popup-tabs [aria-selected="true"] {
	background-color: var(--hb-card);
	color: var(--hb-ink);
}

