/* ── Home: catalogue ─────────────────────────────────────────────────── */
.rooster-admin-catalogue {
	@apply mt-5 rounded-xl bg-background p-5 shadow-sm;
}

.rooster-admin-summary {
	@apply flex items-center gap-4 rounded-lg border border-border p-5 text-center;
}

.rooster-admin-summary__icon {
	@apply inline-flex size-5.5 flex-none items-center justify-center rounded-full border-2 border-link font-serif text-sm font-bold text-link;
}

.rooster-admin-summary__text {
	@apply flex-auto;
}

.rooster-admin-summary h2 {
	@apply mt-0 mb-1.5 text-xl font-medium;
}

.rooster-admin-summary p {
	@apply mt-1 mb-0 text-sm text-secondary-foreground;
}

.rooster-admin-summary__filter {
	@apply text-info;
}

.rooster-admin-summary__reset {
	@apply inline-flex flex-none cursor-pointer rounded-full border-0 bg-transparent p-1 text-secondary-foreground hover:bg-muted hover:text-foreground;
}

.rooster-admin-catalogue > .rooster-admin-board {
	@apply mt-4;
}

.rooster-admin-home__none[hidden],
.rooster-admin-summary__filter[hidden] {
	display: none;
}

/* The Home's blocks are board cards (0.58.0, Metronic note F9): the card's skin, head and grip; the block keeps its
   own lists. Its body holds the group labels and the lists, which space themselves (no card rhythm). */
.rooster-admin-block {
	@apply scroll-mt-35;
}

.rooster-admin-block__body {
	@apply pb-2;
}

.rooster-admin-block[hidden] {
	display: none;
}

.rooster-admin-block__group {
	@apply mx-4.5 mt-2.5 mb-0 text-2xs font-semibold tracking-[0.04em] uppercase;
	color: var(--ra-sec-ink, var(--ra-secondary-foreground));
}

.rooster-admin-block__group[hidden] {
	display: none;
}

.rooster-admin-block__count {
	@apply min-w-5.5 rounded-full px-1.75 py-0.5 text-center text-2xs font-semibold;
	background: color-mix(in srgb, var(--ra-sec, var(--ra-muted)) 26%, var(--ra-background));
	color: color-mix(
		in srgb,
		var(--ra-sec-ink, var(--ra-foreground)) 85%,
		var(--ra-foreground)
	); /* an ink reads on white at 4.5:1; on its own wash it needs a step more (axe: the grey section's count) */
}

.rooster-admin .rooster-admin-block .rooster-admin-block__list {
	@apply m-0 list-none px-4 pt-1 pb-2;
}

.rooster-admin-block__item {
	@apply m-0 px-0.5 py-2.5;
}

/* The line between two items starts where the description starts (the icon and its gap: 26 px), not under the icon
   (the owner, 24 Oct). Drawn before the row, so the item's top padding moves below it. */
.rooster-admin-block__item:not([hidden]) ~ .rooster-admin-block__item:not([hidden]) {
	@apply pt-0;
}

/* stylelint-disable selector-max-specificity -- the thread between visible items: the two :not([hidden]) are the structure */
.rooster-admin-block__item:not([hidden]) ~ .rooster-admin-block__item:not([hidden])::before {
	@apply mb-2.5 ms-6.5 block border-t border-border content-[''];
}

.rooster-admin-block__sub .rooster-admin-block__item:not([hidden]) ~ .rooster-admin-block__item:not([hidden])::before {
	@apply mb-1.5;
}

/* The line that closes a sub-group (the item after one that has children) starts where the lines of that sub-group's
   rows start: one level deeper (the sub-list's 26 px indent, its thread and 12 px padding) plus the description's
   26 px, so the group's lines align (the owner, 24 Oct). */
.rooster-admin-block__item:has(> .rooster-admin-block__sub) ~ .rooster-admin-block__item:not([hidden])::before {
	@apply mb-2.5 ms-[65px];
	border-top-color: color-mix(
		in srgb,
		var(--ra-sec, var(--ra-border)) 55%,
		var(--ra-background)
	); /* the section's tint: a group boundary, not a row */
}

.rooster-admin-block__item[hidden] {
	display: none;
}

.rooster-admin-block__row {
	@apply flex items-center gap-2;
}

.rooster-admin-block__link {
	@apply text-base text-link no-underline hover:underline;
}

.rooster-admin-block__row > .rooster-admin-ico {
	@apply text-foreground;
}

.rooster-admin-block__desc {
	@apply mt-1 mb-0 ps-6.5 pe-7 text-sm leading-[1.45] text-secondary-foreground;
}

/* The hierarchy on Home: a parent's children nested under it, smaller; a parent only heading children away from
   its section in a muted row without a pin. */
/* The thread of a nested list in the section's colour (the owner, 24 Oct: "the vertical thin lines follow the colours of
   the groups"), a little deeper at each level. */
.rooster-admin .rooster-admin-block .rooster-admin-block__sub {
	@apply mt-1 ms-6.5 list-none border-s ps-3;
	border-inline-start-color: color-mix(in srgb, var(--ra-sec, var(--ra-border)) 70%, var(--ra-background));
}

/* A hairline for the deeper level: a pixel cannot be thinner on a 1x screen, so it goes lighter (and half a pixel on
   high-density screens, where the browser can draw it). */
.rooster-admin .rooster-admin-block .rooster-admin-block__sub .rooster-admin-block__sub {
	border-inline-start-width: 0.5px;
	border-inline-start-color: color-mix(in srgb, var(--ra-sec, var(--ra-border)) 40%, var(--ra-background));
}

.rooster-admin-block__sub .rooster-admin-block__item {
	@apply py-1.5;
}

.rooster-admin-block__sub .rooster-admin-block__link {
	@apply text-sm;
}

.rooster-admin-block__sub .rooster-admin-block__desc {
	@apply text-xs;
}

.rooster-admin-block__item.is-foreign > .rooster-admin-block__row > .rooster-admin-block__link {
	@apply font-medium text-secondary-foreground;
}

.rooster-admin-home__rest {
	@apply mt-5 rounded-xl border border-dashed border-border bg-background px-5 py-3.5;
}

.rooster-admin-home__rest > summary {
	@apply cursor-pointer font-semibold text-secondary-foreground;
}

.rooster-admin-home__restgrid {
	@apply mt-3.5 grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-x-6 gap-y-4;
}

.rooster-admin-home__restsec .rooster-admin-ico {
	@apply me-1.5 align-[-3px];
}

.rooster-admin-home__restsec h3 {
	@apply mt-0 mb-1.5 border-t-[3px] pt-1.5 text-sm;
	border-top-color: var(--ra-sec, var(--ra-border));
}

.rooster-admin-home__restsec ul {
	@apply m-0;
}

.rooster-admin-home__restsec li {
	@apply mb-2;
}

.rooster-admin-home__restdesc {
	@apply block ps-5.5 text-xs text-secondary-foreground;
}
