/* Root marker class when toolkit is active */
html.amt-enabled {
	scroll-behavior: smooth;
}

/* Ensure [hidden] elements are actually hidden */
[hidden] {
	display: none !important;
}

/* Skip link */
.amt-skip-link {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: #000;
	color: #fff;
	z-index: 99999;
	transform: translateY(-200%);
	transition: transform 0.2s ease-out;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.95rem;
}
.amt-skip-link:focus {
	transform: translateY(0);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Launcher wrapper (fixed in viewport) */
.amt-launcher-wrapper {
	position: fixed;
	z-index: 99998;
	--amt-launcher-offset: 2rem;
}

/* Launcher positions (corners) */
.amt-position-top-left {
	top: var(--amt-launcher-offset);
	left: var(--amt-launcher-offset);
}
.amt-position-top-right {
	top: var(--amt-launcher-offset);
	right: var(--amt-launcher-offset);
}
.amt-position-bottom-left {
	bottom: var(--amt-launcher-offset);
	left: var(--amt-launcher-offset);
}
.amt-position-bottom-right {
	bottom: var(--amt-launcher-offset);
	right: var(--amt-launcher-offset);
}

/* Accessibility launcher button */
.amt-launcher {
	border: none;
	border-radius: 999px;
	width: 3rem;
	height: 3rem;
	padding: 0;
	background: #005ea5;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	transform-origin: center center;
	transition:
		transform 0.15s ease-out,
		box-shadow 0.15s ease-out,
		background-color 0.15s ease-out;
}

/* SVG or image icon container */
.amt-launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
}

/* Custom image icon */
.amt-launcher-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Built-in SVG-based universal access icon */
.amt-launcher-svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Outer ring */
.amt-launcher-ring {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}

/* Head + body solid so they don't disappear */
.amt-launcher-head,
.amt-launcher-body {
	fill: currentColor;
	stroke: none;
}

/* Launcher hover/focus states */
/* Mouse hover: slightly larger + darker */
.amt-launcher:hover {
	background: #003f6f;
	transform: scale(1.08);
	outline: none;
}

/* Remove default outline on focus */
.amt-launcher:focus {
	outline: none;
}

/* Keyboard focus: keep base colour, but grow and add strong focus ring */
.amt-launcher:focus-visible {
	background: #005ea5; /* base colour so the ring is clear */
	transform: scale(1.08);
	outline: 3px solid #ffffff;
	outline-offset: 3px;
	box-shadow:
		0 0 0 3px rgba(0, 0, 0, 0.75),
		0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Toolbar panel (popover menu) – base size */
.amt-toolbar {
	position: absolute;
	display: flex;
	gap: 0.25rem;
	padding: 0.3rem;
	background: rgba(0, 0, 0, 0.85);
	border-radius: 6px;
	backdrop-filter: blur(4px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
	font-size: 0.9rem;
}

/* Position the panel according to launcher placement */

/* TOP-LEFT: panel below launcher, left-aligned */
.amt-position-top-left .amt-toolbar {
	top: 100%;
	left: 0;
	right: auto;
	margin-top: 0.4rem;
}

/* TOP-RIGHT: panel below launcher, right-aligned */
.amt-position-top-right .amt-toolbar {
	top: 100%;
	right: 0;
	left: auto;
	margin-top: 0.4rem;
}

/* BOTTOM-LEFT: panel above launcher, left-aligned */
.amt-position-bottom-left .amt-toolbar {
	bottom: 100%;
	left: 0;
	right: auto;
	margin-bottom: 0.4rem;
}

/* BOTTOM-RIGHT: panel above launcher, right-aligned */
.amt-position-bottom-right .amt-toolbar {
	bottom: 100%;
	right: 0;
	left: auto;
	margin-bottom: 0.4rem;
}

/* Toolbar buttons – base size */
.amt-btn {
	border: none;
	padding: 0.35rem 0.45rem;
	background: transparent;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	border-radius: 4px;
	font-size: 1em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.amt-btn:hover,
.amt-btn:focus {
	background: rgba(255, 255, 255, 0.16);
	outline: none;
}
.amt-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.amt-btn[aria-pressed="true"] {
	background: rgba(255, 255, 255, 0.3);
}
.amt-btn-reset {
	font-size: 0.9em;
}

/* Dark mode button icon tweak (optional) */
.amt-btn-dark span[aria-hidden="true"] {
	font-size: 1.1em;
}

/* Larger toolbar size (about 50% bigger) */
html.amt-toolbar-size-large .amt-toolbar {
	font-size: 1.35rem; /* 0.9 × 1.5 */
	padding: 0.45rem;
	gap: 0.35rem;
}
html.amt-toolbar-size-large .amt-btn {
	padding: 0.5rem 0.6rem;
}

/* Plus sign in the "A+" icon */
.amt-plus {
	font-size: 0.7em;
	vertical-align: super;
}

/* Ensure screen reader text is visually hidden but accessible */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Large text mode */
html.amt-large-text,
html.amt-large-text body {
	font-size: 115%;
}

html.amt-large-text h1 {
	font-size: 2.2em;
}
html.amt-large-text h2 {
	font-size: 1.9em;
}
html.amt-large-text h3 {
	font-size: 1.6em;
}
html.amt-large-text h4 {
	font-size: 1.3em;
}

/* Underline links mode */
html.amt-underline-links a {
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.18em;
}

/* Dyslexia-friendly font mode */
html.amt-dyslexia-font,
html.amt-dyslexia-font body {
	font-family: "OpenDyslexic", "Comic Sans MS",
		-apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, sans-serif !important;
}

/* DARK MODE (gentle, separate from high contrast) */
html.amt-dark-mode,
html.amt-dark-mode body {
	background-color: #121212 !important;
	color: #f5f5f5 !important;
}

/* Links in dark mode */
html.amt-dark-mode a {
	color: #80cbc4 !important; /* soft teal */
	text-decoration-thickness: 0.1em;
}
html.amt-dark-mode a:hover,
html.amt-dark-mode a:focus {
	color: #b2dfdb !important;
}

/* Form elements in dark mode */
html.amt-dark-mode input,
html.amt-dark-mode select,
html.amt-dark-mode textarea,
html.amt-dark-mode button {
	background-color: #1e1e1e !important;
	color: #f5f5f5 !important;
	border-color: #555555 !important;
}

/* HIGH CONTRAST mode (stronger) */
html.amt-high-contrast,
html.amt-high-contrast body {
	background-color: #000 !important;
	color: #fff !important;
}

/* Classic theme: white on black */
html.amt-high-contrast.amt-contrast-theme-classic,
html.amt-high-contrast.amt-contrast-theme-classic body {
	background-color: #000 !important;
	color: #ffffff !important;
}

/* Yellow on black theme */
html.amt-high-contrast.amt-contrast-theme-yellow-black,
html.amt-high-contrast.amt-contrast-theme-yellow-black body {
	background-color: #000000 !important;
	color: #ffeb3b !important;
}

/* Dark blue on off-white theme */
html.amt-high-contrast.amt-contrast-theme-dark-blue,
html.amt-high-contrast.amt-contrast-theme-dark-blue body {
	background-color: #002b36 !important; /* dark blue/teal */
	color: #fdf6e3 !important;          /* off-white / solarized light */
}

/* Links in high contrast modes */
html.amt-high-contrast.amt-contrast-theme-classic a {
	color: #ffea00 !important;
	text-decoration: underline;
}
html.amt-high-contrast.amt-contrast-theme-classic a:focus,
html.amt-high-contrast.amt-contrast-theme-classic a:hover {
	color: #ffffff !important;
	background: #444444 !important;
}

html.amt-high-contrast.amt-contrast-theme-yellow-black a {
	color: #ffeb3b !important;
	text-decoration: underline;
}
html.amt-high-contrast.amt-contrast-theme-yellow-black a:focus,
html.amt-high-contrast.amt-contrast-theme-yellow-black a:hover {
	color: #000000 !important;
	background: #ffeb3b !important;
}

html.amt-high-contrast.amt-contrast-theme-dark-blue a {
	color: #b3e5fc !important; /* light blue */
	text-decoration: underline;
}
html.amt-high-contrast.amt-contrast-theme-dark-blue a:focus,
html.amt-high-contrast.amt-contrast-theme-dark-blue a:hover {
	color: #002b36 !important;
	background: #b3e5fc !important;
}

/* High contrast for form elements */
html.amt-high-contrast input,
html.amt-high-contrast select,
html.amt-high-contrast textarea,
html.amt-high-contrast button {
	background: #111111 !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
}

/* Stack toolbar buttons on narrow screens */
@media (max-width: 480px) {
	.amt-toolbar {
		flex-direction: column;
		align-items: stretch;
		min-width: 11rem;
	}

	.amt-btn {
		justify-content: flex-start;
		text-align: left;
	}
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001s !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001s !important;
		scroll-behavior: auto !important;
	}

	.amt-launcher {
		transform: none !important;
	}
}