/* @svelte-lean/styles — kbd (Tier 0, native <kbd>).
 * Markup: <kbd data-slean="kbd">Esc</kbd>, or a combination with one nested <kbd> per key:
 * <kbd data-slean="kbd"><kbd>Ctrl</kbd>+<kbd>K</kbd></kbd>. A key is a bordered box with a
 * thicker bottom edge; a root that contains keys draws them and not itself (through :has(), so a
 * browser without it draws one box around the keys). */
@layer slean.reset, slean.tokens, slean.base, slean.components, slean.compositions, slean.utilities;

@layer slean.components {
	:where([data-slean='kbd']),
	:where([data-slean='kbd'] > kbd) {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-inline-size: 1.75em;
		min-block-size: 1.75em;
		padding-block: 0;
		padding-inline: 0.4em;
		border: 1px solid var(--slean-border-strong);
		border-block-end-width: 2px;
		border-radius: var(--slean-radius-sm);
		background: var(--slean-surface);
		color: var(--slean-fg);
		font-family: inherit;
		font-size: var(--slean-text-xs);
		font-weight: var(--slean-font-weight-medium);
		line-height: 1;
		white-space: nowrap;
	}

	:where([data-slean='kbd']:has(> kbd)) {
		gap: 0.3em;
		min-inline-size: 0;
		padding-inline: 0;
		border: 0;
		background: transparent;
		color: var(--slean-fg-muted);
	}
}
