/* ── Ctrl+K palette ──────────────────────────────────────────────────── */
.rooster-admin-palette {
	@apply mx-auto my-[12vh] max-h-[76vh] w-[min(680px,calc(100vw-32px))] overflow-hidden rounded-2xl border border-border bg-card p-0 text-card-foreground shadow-modal;
	transition:
		opacity var(--ra-dur) var(--ra-ease),
		transform var(--ra-dur) var(--ra-ease),
		overlay var(--ra-dur) allow-discrete,
		display var(--ra-dur) allow-discrete;

	@variant open {
		@apply opacity-100;
		transform: none;

		@starting-style {
			@apply opacity-0;
			transform: translateY(8px) scale(0.98);
		}
	}
}

.rooster-admin-palette::backdrop {
	background: rgb(9 9 11 / 40%);
	transition:
		background-color var(--ra-dur) var(--ra-ease),
		overlay var(--ra-dur) allow-discrete,
		display var(--ra-dur) allow-discrete;

	@starting-style {
		background: rgb(9 9 11 / 0%);
	}
}

.rooster-admin-palette__head {
	@apply flex items-center gap-2.5 border-b border-border px-4 py-3 text-secondary-foreground;
}

.rooster-admin-palette input.rooster-admin-palette__input,
.rooster-admin-palette input.rooster-admin-palette__input:focus {
	@apply min-w-0 flex-auto border-0 bg-transparent px-0 py-1 text-lg text-foreground shadow-none;
	outline: 0;
}

.rooster-admin-palette__list {
	@apply m-0 max-h-[56vh] list-none overflow-y-auto p-1.5;
}

.rooster-admin-palette__opt {
	@apply m-0 cursor-pointer rounded-lg px-3 py-2;
}

/* The selected option in a light tint of the accent, not grey (0.68.17; the owner's accent rule, C2: a current or
   pressed thing takes the accent). */
.rooster-admin-palette__opt[aria-selected="true"] {
	@apply relative;
	background: color-mix(in srgb, var(--ra-accent) 10%, var(--ra-background));
}

.rooster-admin-palette__opt[aria-selected="true"]::before {
	@apply absolute start-0 top-1.5 bottom-1.5 w-0.5 content-[''];
	background: var(--ra-sec, var(--ra-ring));
}

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

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

.rooster-admin-palette__title {
	@apply text-base font-semibold text-foreground;
}

.rooster-admin-palette__sec {
	@apply ms-auto inline-flex items-center gap-1.25 text-2xs whitespace-nowrap;
	color: var(--ra-sec-ink, var(--ra-secondary-foreground));
}

.rooster-admin-palette__sec::before {
	@apply size-2 rounded-full content-[''];
	background: var(--ra-sec, var(--ra-ring));
}

.rooster-admin-palette__desc {
	@apply mt-0.5 mb-0 text-xs leading-[1.4] text-secondary-foreground;
}

.rooster-admin-palette__empty {
	@apply m-0 px-4 py-4.5 text-secondary-foreground;
}

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

.rooster-admin-palette__foot {
	@apply m-0 flex flex-wrap gap-x-4.5 gap-y-1.5 border-t border-border px-4 py-2 text-2xs text-secondary-foreground;
}
