/* ==========================================================================
   Mansfield — accessibility toolbar (inc/a11y.php, assets/js/a11y.js)
   Visitor choices are classes on <html>:
   mf-a11y-text-115 / -130, mf-a11y-contrast, mf-a11y-links, mf-a11y-font, mf-a11y-motion
   ========================================================================== */

/* Widget ------------------------------------------------------------------ */
.mf-a11y {
	position: fixed;
	bottom: 20px;
	z-index: 9990;
	font-family: var(--mf-font-body, system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.4;
	color: var(--mf-text);
}
.mf-a11y--right { right: 20px; }
.mf-a11y--left { left: 20px; }

.mf-a11y__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 10px 12px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--mf-primary);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.mf-a11y__toggle:hover { background: var(--mf-primary-hover, var(--mf-primary)); }
.mf-a11y__toggle:focus-visible,
.mf-a11y button:focus-visible,
.mf-a11y a:focus-visible { outline: 3px solid var(--mf-accent, #d4a63a); outline-offset: 3px; }
.mf-a11y.is-active .mf-a11y__toggle::after {
	content: "";
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--mf-accent, #d4a63a);
	margin-left: 2px;
}

.mf-a11y__panel {
	position: absolute;
	bottom: calc(100% + 12px);
	width: min(320px, calc(100vw - 40px));
	padding: 18px 18px 16px;
	border: 1px solid var(--mf-border);
	border-radius: 12px;
	background: var(--mf-bg, #fff);
	box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.mf-a11y--right .mf-a11y__panel { right: 0; }
.mf-a11y--left .mf-a11y__panel { left: 0; }
.mf-a11y__panel[hidden] { display: none; }

.mf-a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mf-a11y__title { margin: 0; font-family: var(--mf-font-display, inherit); font-size: 19px; line-height: 1.2; }
.mf-a11y__close {
	display: inline-grid; place-items: center;
	width: 34px; height: 34px;
	border: 0; border-radius: 50%;
	background: var(--mf-surface); color: var(--mf-text);
	cursor: pointer;
}
.mf-a11y__close .mf-icon { width: 18px; height: 18px; }

.mf-a11y__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mf-muted); }
.mf-a11y__sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.mf-a11y__size {
	padding: 10px 0;
	border: 2px solid var(--mf-border);
	border-radius: 8px;
	background: var(--mf-bg, #fff);
	color: var(--mf-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.mf-a11y__size:nth-child(2) { font-size: 17px; }
.mf-a11y__size:nth-child(3) { font-size: 20px; }
.mf-a11y__size[aria-pressed="true"] { border-color: var(--mf-primary); background: var(--mf-primary); color: #fff; }

.mf-a11y__switches { display: grid; gap: 6px; margin-bottom: 16px; }
.mf-a11y__switch {
	display: flex; align-items: center; gap: 12px;
	width: 100%;
	padding: 9px 10px;
	border: 0; border-radius: 8px;
	background: transparent; color: var(--mf-text);
	font: inherit; text-align: left;
	cursor: pointer;
}
.mf-a11y__switch:hover { background: var(--mf-surface); }
.mf-a11y__switch-track {
	position: relative; flex: none;
	width: 40px; height: 22px;
	border-radius: 999px;
	background: var(--mf-border);
	transition: background .15s ease;
}
.mf-a11y__switch-dot {
	position: absolute; top: 3px; left: 3px;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .15s ease;
}
.mf-a11y__switch[aria-pressed="true"] .mf-a11y__switch-track { background: var(--mf-primary); }
.mf-a11y__switch[aria-pressed="true"] .mf-a11y__switch-dot { transform: translateX(18px); }

.mf-a11y__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--mf-border); }
.mf-a11y__reset {
	padding: 8px 14px;
	border: 2px solid var(--mf-border); border-radius: 8px;
	background: transparent; color: var(--mf-text);
	font: inherit; font-weight: 600;
	cursor: pointer;
}
.mf-a11y__more { font-size: 14px; font-weight: 600; color: var(--mf-link, var(--mf-primary)); }

@media (max-width: 600px) {
	.mf-a11y { bottom: 14px; }
	.mf-a11y--right { right: 14px; }
	.mf-a11y--left { left: 14px; }
	.mf-a11y__toggle-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.mf-a11y__toggle { padding: 12px; }
}

/* Print: never print the widget. */
@media print { .mf-a11y { display: none !important; } }

/* Visitor choices ---------------------------------------------------------- */

/* Text size: the theme sizes type in px, so scale the page frame (not the widget). */
html.mf-a11y-text-115 .mf-frame { zoom: 1.15; }
html.mf-a11y-text-130 .mf-frame { zoom: 1.3; }
/* zoom scales vw units too: shrink Theme Builder's full-bleed breakouts by the same factor. */
html.mf-a11y-text-115 { --mf-a11y-zoom: 1.15; }
html.mf-a11y-text-130 { --mf-a11y-zoom: 1.3; }
html[class*="mf-a11y-text-1"] .tb-core-page__main .tb-core-page__block--tall-hero,
html[class*="mf-a11y-text-1"] .tb-core-page__main .tb-core-page__block--image-overlay,
html[class*="mf-a11y-text-1"] .tb-core-page__main .tb-core-page__block--text-overlay {
	width: calc(100vw / var(--mf-a11y-zoom));
	max-width: calc(100vw / var(--mf-a11y-zoom));
	margin-left: calc(50% - 50vw / var(--mf-a11y-zoom));
	margin-right: calc(50% - 50vw / var(--mf-a11y-zoom));
}
html[class*="mf-a11y-text-1"] .tb-core-page__block--has-section-width {
	--tb-section-width-resolved: min(var(--tb-section-width), calc(100vw / var(--mf-a11y-zoom) - 2.5rem));
}
html[class*="mf-a11y-text-1"] .tb-core-page__block--has-section-width-full {
	--tb-section-width-resolved: calc(100vw / var(--mf-a11y-zoom));
}

/* High contrast: darker text and borders, stronger brand colours, solid hero scrims. */
html.mf-a11y-contrast {
	--mf-text: #000;
	--mf-muted: #1f1f1f;
	--mf-border: #3d3d3d;
	--mf-surface: #f2f2f2;
	--mf-bg: #fff;
	--mf-primary: #0b3d2e;
	--mf-primary-hover: #000;
	--mf-link: #0b3d2e;
}
html.mf-a11y-contrast body { color: #000; }
html.mf-a11y-contrast .tb-core-page--installed .tb-core-page__block--tall-hero::before,
html.mf-a11y-contrast .tb-core-page--installed .tb-core-page__block--image-overlay::before,
html.mf-a11y-contrast .mf-hero--image::before { background: rgba(0, 0, 0, .74) !important; }
html.mf-a11y-contrast img { filter: contrast(1.05); }
html.mf-a11y-contrast :focus-visible { outline: 3px solid #000 !important; outline-offset: 2px; }

/* Underline every link in content and navigation. */
html.mf-a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* Readable font: plain system sans, more letter and word spacing. */
html.mf-a11y-font {
	--mf-font-display: Verdana, "Segoe UI", system-ui, sans-serif;
	--mf-font-body: Verdana, "Segoe UI", system-ui, sans-serif;
	--mf-font-menu: Verdana, "Segoe UI", system-ui, sans-serif;
}
html.mf-a11y-font .mf-frame,
html.mf-a11y-font .mf-frame h1,
html.mf-a11y-font .mf-frame h2,
html.mf-a11y-font .mf-frame h3,
html.mf-a11y-font .mf-frame h4 {
	font-family: Verdana, "Segoe UI", system-ui, sans-serif !important;
	letter-spacing: .02em;
	word-spacing: .08em;
}
html.mf-a11y-font .mf-frame p,
html.mf-a11y-font .mf-frame li { line-height: 1.75; }

/* Reduce motion. */
html.mf-a11y-motion *,
html.mf-a11y-motion *::before,
html.mf-a11y-motion *::after {
	animation-duration: .01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: .01ms !important;
	scroll-behavior: auto !important;
}

/* Keep the footer's last line clear of the floating button. */
.mf-footer .mf-footer__base { padding-bottom: 64px; }
