/* The button and panel use fixed colours, not the theme's, so their contrast does not depend on the site. */
.v-kit-access {
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	/* One below the cookie banner (99999), so on a narrow screen the banner stays readable. */
	z-index: 99998;
	color: #1c1917;
	font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.v-kit-access [hidden] {
	display: none;
}

.v-kit-access__button,
.v-kit-access__reset {
	min-height: 2.75rem;
	padding: 0.5rem 1.125rem;
	border: 2px solid #fff;
	border-radius: 2rem;
	background: #1c1917;
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 12px rgb(0 0 0 / 0.3);
}

.v-kit-access__reset {
	margin-top: 0.5rem;
	border-color: #1c1917;
	border-radius: 0.375rem;
	background: #fff;
	color: #1c1917;
	box-shadow: none;
}

.v-kit-access__reset:hover {
	background: #1c1917;
	color: #fff;
}

/* A white gap and a dark ring: one of the two stands out on any page colour. */
.v-kit-access__button:focus-visible,
.v-kit-access__reset:focus-visible,
.v-kit-access input:focus-visible {
	outline: 3px solid #1c1917;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

.v-kit-access__panel {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 0;
	box-sizing: border-box;
	width: 17rem;
	max-width: calc(100vw - 2rem);
	max-height: 70vh;
	padding: 1rem;
	overflow-y: auto;
	border: 2px solid #1c1917;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 4px 24px rgb(0 0 0 / 0.25);
}

.v-kit-access__panel:not([hidden]) {
	animation: v-kit-access-in 0.2s ease-out;
}

.v-kit-access__title {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 700;
}

.v-kit-access__group {
	margin: 0;
	padding: 0;
	border: 0;
}

.v-kit-access__group legend {
	padding: 0;
	font-weight: 600;
}

.v-kit-access label {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 2.75rem;
	cursor: pointer;
}

.v-kit-access input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: #1c1917;
}

.v-kit-access__note {
	margin: 0.75rem 0 0;
	color: #57534e;
	font-size: 0.875rem;
}

@keyframes v-kit-access-in {
	from {
		opacity: 0;
		transform: translateY(0.5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.v-kit-access__panel:not([hidden]) {
		animation: none;
	}
}

/*
 * What the switches do. The classes sit on <html>. Bigger text is the same as the browser's own
 * zoom, so it also works on sites that set sizes in pixels. The button stays at its own size.
 */
html.v-kit-a11y-text-1 body > :not(.v-kit-access) {
	zoom: 1.25;
}

html.v-kit-a11y-text-2 body > :not(.v-kit-access) {
	zoom: 1.5;
}

/* A browser without zoom still grows text that is sized in rem. */
@supports not (zoom: 1) {
	html.v-kit-a11y-text-1 {
		font-size: 125%;
	}

	html.v-kit-a11y-text-2 {
		font-size: 150%;
	}
}

/* White on black is 21:1 and yellow links on black are 19.6:1. Background pictures go, so text on them stays readable. */
html.v-kit-a11y-contrast,
html.v-kit-a11y-contrast body,
html.v-kit-a11y-contrast body :not(.v-kit-access, .v-kit-access *) {
	border-color: #fff !important;
	background: #000 !important;
	color: #fff !important;
	text-shadow: none !important;
}

html.v-kit-a11y-contrast body :is(a, a *):not(.v-kit-access, .v-kit-access *) {
	color: #ff0 !important;
}

html.v-kit-a11y-links a {
	text-decoration: underline !important;
	text-underline-offset: 0.15em;
}

/* Very short, not none, so an animation still ends in its final state. */
html.v-kit-a11y-motion *,
html.v-kit-a11y-motion *::before,
html.v-kit-a11y-motion *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	scroll-behavior: auto !important;
	transition-duration: 0.01ms !important;
}
