/*
 * Stand-in: WooCommerce single-product tabs on the palette and the navigation role. See anima-woocommerce-tabs.php.
 * Selectors are WooCommerce's own, one class stronger than its stylesheet (`.woocommerce div.product .woocommerce-tabs
 * ul.tabs li…`). Colours are the current palette variation's tokens; 44px is the WCAG target size (no token).
 */
.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs {
	/* Anima's own tab-row spacing (its `.wc-tabs` rule loses to WooCommerce's margin/padding). */
	margin: 0 0 var(--theme-spacing-large) calc(var(--theme-spacing-large) * -1);
	padding: 0;
	overflow: visible;
}

/* WooCommerce's tab boxes (grey fill, border, rounded corners, corner pseudo-elements) give way to Anima's text tabs. */
.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class] {
	display: flex; /* the row is as tall as the 44px link, not the heading-sized line box */
	margin: 0 0 0 var(--theme-spacing-large);
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
}

.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class]::before,
.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class]::after {
	content: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs::before {
	border-bottom: var(--theme-input-border-width, 1px) solid var(--sm-current-divider-color);
}

/* Labels: the navigation role (secondary family), the palette's quiet ink, the accent when active or hovered. */
.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class] a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0; /* the link carries `.h3`, which brings a heading's bottom margin */
	padding: var(--theme-spacing-smallest) 0;
	border-bottom: 0.125em solid transparent;
	color: var(--sm-current-fg2-color);
	text-decoration: none;
	text-shadow: none;
	--font-size: var(--theme-navigation-font-size);
	--current-font-family: var(--theme-navigation-font-family);
	--current-font-weight: var(--theme-navigation-font-weight);
	--current-font-style: var(--theme-navigation-font-style);
	--current-line-height: var(--theme-navigation-line-height);
	--current-letter-spacing: var(--theme-navigation-letter-spacing);
	--current-text-transform: var(--theme-navigation-text-transform);
	font-family: var(--current-font-family);
	font-size: var(--current-font-size);
	font-weight: var(--current-font-weight);
	letter-spacing: var(--current-letter-spacing);
	text-transform: var(--current-text-transform);
	line-height: var(--current-line-height);
}

.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class] a:is(:hover, :focus-visible),
.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li.active[class] a {
	color: var(--sm-current-accent-color);
	border-bottom-color: currentColor;
}

/* Phones: a full-width list, one ruled 44px row per tab; the active row carries the accent bar. */
@media only screen and (max-width: 699px) {
	.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs {
		flex-direction: column;
		align-items: stretch;
		margin-left: 0;
		border-top: var(--theme-input-border-width, 1px) solid var(--sm-current-divider-color);
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs::before {
		content: none;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs > li[class] {
		margin: 0;
		border-bottom: var(--theme-input-border-width, 1px) solid var(--sm-current-divider-color);
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li[class] a {
		display: flex;
		width: 100%;
		padding: var(--theme-spacing-smallest) var(--theme-spacing-smaller);
		border-bottom: 0;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs.wc-tabs li.active[class] a {
		box-shadow: inset calc(var(--theme-input-border-width, 1px) * 3) 0 0 currentColor;
	}
}
