/**
 * Pinned tabs — the Tab List of a Tabs block with "Pin tab row" on
 * (assets/editor/tabs-pinned-controls.js writes `is-tabs-pinned`).
 *
 * The row sticks for as long as its Tabs block is on screen: sticky is held
 * by the parent, so it lets go where the panels end.
 */

.is-tabs-pinned > .wp-block-tab-list {
	position: sticky;
	/* Everything pinned above it, as the anchor nav measures it. */
	top: calc(var(--wp-admin--admin-bar--position-offset, 0px) + var(--sticky-header-height, 0px));
	/* One above core's sticky groups (10), which scroll under it. */
	z-index: 11;
	/* The surface it sits on: every palette and scheme restates `base`. */
	background-color: var(--wp--preset--color--base);
	padding-block: var(--wp--preset--spacing--xs);
}

/* A Tabs block with its own Background: the row carries that instead. */
.is-tabs-pinned.has-background > .wp-block-tab-list {
	background-color: inherit;
}
