/* ===== Toolbar ===== */
.fm-a11y {
	--fm-a11y-brand: #173c82;
	--fm-a11y-active: #173c82;
	--fm-a11y-size: 64px;
	position: fixed;
	top: 150px;
	left: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 15px !important;
	line-height: 1.3 !important;
}
.fm-a11y *,
.fm-a11y *::before,
.fm-a11y *::after { box-sizing: border-box; }

.fm-a11y__widget { position: relative; }
.fm-a11y__widget[hidden] { display: none !important; }

.fm-a11y__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--fm-a11y-size);
	height: var(--fm-a11y-size);
	margin: 0;
	padding: 0;
	border: 3px solid var(--fm-a11y-brand);
	border-left: 0;
	border-radius: 0 10px 10px 0;
	background: #fff !important;
	color: var(--fm-a11y-brand) !important;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .3);
}
.fm-a11y__toggle svg { width: 46px; height: 46px; }
.fm-a11y__toggle:hover,
.fm-a11y__toggle[aria-expanded="true"] {
	background: var(--fm-a11y-brand) !important;
	color: #fff !important;
}

.fm-a11y__panel {
	position: absolute;
	top: 0;
	left: var(--fm-a11y-size);
	width: 250px;
	max-height: calc(100vh - 170px);
	overflow-y: auto;
	padding: 12px 0;
	background: #fff !important;
	color: #262626 !important;
	border: 2px solid var(--fm-a11y-brand);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}
.fm-a11y__panel[hidden] { display: none !important; }

.fm-a11y__title {
	margin: 0 0 8px !important;
	padding: 0 16px;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #262626 !important;
}
.fm-a11y__list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.fm-a11y__list li { margin: 0 !important; padding: 0 !important; list-style: none !important; }

.fm-a11y__btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 9px 16px;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: #262626 !important;
	font: inherit !important;
	text-align: left;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	cursor: pointer;
}
.fm-a11y__btn:hover { background: #eef2f9 !important; }
.fm-a11y__btn[aria-pressed="true"] {
	background: var(--fm-a11y-active) !important;
	color: #fff !important;
}
.fm-a11y__btn[data-action="reset"],
.fm-a11y__btn[data-action="tts-stop"] { border-top: 1px solid #ddd; margin-top: 4px; }
.fm-a11y__btn svg { flex: 0 0 20px; }

.fm-a11y__hint {
	margin: 8px 16px 0 !important;
	font-size: 13px !important;
	color: #555 !important;
}
.fm-a11y__hint[hidden] { display: none !important; }

.fm-a11y button:focus-visible {
	outline: 3px solid #fb6600 !important;
	outline-offset: -3px;
}

.fm-a11y__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 767px) {
	.fm-a11y { top: 76px; --fm-a11y-size: 54px; gap: 8px; } /* below the 64px mobile header */
	.fm-a11y__toggle svg { width: 38px; height: 38px; }
	.fm-a11y__panel { width: min(250px, calc(100vw - 62px)); max-height: calc(100vh - 96px); }
}

@media print { .fm-a11y { display: none !important; } }

/* ===== Modes =====
   Filters go on <html>: on the root element they do not break position:fixed (e.g. sticky header). */

/* Grayscale */
html.fm-a11y-grayscale { filter: grayscale(100%); }

/* Negative (inverted colours); media and the toolbar are inverted back */
html.fm-a11y-contrast-negative { filter: invert(100%) hue-rotate(180deg); background: #fff; }
html.fm-a11y-grayscale.fm-a11y-contrast-negative { filter: grayscale(100%) invert(100%); }
html.fm-a11y-contrast-negative img,
html.fm-a11y-contrast-negative video,
html.fm-a11y-contrast-negative picture,
html.fm-a11y-contrast-negative iframe,
html.fm-a11y-contrast-negative svg image,
html.fm-a11y-contrast-negative [style*="background-image"],
html.fm-a11y-contrast-negative #fm-a11y { filter: invert(100%) hue-rotate(180deg); }

/* High contrast: black background, white text, yellow links */
html.fm-a11y-contrast-high body,
html.fm-a11y-contrast-high body > :not(#fm-a11y),
html.fm-a11y-contrast-high body > :not(#fm-a11y) * {
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border-color: #fff !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.fm-a11y-contrast-high body > :not(#fm-a11y) a,
html.fm-a11y-contrast-high body > :not(#fm-a11y) a * { color: #ff0 !important; }
html.fm-a11y-contrast-high body > :not(#fm-a11y) button,
html.fm-a11y-contrast-high body > :not(#fm-a11y) input,
html.fm-a11y-contrast-high body > :not(#fm-a11y) select,
html.fm-a11y-contrast-high body > :not(#fm-a11y) textarea { border: 1px solid #fff !important; }
html.fm-a11y-contrast-high body > :not(#fm-a11y) svg,
html.fm-a11y-contrast-high body > :not(#fm-a11y) svg * { fill: currentColor !important; }

/* Light background: white background, black text */
html.fm-a11y-contrast-light body,
html.fm-a11y-contrast-light body > :not(#fm-a11y),
html.fm-a11y-contrast-light body > :not(#fm-a11y) * {
	background-color: #fff !important;
	background-image: none !important;
	color: #000 !important;
	text-shadow: none !important;
}
html.fm-a11y-contrast-light body > :not(#fm-a11y) a,
html.fm-a11y-contrast-light body > :not(#fm-a11y) a * { color: #0b3a8c !important; }

/* Underline links */
html.fm-a11y-underline body > :not(#fm-a11y) a { text-decoration: underline !important; text-underline-offset: 2px; }

/* Readable font */
html.fm-a11y-readable body > :not(#fm-a11y),
html.fm-a11y-readable body > :not(#fm-a11y) *:not([class*="icon"]):not(i):not([class*="fa-"]) {
	font-family: Verdana, Arial, Helvetica, sans-serif !important;
	letter-spacing: .02em !important;
}
