.snker-dict-index {
	max-width: 720px;
	margin: 0 auto;
}

/* Tight spacing on dictionary archive / page */
.post-type-archive-sunk main .wp-block-heading,
.page main .wp-block-heading:has(+ .wp-block-shortcode .snker-dict-index) {
	margin-top: 0;
	margin-bottom: 0.65rem;
}

.wp-block-shortcode:has(.snker-dict-index) {
	margin-top: 0;
	margin-bottom: 0;
}

.snker-dict-index__toolbar {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 0.85rem;
}

.snker-dict-index__search-wrap {
	width: 100%;
}

.snker-dict-index__search {
	width: 100%;
	max-width: 100%;
	padding: 0.7rem 1.15rem;
	border: 2px solid var(--wp--preset--color--mono-1, #1a1a1a);
	border-radius: 999px;
	font-size: 1rem;
	background: var(--wp--preset--color--base, #fff);
	box-sizing: border-box;
}

.snker-dict-index__search:focus {
	outline: none;
	border-color: var(--wp--preset--color--mono-1, #000);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.snker-dict-index__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.5rem;
	row-gap: 0.4rem;
}

.snker-dict-index__scope,
.snker-dict-index__sort {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.snker-dict-index__sep {
	display: inline-block;
	width: 1px;
	height: 1.1rem;
	background: var(--wp--preset--color--mono-3, #cbd5e0);
	margin: 0 0.15rem;
}

.snker-dict-index__count {
	font-size: 0.6875rem;
	opacity: 0.7;
	font-weight: 500;
	margin-left: 0.15rem;
}

.snker-dict-index__sort-btn.is-active .snker-dict-index__count {
	opacity: 0.85;
}

@media (max-width: 540px) {
	.snker-dict-index__sep {
		display: none;
	}
}

.snker-dict-index .snker-dict-index__sort-btn {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.4375rem 0.95rem;
	border: 1px solid var(--wp--preset--color--mono-3, #cbd5e0);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-align: center;
	white-space: nowrap;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.snker-dict-index__sort-label {
	display: block;
	line-height: 1;
	margin: 0;
	padding: 0;
}

.snker-dict-index .snker-dict-index__sort-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--mono-1, #000);
	outline-offset: 2px;
}

.snker-dict-index .snker-dict-index__sort-btn:hover,
.snker-dict-index .snker-dict-index__sort-btn:focus {
	background: transparent;
	color: inherit;
}

.snker-dict-index__sort-btn.is-active {
	background: var(--wp--preset--color--mono-1, #000);
	color: var(--wp--preset--color--base, #fff);
	border-color: var(--wp--preset--color--mono-1, #000);
}

.snker-dict-index .snker-dict-index__sort-btn.is-active:hover,
.snker-dict-index .snker-dict-index__sort-btn.is-active:focus {
	background: var(--wp--preset--color--mono-1, #000);
	color: var(--wp--preset--color--base, #fff);
}

.snker-dict-index__sections {
	margin: 0;
}

.snker-dict-index__section {
	margin-bottom: 0.85rem;
}

.snker-dict-index__section.is-hidden {
	display: none;
}

.snker-dict-index__letter {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--mono-1, #000);
}

.snker-dict-index__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.snker-dict-index__item {
	margin: 0;
	padding: 0.2rem 0;
	line-height: 1.45;
	font-size: 1rem;
}

.snker-dict-index__item.is-hidden {
	display: none;
}

.snker-dict-index__item a {
	text-decoration: none;
	color: var(--wp--preset--color--mono-1, #111);
	font-weight: 500;
}

.snker-dict-index__item--genus a {
	font-weight: 700;
}

.snker-dict-index__taxa {
	margin-left: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--wp--preset--color--mono-3, #9aa0a6);
	opacity: 0.75;
	vertical-align: baseline;
	font-variant-numeric: tabular-nums;
}

.snker-dict-index[data-scope="all"] .snker-dict-index__item--species {
	padding-left: 1.1rem;
	position: relative;
	font-size: 0.95rem;
}

.snker-dict-index[data-scope="all"] .snker-dict-index__item--species::before {
	content: "·";
	position: absolute;
	left: 0.35rem;
	color: var(--wp--preset--color--mono-3, #94a3b8);
}

.snker-dict-index__item a:hover {
	text-decoration: underline;
}

.snker-dict-index__empty,
.snker-dict-index__none {
	text-align: center;
	color: var(--wp--preset--color--mono-2, #4a5568);
	margin: 2rem 0;
}
