/* Dark mode colors */
:root {
	--sl-color-accent-low: #241c43;
	--sl-color-accent: #6e45d7;
	--sl-color-accent-high: #c7c1f4;
	--sl-color-white: #ffffff;
	--sl-color-gray-1: #edecf5;
	--sl-color-gray-2: #c1c1cb;
	--sl-color-gray-3: #8b899d;
	--sl-color-gray-4: #575568;
	--sl-color-gray-5: #383647;
	--sl-color-gray-6: #262435;
	--sl-color-black: #18171f;
}

/* Light mode colors */
:root[data-theme='light'] {
	--sl-color-accent-low: #d6d2f8;
	--sl-color-accent: #7048d9;
	--sl-color-accent-high: #332563;
	--sl-color-white: #18171f;
	--sl-color-gray-1: #262435;
	--sl-color-gray-2: #383647;
	--sl-color-gray-3: #575568;
	--sl-color-gray-4: #8b899d;
	--sl-color-gray-5: #c1c1cb;
	--sl-color-gray-6: #edecf5;
	--sl-color-gray-7: #f6f6fa;
	--sl-color-black: #ffffff;
}

/* Add bottom padding to list items if they contain tabs and a script as their last children */
.sl-markdown-content li:has(starlight-tabs + script:last-child) {
	padding-bottom: 1.5rem;
}

table td code[dir="auto"] {
	white-space: nowrap;
}

dl.type-declaration-list dt {
	display: list-item;
	list-style-type: disc;
	margin-inline-start: 2.5rem;
	margin-block-end: 1rem;
	color: var(--sl-color-white);
	line-height: var(--sl-line-height-headings);
	font-weight: 600;
}

dl.type-declaration-list dd {
	margin-inline-start: 1.5rem;
}

.property-signature {
	display: grid;
	grid-template-columns: max-content auto;
	justify-items: start;
	align-items: baseline;
	grid-gap: 0.2rem 0.5rem;
}
.property-signature .name {
	font-weight: bold;
	grid-column: 1;
}
.property-signature .value {
	grid-column: 2;
	font-family: var(--__sl-font-mono);
	font-size: var(--sl-text-code-sm);
	background-color: rgba(128, 128, 128, 0.12);
	padding: 0.125rem 0.375rem;
}
.property-signature a {
	color: var(--sl-color-text-accent);
}
.property-signature a:hover {
	color: var(--sl-color-white);
}

/* Add view transitions */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}
}

:root::view-transition-old(root),
:root::view-transition-new(root) {
	animation-duration: 175ms;
}
