/* Accessibility options (inc/access.php, assets/access.js). */

/* ---------- The options themselves, set on <html> ---------- */
html.si-size-1 { font-size: 115%; }
html.si-size-2 { font-size: 130%; }
html.si-size-3 { font-size: 150%; }

html.si-font body,
html.si-font body *:not(svg):not(svg *):not(.si-access__open) {
	font-family: "Atkinson Hyperlegible", Verdana, Arial, sans-serif !important;
}

/* WCAG 1.4.12 text spacing. */
html.si-spacing body *:not(svg):not(svg *) {
	line-height: 1.6 !important;
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
}
html.si-spacing body p { margin-bottom: 2em !important; }
html.si-spacing .si-access *:not(svg):not(svg *) { letter-spacing: 0.04em !important; }

html.si-links body a:not(.et_pb_button):not([class*="button"]):not(.si-access *):not(.si-logo):not(:has(img, svg)),
html.si-contrast body a:not(.et_pb_button):not([class*="button"]):not(.si-access *):not(.si-logo):not(:has(img, svg)) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 3px !important;
}

html.si-contrast body :focus-visible { outline: 3px solid #FFD400 !important; outline-offset: 2px !important; box-shadow: 0 0 0 5px #000 !important; }
html.si-contrast body input,
html.si-contrast body select,
html.si-contrast body textarea { border: 2px solid #000 !important; color: #000 !important; background: #FFF !important; }

/* Black and white. On <html> itself, which (unlike any other element) doesn't stop fixed parts being fixed. */
html.si-grey { filter: grayscale(100%); }

html.si-still *, html.si-still *::before, html.si-still *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}
html.si-still { scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
	html, html * { scroll-behavior: auto !important; }
}

/* ---------- The button and panel (kept the same whatever is chosen) ---------- */
.si-access {
	--sa-navy: #0F1B2C;
	--sa-brass: #C18E58;
	--sa-cream: #F7F1E6;
	--sa-ink: #1C2633;
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: "Jost", Verdana, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}
html.si-font .si-access, html.si-font .si-access * { font-family: "Atkinson Hyperlegible", Verdana, Arial, sans-serif !important; }

.si-access__open {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 2px solid var(--sa-brass);
	border-radius: 50%;
	background: var(--sa-navy);
	color: #F3E9D9;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(15, 27, 44, 0.35);
}
.si-access__open:hover { background: #1D2D45; }
.si-access__open:focus-visible,
.si-access button:focus-visible { outline: 3px solid #FFD400 !important; outline-offset: 2px; }

.si-access__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.si-access__panel {
	position: absolute;
	left: 0;
	bottom: 64px;
	width: 330px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 110px);
	overflow-y: auto;
	background: #FFFFFF;
	color: var(--sa-ink);
	border: 1px solid #D9CFBE;
	border-top: 4px solid var(--sa-brass);
	border-radius: 12px;
	box-shadow: 0 10px 34px rgba(15, 27, 44, 0.3);
	padding: 16px 18px 14px;
	text-align: left;
}
.si-access__panel[hidden] { display: none; }

.si-access__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.si-access .si-access__title {
	margin: 0;
	padding: 0;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--sa-navy);
}
.si-access__close {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sa-navy);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.si-access__close:hover { background: var(--sa-cream); }

.si-access__size {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	margin-bottom: 8px;
	background: var(--sa-cream);
	border-radius: 10px;
}
.si-access__label { flex: 1; font-weight: 600; color: var(--sa-navy); }
.si-access__step {
	min-width: 44px;
	height: 44px;
	border: 1px solid #C9B89C;
	border-radius: 8px;
	background: #FFFFFF;
	color: var(--sa-navy);
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
}
.si-access__step:hover:not(:disabled) { border-color: var(--sa-navy); }
.si-access__step:disabled { opacity: 0.4; cursor: default; }
.si-access__value { min-width: 48px; text-align: center; font-weight: 600; color: var(--sa-navy); }

.si-access__list { list-style: none; margin: 0; padding: 0; }
.si-access__list li { margin: 0; padding: 0; list-style: none; }
.si-access__list li::before, .si-access__list li::marker { content: none; }
.si-access__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	padding: 8px 6px;
	border: 0;
	border-bottom: 1px solid #EEE6D8;
	background: transparent;
	color: var(--sa-ink);
	text-align: left;
	cursor: pointer;
}
.si-access__toggle:hover { background: #FBF8F3; }
.si-access__text { display: flex; flex-direction: column; }
.si-access__text strong { font-weight: 600; color: var(--sa-navy); }
.si-access__text span { font-size: 14px; color: #5A5245; }
.si-access__switch {
	position: relative;
	flex: none;
	width: 40px;
	height: 24px;
	border-radius: 12px;
	background: #C9C2B5;
	transition: background 0.15s;
}
.si-access__switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #FFFFFF;
	transition: transform 0.15s;
}
.si-access__toggle[aria-pressed="true"] .si-access__switch { background: var(--sa-navy); }
.si-access__toggle[aria-pressed="true"] .si-access__switch::after { transform: translateX(16px); background: #F3E9D9; }

.si-access__foot { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.si-access__reset {
	flex: none;
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid var(--sa-navy);
	border-radius: 8px;
	background: #FFFFFF;
	color: var(--sa-navy);
	font-weight: 600;
	cursor: pointer;
}
.si-access__reset:hover { background: var(--sa-cream); }
.si-access__foot p { margin: 0; padding: 0; font-size: 13px; line-height: 1.4; color: #5A5245; }

/* The panel keeps its own sizes whatever text size is chosen for the page. */
html[class*="si-size-"] .si-access { font-size: 16px; }

@media (max-width: 600px) {
	.si-access { left: 12px; bottom: 12px; }
	.si-access__open { width: 48px; height: 48px; }
	.si-access__panel { bottom: 58px; width: calc(100vw - 24px); max-width: none; }
}

@media print {
	.si-access { display: none !important; }
}
