/* LTHI Accessibility Enhancements v1.3.0 – Accessibility options panel */

/* ===================== Panel ===================== */
#lthi-ap {
	--ap-ink: #131313;
	--ap-muted: #4A4A4A;
	--ap-line: #767676;
	--ap-accent: #C2410C;      /* white on this = 5.2:1 */
	--ap-accent-dark: #9A3412;
	--ap-soft: #FFF4EC;
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99999;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	color: var(--ap-ink);
}
#lthi-ap *,
#lthi-ap *::before,
#lthi-ap *::after {
	box-sizing: border-box;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
}

/* Toggle button */
#lthi-ap #lthi-ap-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	min-width: 48px;
	margin: 0;
	padding: 10px 16px 10px 12px;
	border: 2px solid #FFFFFF;
	border-radius: 999px;
	background: #1A1A1A;
	color: #FFFFFF;
	font: 600 16px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	cursor: pointer;
}
#lthi-ap #lthi-ap-toggle:hover { background: #000000; }
#lthi-ap #lthi-ap-toggle svg { width: 26px; height: 26px; flex: none; }
#lthi-ap #lthi-ap-toggle[aria-expanded="true"] { background: var(--ap-accent); }

/* Panel box */
#lthi-ap #lthi-ap-panel {
	position: absolute;
	left: 0;
	bottom: 60px;
	width: 340px;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
	padding: 18px 18px 16px;
	background: #FFFFFF;
	color: var(--ap-ink);
	border: 2px solid var(--ap-ink);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
	text-align: left;
}
#lthi-ap #lthi-ap-panel[hidden] { display: none !important; }

#lthi-ap .lthi-ap-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}
#lthi-ap #lthi-ap-title {
	margin: 0;
	padding: 0;
	color: var(--ap-ink);
	font: 700 19px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
#lthi-ap #lthi-ap-title:focus { outline: none; }
#lthi-ap #lthi-ap-title:focus-visible { outline: 3px solid var(--ap-ink); outline-offset: 3px; }

#lthi-ap .lthi-ap-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 2px solid var(--ap-line);
	border-radius: 50%;
	background: #FFFFFF;
	color: var(--ap-ink);
	cursor: pointer;
}
#lthi-ap .lthi-ap-close:hover { border-color: var(--ap-ink); background: #F2F2F2; }
#lthi-ap .lthi-ap-close svg { width: 14px; height: 14px; }

/* Groups */
#lthi-ap .lthi-ap-group {
	margin: 0 0 14px;
	padding: 12px 0 0;
	border: 0;
	border-top: 1px solid #D4D4D4;
	min-width: 0;
}
#lthi-ap .lthi-ap-group legend {
	float: left;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	color: var(--ap-ink);
	font-size: 15px;
	font-weight: 700;
}
#lthi-ap .lthi-ap-group legend + * { clear: both; }

/* Text size: segmented radio buttons */
#lthi-ap .lthi-ap-seg {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}
#lthi-ap .lthi-ap-seg input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
#lthi-ap .lthi-ap-seg label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
	min-height: 60px;
	margin: 0;
	padding: 6px 2px;
	border: 2px solid var(--ap-line);
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--ap-ink);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
#lthi-ap .lthi-ap-seg label:hover { border-color: var(--ap-ink); }
#lthi-ap .lthi-ap-a { font-weight: 700; line-height: 1; }
#lthi-ap .lthi-ap-a0 { font-size: 16px; }
#lthi-ap .lthi-ap-a1 { font-size: 20px; }
#lthi-ap .lthi-ap-a2 { font-size: 24px; }
#lthi-ap .lthi-ap-a3 { font-size: 28px; }
#lthi-ap .lthi-ap-seg input:checked + label {
	border-color: var(--ap-accent);
	background: var(--ap-accent);
	color: #FFFFFF;
}
#lthi-ap .lthi-ap-seg input:focus-visible + label {
	outline: 3px solid var(--ap-ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #FFFFFF;
}

/* Switches */
#lthi-ap .lthi-ap-switch { position: relative; margin: 0 0 10px; }
#lthi-ap .lthi-ap-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
#lthi-ap .lthi-ap-switch label {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	margin: 0;
	padding: 4px 0;
	color: var(--ap-ink);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
#lthi-ap .lthi-ap-track {
	position: relative;
	flex: none;
	width: 46px;
	height: 26px;
	border: 2px solid var(--ap-line);
	border-radius: 999px;
	background: #FFFFFF;
	transition: background-color .15s ease, border-color .15s ease;
}
#lthi-ap .lthi-ap-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ap-muted);
	transition: transform .15s ease;
}
#lthi-ap .lthi-ap-switch input:checked + label .lthi-ap-track {
	border-color: var(--ap-accent);
	background: var(--ap-accent);
}
#lthi-ap .lthi-ap-switch input:checked + label .lthi-ap-track::after {
	background: #FFFFFF;
	transform: translateX(20px);
}
#lthi-ap .lthi-ap-switch input:focus-visible + label .lthi-ap-track {
	outline: 3px solid var(--ap-ink);
	outline-offset: 3px;
}
#lthi-ap p { line-height: 1.4 !important; }
#lthi-ap .lthi-ap-hint {
	margin: -6px 0 0 58px;
	padding: 0;
	color: var(--ap-muted);
	font-size: 14px;
}
#lthi-ap .lthi-ap-group > .lthi-ap-hint { margin: 8px 0 0; }

/* Buttons */
#lthi-ap .lthi-ap-row { display: flex; gap: 8px; }
#lthi-ap .lthi-ap-btn {
	flex: 1;
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	border: 2px solid var(--ap-ink);
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--ap-ink);
	font: 600 16px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	cursor: pointer;
}
#lthi-ap .lthi-ap-btn:hover { background: #F2F2F2; }
#lthi-ap .lthi-ap-play {
	border-color: var(--ap-accent);
	background: var(--ap-accent);
	color: #FFFFFF;
}
#lthi-ap .lthi-ap-play:hover { border-color: var(--ap-accent-dark); background: var(--ap-accent-dark); }
#lthi-ap .lthi-ap-btn:disabled {
	border-color: #A3A3A3;
	background: #FFFFFF;
	color: #6B6B6B;
	cursor: not-allowed;
}
#lthi-ap .lthi-ap-status {
	min-height: 1.4em;
	margin: 6px 0 0;
	color: var(--ap-ink);
	font-size: 14px;
	font-weight: 600;
}
#lthi-ap .lthi-ap-foot {
	padding-top: 12px;
	border-top: 1px solid #D4D4D4;
}
#lthi-ap .lthi-ap-reset { width: 100%; }
#lthi-ap .lthi-ap-note { margin: 8px 0 0; color: var(--ap-muted); font-size: 13px; }

#lthi-ap button:focus-visible {
	outline: 3px solid var(--ap-ink) !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px #FFFFFF !important;
}
#lthi-ap #lthi-ap-toggle:focus-visible {
	outline-color: #FFFFFF !important;
	box-shadow: 0 0 0 6px #111111 !important;
}

/* Admin bar on phones sits at the top; nothing to move. Small screens: full-width panel, icon-only toggle. */
@media (max-width: 600px) {
	#lthi-ap #lthi-ap-panel {
		position: fixed;
		left: 16px;
		right: 16px;
		bottom: 76px;
		width: auto;
		max-height: calc(100vh - 96px);
	}
	#lthi-ap #lthi-ap-toggle { padding: 10px; }
	#lthi-ap .lthi-ap-toggle-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

@media print { #lthi-ap { display: none !important; } }

/* ===================== Text size ===================== */
html.lthi-scaled body { overflow-wrap: break-word; }
html.lthi-measuring *,
html.lthi-measuring *::before,
html.lthi-measuring *::after { transition: none !important; }

/* ===================== High contrast ===================== */
html.lthi-hc.lthi-hc.lthi-hc :where(body, body *:not(img, video, iframe, picture, svg, svg *, #lthi-ap, #lthi-ap *)) {
	background-color: #000000 !important;
	background-image: none !important;
	color: #FFFFFF !important;
	border-color: #FFFFFF !important;
	text-shadow: none !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(body *:not(#lthi-ap, #lthi-ap *))::before,
html.lthi-hc.lthi-hc.lthi-hc :where(body *:not(#lthi-ap, #lthi-ap *))::after {
	background-color: transparent !important;
	background-image: none !important;
	color: inherit !important;
	border-color: #FFFFFF !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(a[href]:not(#lthi-ap *)),
html.lthi-hc.lthi-hc.lthi-hc :where(a[href]:not(#lthi-ap *) *) {
	color: #FFE600 !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(a[href]:not(#lthi-ap *)) { text-decoration: underline !important; }
html.lthi-hc.lthi-hc.lthi-hc :where(a[href]:not(#lthi-ap *)):hover,
html.lthi-hc.lthi-hc.lthi-hc :where(a[href]:not(#lthi-ap *)):hover * {
	background-color: #FFE600 !important;
	color: #000000 !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(button, input[type="submit"], input[type="button"], .elementor-button, .wpcf7-submit, .lthi-carousel-toggle):not(#lthi-ap *) {
	border: 2px solid #FFFFFF !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(input, select, textarea):not(#lthi-ap *) {
	border: 2px solid #FFFFFF !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(.lthi-form select) {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23FFFFFF' stroke-width='2' fill='none'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 16px center !important;
}
html.lthi-hc.lthi-hc.lthi-hc ::placeholder { color: #D4D4D4 !important; opacity: 1; }
html.lthi-hc.lthi-hc.lthi-hc :where(body *:not(#lthi-ap *)):focus-visible {
	outline: 3px solid #FFE600 !important;
	outline-offset: 3px !important;
	box-shadow: none !important;
}
html.lthi-hc.lthi-hc.lthi-hc :where(img) { background-color: transparent !important; }

/* ===================== Readable font ===================== */
html.lthi-font.lthi-font :where(body, body *:not(i, [class*="icon"], [class*="risehand-"], [class^="fa-"], [class*=" fa-"], .fa, .fas, .far, .fab, .fal, .dashicons, svg, svg *, code, pre)) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
	letter-spacing: .02em !important;
	word-spacing: .06em !important;
}
html.lthi-font.lthi-font :where(p, li, dd, blockquote, .elementor-text-editor, .elementor-widget-text-editor) {
	line-height: 1.7 !important;
}

/* ===================== Underline links ===================== */
html.lthi-ul.lthi-ul :where(a[href]:not(#lthi-ap *)) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: .2em !important;
}

/* ===================== Stop animations ===================== */
html.lthi-still *,
html.lthi-still *::before,
html.lthi-still *::after {
	animation-duration: .01ms !important;
	animation-iteration-count: 1 !important;
	animation-delay: 0s !important;
	transition-duration: .01ms !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}
html.lthi-still .elementor-invisible { visibility: visible !important; }

/* ===================== Read aloud: current passage ===================== */
.lthi-reading {
	outline: 3px dashed #C2410C !important;
	outline-offset: 4px !important;
}
html.lthi-hc .lthi-reading { outline-color: #FFE600 !important; }
