/* =========================================================
   CTUIL Accessibility Controls
   Markup: plugins/Default/templates/element/accessibility.php
   Uses px (not rem) so the panel stays stable while the
   "Text Size" setting rescales the page.
   ========================================================= */

/* ---------- Floating trigger ---------- */
.a11yFab {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 100150;
	width: 48px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 10px 0 0 10px;
	color: #fff;
	background: linear-gradient(90deg, #e84c3d 0, #e67f22 100%);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: width .2s ease;
}
.a11yFab:hover { width: 54px; }
.a11yFab svg { width: 28px; height: 28px; }
.a11yFab:focus-visible { outline: 3px solid #243885; outline-offset: 2px; }

/* Header toolbar icon (pre-header top links) */
.topLinks > li.a11yToggleItem { display: flex; align-items: center; }
.a11yHeaderBtn {
	background: none;
	border: 1px solid rgba(255, 255, 255, .8);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	padding: 0;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.a11yHeaderBtn svg { width: 16px; height: 16px; }
.a11yHeaderBtn:hover, .a11yHeaderBtn:focus-visible { background: rgba(255, 255, 255, .2); }

/* ---------- Overlay ---------- */
.a11yOverlay {
	position: fixed;
	inset: 0;
	z-index: 100190;
	background: rgba(0, 0, 0, .35);
	opacity: 0;
	transition: opacity .25s ease;
}
.a11yOverlay.is-open { opacity: 1; }

/* ---------- Panel ---------- */
.a11yPanel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 100200;
	width: 400px;
	max-width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #323232;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: -8px 0 30px rgba(0, 0, 0, .2);
	transform: translateX(100%);
	transition: transform .25s ease;
}
.a11yPanel.is-open { transform: translateX(0); }
.a11yPanel[hidden], .a11yOverlay[hidden] { display: none; }

.a11yPanelHead {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	color: #fff;
	background: linear-gradient(90deg, #e84c3d 0, #e67f22 100%);
}
.a11yPanelIcon svg { width: 26px; height: 26px; display: block; }
.a11yPanelTitle {
	flex: 1;
	margin: 0;
	font-family: Montserrat, sans-serif;
	font-size: 19px;
	font-weight: 600;
	color: #fff;
	line-height: 1.2;
}
.a11yClose {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .2s ease;
}
.a11yClose svg { width: 18px; height: 18px; }
.a11yClose:hover { background: rgba(255, 255, 255, .32); }
.a11yClose:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.a11yPanelBody {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.a11yToolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}
.a11yReset {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border: 1px solid #e84c3d;
	border-radius: 4px;
	background: #fff;
	color: #e84c3d;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
}
.a11yReset svg { width: 15px; height: 15px; }
.a11yReset:hover { background: #e84c3d; color: #fff; }
.a11yReset:focus-visible { outline: 3px solid #243885; outline-offset: 2px; }
.a11yTextLevel { font-size: 13px; color: #464646; }
.a11yTextLevel strong { color: #243885; }

/* ---------- Tiles ---------- */
.a11yGrid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.a11yTile {
	position: relative;
	min-height: 100px;
	padding: 16px 8px 14px;
	border: 1px solid #d2d2d2;
	border-radius: 10px;
	background: #fff;
	color: #243885;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: Montserrat, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.a11yTile svg { width: 30px; height: 30px; }
.a11yGlyph { font-size: 26px; line-height: 30px; font-weight: 600; text-transform: none; }
.a11yGlyph sup { font-size: 16px; top: -.6em; }
.a11yTile:hover {
	border-color: #e67f22;
	box-shadow: 0 4px 14px rgba(230, 127, 34, .18);
}
.a11yTile:focus-visible { outline: 3px solid #243885; outline-offset: 2px; }
.a11yTile.is-active {
	border-color: #e84c3d;
	background: #fff3ec;
	color: #c0392b;
	box-shadow: inset 0 0 0 1px #e84c3d;
}
.a11yTile:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.a11yTile:disabled:hover { border-color: #d2d2d2; }

.a11ySteps { display: flex; gap: 4px; position: absolute; bottom: 7px; }
.a11ySteps i { width: 14px; height: 3px; border-radius: 2px; background: #d2d2d2; }
.a11ySteps i.on { background: #e84c3d; }

@media (max-width: 480px) {
	.a11yPanel { width: 100%; }
	.a11yFab { width: 42px; height: 46px; }
	.a11yFab svg { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.a11yPanel, .a11yOverlay, .a11yFab { transition: none; }
}

/* =========================================================
   Feature styles (classes are set on <html> by accessibility.js)
   ========================================================= */

/* Invert: the filter itself is applied inline on <html>; un-invert media
   and the controls so photos and the panel stay readable. */
html.a11y-invert img,
html.a11y-invert video,
html.a11y-invert picture,
html.a11y-invert iframe,
html.a11y-invert .a11yPanel,
html.a11y-invert .a11yFab {
	filter: invert(1) hue-rotate(180deg);
}
html.a11y-invert picture img { filter: none; }

/* Highlight links */
html.a11y-links a[href] {
	background-color: #ff0 !important;
	color: #000 !important;
	text-decoration: underline !important;
	outline: 2px solid #000 !important;
	outline-offset: 1px;
}
html.a11y-links a[href] * { color: #000 !important; }

/* Hide images (keeps layout space so the page does not jump) */
html.a11y-hide-images img,
html.a11y-hide-images picture,
html.a11y-hide-images video,
html.a11y-hide-images canvas {
	visibility: hidden !important;
}
/* Only inline (CMS-set) background photos; theme gradients are backgrounds too
   and removing them would leave white text on white buttons. */
html.a11y-hide-images [style*="background-image"],
html.a11y-hide-images [style*="url("] {
	background-image: none !important;
}
html.a11y-hide-images .preLoader { display: none !important; }

/* Big cursor */
html.a11y-big-cursor,
html.a11y-big-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11.2-6.6.9 3.9 7.7-2.9 1.4-3.8-7.8L4 20z' fill='%23000' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important;
}
html.a11y-big-cursor a,
html.a11y-big-cursor a *,
html.a11y-big-cursor button,
html.a11y-big-cursor button *,
html.a11y-big-cursor [role="button"],
html.a11y-big-cursor select,
html.a11y-big-cursor label,
html.a11y-big-cursor input[type="submit"],
html.a11y-big-cursor input[type="button"] {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11.2-6.6.9 3.9 7.7-2.9 1.4-3.8-7.8L4 20z' fill='%23e84c3d' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, pointer !important;
}

/* ---------- Panel in Dark Contrast mode (site uses .highContrastBlack) ---------- */
html.highContrastBlack .a11yPanel { background: #000; color: #fff; border-left: 2px solid #ff0; }
html.highContrastBlack .a11yPanelHead,
html.highContrastBlack .a11yFab { background: #000; color: #ff0; border: 1px solid #ff0; }
html.highContrastBlack .a11yPanelTitle { color: #ff0; }
html.highContrastBlack .a11yClose { background: #222; color: #ff0; }
html.highContrastBlack .a11yTile { background: #111; border-color: #fff; color: #ff0; }
html.highContrastBlack .a11yTile.is-active { background: #ff0; border-color: #ff0; color: #000; box-shadow: none; }
html.highContrastBlack .a11yTile:hover { border-color: #80ff00; }
html.highContrastBlack .a11yReset { background: #000; border-color: #ff0; color: #ff0; }
html.highContrastBlack .a11yReset:hover { background: #ff0; color: #000; }
html.highContrastBlack .a11yTextLevel,
html.highContrastBlack .a11yTextLevel strong { color: #fff; }
html.highContrastBlack .a11ySteps i { background: #555; }
html.highContrastBlack .a11ySteps i.on { background: #ff0; }
