/*
 * rooster/mark, variant nav (the page agents' gaps, package B): the legacy LMS landing's area bar (`nav.lmsl-areas`,
 * `.lmsl-pill`), complete on its own: the pills wrapped 8 px apart, each 44 px tall at the least, 8 px over and 16 px
 * aside, fully rounded, filled with its tone's accent and the text on it (the theme's on-accent for a family: its
 * accent class on the item; for a semantic tone white on a dark fill and black on a light one, from the fill's oklch
 * lightness), its 18 px icon 8 px before the 15 px semibold words; a little darker under the pointer and in focus, the
 * focus ring 2 px in the contrast ink 2 px out (visible in both schemes). Compiled by build/blocks-css.mjs.
 */

@import "../../theme.css";

.rooster-mark-nav {
	box-sizing: border-box;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	overflow-wrap: normal;
	word-break: normal;
}

.rooster-mark-nav .rooster-mark-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rooster-mark-nav__list > li {
	margin: 0;
}

/* A semantic tone (the block's, or an item's): the accent presets mapped to the palette's colour here. */
.rooster-mark-nav .is-tone-success {
	--wp--preset--color--accent: var(--wp--preset--color--success, light-dark(#15803d, #4ade80));
}

.rooster-mark-nav .is-tone-warning {
	--wp--preset--color--accent: var(--wp--preset--color--warning, light-dark(#b45309, #fbbf24));
}

.rooster-mark-nav .is-tone-danger {
	--wp--preset--color--accent: var(--wp--preset--color--danger, light-dark(#b91c1c, #f87171));
}

.rooster-mark-nav .is-tone-neutral {
	--wp--preset--color--accent: var(--wp--preset--color--muted, light-dark(#525252, #a3a3a3));
}

.rooster-mark-nav:is(.is-tone-success, .is-tone-warning, .is-tone-danger, .is-tone-neutral),
.rooster-mark-nav :is(.is-tone-success, .is-tone-warning, .is-tone-danger, .is-tone-neutral) {
	--wp--preset--color--on-accent: oklch(from var(--wp--preset--color--accent) clamp(0, (0.62 - l) * 1000, 1) 0 0);
}

.rooster-mark-nav .rooster-mark-nav__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent, light-dark(#334155, #cbd5e1));
	color: var(--wp--preset--color--on-accent, light-dark(#ffffff, #020618));
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.rooster-mark-nav a.rooster-mark-nav__pill:hover,
.rooster-mark-nav a.rooster-mark-nav__pill:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--accent, light-dark(#334155, #cbd5e1)) 88%, #000000);
	color: var(--wp--preset--color--on-accent, light-dark(#ffffff, #020618));
}

.rooster-mark-nav a.rooster-mark-nav__pill:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast, light-dark(#020618, #ffffff));
	outline-offset: 2px;
}

.rooster-mark-nav .rooster-mark-nav__icon {
	display: block;
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
}
