/*
 * BWM Accessibility — the visitor menu and the modes it switches on.
 *
 * Modes are classes on <html> ("bwm-a11y-<flag>"), set before first paint by
 * the inline script in <head>. The menu itself is excluded from the modes
 * that would distort it (spacing, font, link highlighting, text size).
 */

.bwm-a11y-sr {
	position: absolute !important; width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important; overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.bwm-a11y-skip {
	position: fixed; left: 12px; top: -80px; z-index: 99999;
	padding: 12px 18px; border-radius: 8px; background: #10131a; color: #fff !important;
	font: 700 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-decoration: none;
}
.bwm-a11y-skip:focus { top: 12px; }

/* ---- Modes ---------------------------------------------------------- */

/* High contrast: darkens text and dark colors while white and light greys stay as they are (brightness first, so the stretch does not wash light surfaces out to white). A filter on the root element does not change how fixed elements position. */
html.bwm-a11y-contrast { filter: brightness(0.85) contrast(1.5); }

/* Text spacing: the WCAG 1.4.12 values. */
html.bwm-a11y-spacing body *:not(#bwm-a11y, #bwm-a11y *, svg *) {
	line-height: 1.5 !important; letter-spacing: 0.12em !important; word-spacing: 0.16em !important;
}
html.bwm-a11y-spacing body p:not(#bwm-a11y *) { margin-bottom: 2em !important; }

/* Readable font: a wide, open screen face every system has. Icon fonts are left alone. */
html.bwm-a11y-font body *:not(#bwm-a11y, #bwm-a11y *, svg *, i, [class*="icon"], [class*="fa-"], .dashicons, .material-icons) {
	font-family: Verdana, "Segoe UI", Tahoma, system-ui, sans-serif !important;
}

/* Highlight links: underlined, with a dark ring and a yellow halo that shows on any background. */
html.bwm-a11y-links a:not(#bwm-a11y *, .bwm-a11y-skip) {
	text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important;
	outline: 2px solid #10131a !important; outline-offset: 1px !important; box-shadow: 0 0 0 5px #ffd400 !important;
}

/* Highlight focus. */
html.bwm-a11y-focus :focus-visible {
	outline: 3px solid #10131a !important; outline-offset: 2px !important; box-shadow: 0 0 0 7px #ffd400 !important;
}

/* Stop animations (toolbar.js also stops script-driven animations and videos). */
html.bwm-a11y-still *, html.bwm-a11y-still *::before, html.bwm-a11y-still *::after {
	animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

/* Large cursor: black arrow, yellow over anything clickable. */
html.bwm-a11y-cursor, html.bwm-a11y-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 2.5 20 10.2l-6.8 2.1L10.3 19z' fill='%23000' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 5, auto !important;
}
html.bwm-a11y-cursor :is(a, button, summary, label, select, [role="button"], [role="tab"], input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="range"]),
html.bwm-a11y-cursor :is(a, button, summary, label, [role="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 2.5 20 10.2l-6.8 2.1L10.3 19z' fill='%23ffd400' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 8 5, pointer !important;
}
html.bwm-a11y-cursor :is(input:not([type]), input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="number"], textarea) { cursor: text !important; }

/* Reading guide: two dimmed bands leave a clear strip at the pointer. */
.bwm-a11y-mask { position: fixed; left: 0; right: 0; z-index: 99980; background: rgba(8, 10, 18, 0.55); pointer-events: none; }
.bwm-a11y-mask--top { top: 0; }
.bwm-a11y-mask--bottom { bottom: 0; }

/* ---- The menu -------------------------------------------------------- */

#bwm-a11y {
	position: fixed; z-index: 99990; bottom: var(--bwm-a11y-y); left: var(--bwm-a11y-x);
	font: 600 15px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #10131a; text-align: left; letter-spacing: normal; word-spacing: normal;
}
#bwm-a11y[hidden], #bwm-a11y [hidden] { display: none !important; }
#bwm-a11y.bwm-a11y--right { left: auto; right: var(--bwm-a11y-x); }
#bwm-a11y *, #bwm-a11y *::before, #bwm-a11y *::after { box-sizing: border-box; }
#bwm-a11y svg { display: block; flex: none; }
#bwm-a11y button {
	all: unset; box-sizing: border-box; cursor: pointer; font: inherit; color: inherit;
	-webkit-tap-highlight-color: transparent;
}
#bwm-a11y button:focus-visible, #bwm-a11y a:focus-visible { outline: 3px solid var(--bwm-a11y-color); outline-offset: 2px; }

#bwm-a11y .bwm-a11y__btn {
	width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--bwm-a11y-color); color: #fff;
	box-shadow: 0 0 0 3px #fff, 0 12px 30px -8px rgba(0, 0, 0, 0.5); transition: transform 0.2s;
}
#bwm-a11y .bwm-a11y__btn svg { width: 32px; height: 32px; stroke-width: 2.1; }
#bwm-a11y .bwm-a11y__btn:hover { transform: scale(1.06); }
#bwm-a11y .bwm-a11y__btn:focus-visible { outline-offset: 5px; }

#bwm-a11y .bwm-a11y__panel {
	position: absolute; bottom: 68px; left: 0; width: 344px;
	max-width: calc(100vw - 2 * var(--bwm-a11y-x)); max-height: calc(100vh - var(--bwm-a11y-y) - 88px); overflow: auto;
	background: #fff; border-radius: 22px; padding: 18px;
	box-shadow: 0 0 0 1px rgba(16, 19, 26, 0.08), 0 28px 60px -20px rgba(16, 19, 26, 0.5);
}
#bwm-a11y.bwm-a11y--right .bwm-a11y__panel { left: auto; right: 0; }
#bwm-a11y .bwm-a11y__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
#bwm-a11y .bwm-a11y__title { margin: 0; padding: 0; font-size: 19px; font-weight: 800; line-height: 1.2; color: #10131a; }
#bwm-a11y .bwm-a11y__close {
	width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eef0f4;
}
#bwm-a11y .bwm-a11y__close svg { width: 20px; height: 20px; }

#bwm-a11y .bwm-a11y__size {
	display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: #eef0f4; margin-bottom: 8px;
}
#bwm-a11y #bwm-a11y-size-label { flex: 1; font-weight: 700; }
#bwm-a11y .bwm-a11y__size button {
	width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
	background: #fff; font-weight: 800; box-shadow: 0 0 0 1px rgba(16, 19, 26, 0.12);
}
#bwm-a11y .bwm-a11y__size button[aria-disabled="true"] { opacity: 0.45; cursor: default; }
#bwm-a11y .bwm-a11y__size output { min-width: 52px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

#bwm-a11y .bwm-a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#bwm-a11y .bwm-a11y__tile {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
	min-height: 88px; padding: 14px; border-radius: 14px; background: #eef0f4; font-size: 14px; font-weight: 700; line-height: 1.25;
}
#bwm-a11y .bwm-a11y__tile:hover { box-shadow: inset 0 0 0 2px rgba(16, 19, 26, 0.18); }
#bwm-a11y .bwm-a11y__tile[aria-pressed="true"] { background: var(--bwm-a11y-color); color: #fff; }
#bwm-a11y .bwm-a11y__tile[aria-pressed="true"]::after {
	content: ""; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310131a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

#bwm-a11y .bwm-a11y__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; }
#bwm-a11y .bwm-a11y__foot button { padding: 11px 16px; border-radius: 999px; background: #eef0f4; font-weight: 700; }
#bwm-a11y .bwm-a11y__foot a { color: #10131a; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 699px) {
	#bwm-a11y { bottom: var(--bwm-a11y-ym); }
	#bwm-a11y .bwm-a11y__btn { width: 50px; height: 50px; }
	#bwm-a11y .bwm-a11y__panel {
		position: fixed; left: 8px; right: 8px; width: auto; max-width: none;
		bottom: calc(var(--bwm-a11y-ym) + 62px); max-height: calc(100vh - var(--bwm-a11y-ym) - 80px);
	}
}
@media (forced-colors: active) {
	#bwm-a11y .bwm-a11y__btn, #bwm-a11y .bwm-a11y__panel, #bwm-a11y .bwm-a11y__tile { border: 2px solid CanvasText; }
	#bwm-a11y .bwm-a11y__tile[aria-pressed="true"] { outline: 3px solid Highlight; }
}
@media print {
	#bwm-a11y, .bwm-a11y-mask { display: none !important; }
}
