/*!
 * eCrew Accessibility Enhancements: visitor toolbar.
 * Display modes are classes on <html> (ecrew-tb-{tool}-{level}); the toolbar itself
 * (.ecrew-tb) and the WordPress admin bar are left out of every mode.
 */

/* ---------- display modes ---------- */

/* Text spacing (WCAG 1.4.12 values). */
html.ecrew-tb-spacing-1 body *:not(.ecrew-tb, .ecrew-tb *, #wpadminbar, #wpadminbar *) {
	letter-spacing: 0.12em !important;
	word-spacing: 0.16em !important;
}

/* Readable font. Icon fonts are left alone so icons don't turn into letters. */
html.ecrew-tb-font-1 body *:not(.ecrew-tb, .ecrew-tb *, #wpadminbar, #wpadminbar *, i, [class*="icon"], [class*="fa-"], [class^="fa"], [class*="dashicons"], [data-icon], [aria-hidden="true"], code, pre, kbd, samp) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
}

/* Contrast: dark (1) and light (2). Background images are removed so text stays on a solid colour. */
html.ecrew-tb-contrast-1,
html.ecrew-tb-contrast-1 body,
html.ecrew-tb-contrast-1 body *:not(.ecrew-tb, .ecrew-tb *, #wpadminbar, #wpadminbar *, img, video, picture, svg, svg *, iframe, canvas) {
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border-color: #fff !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.ecrew-tb-contrast-1 body a:not(.ecrew-tb *, #wpadminbar *),
html.ecrew-tb-contrast-1 body a:not(.ecrew-tb *, #wpadminbar *) * {
	color: #ffeb3b !important;
}
html.ecrew-tb-contrast-1 body ::placeholder { color: #d0d0d0 !important; opacity: 1 !important; }

html.ecrew-tb-contrast-2,
html.ecrew-tb-contrast-2 body,
html.ecrew-tb-contrast-2 body *:not(.ecrew-tb, .ecrew-tb *, #wpadminbar, #wpadminbar *, img, video, picture, svg, svg *, iframe, canvas) {
	background-color: #fff !important;
	background-image: none !important;
	color: #000 !important;
	border-color: #000 !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html.ecrew-tb-contrast-2 body a:not(.ecrew-tb *, #wpadminbar *),
html.ecrew-tb-contrast-2 body a:not(.ecrew-tb *, #wpadminbar *) * {
	color: #0000c8 !important;
}
html.ecrew-tb-contrast-2 body ::placeholder { color: #555 !important; opacity: 1 !important; }

/* Saturation: low (1) and none (2). On <html>, so fixed headers keep working. */
html.ecrew-tb-saturation-1 { filter: saturate(0.35); }
html.ecrew-tb-saturation-2 { filter: grayscale(1); }

/* Highlight links. */
html.ecrew-tb-links-1 body a:not(.ecrew-tb *, #wpadminbar *) {
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	text-underline-offset: 0.2em !important;
	outline: 2px solid #ffbf00 !important;
	outline-offset: 1px !important;
	background-color: #fff6cc !important;
	color: #000 !important;
}
html.ecrew-tb-links-1 body a:not(.ecrew-tb *, #wpadminbar *) * { color: #000 !important; }

/* Big cursor: black arrow, blue over links and buttons. */
html.ecrew-tb-cursor-1,
html.ecrew-tb-cursor-1 body,
html.ecrew-tb-cursor-1 body * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3v37l10-9.5 7.5 15.5 7-3.2-7.4-15.3H37z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.ecrew-tb-cursor-1 body a,
html.ecrew-tb-cursor-1 body a *,
html.ecrew-tb-cursor-1 body button,
html.ecrew-tb-cursor-1 body button *,
html.ecrew-tb-cursor-1 body [role="button"],
html.ecrew-tb-cursor-1 body label,
html.ecrew-tb-cursor-1 body select,
html.ecrew-tb-cursor-1 body summary {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3v37l10-9.5 7.5 15.5 7-3.2-7.4-15.3H37z' fill='%230056b3' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, pointer !important;
}

/* Pause animations. */
html.ecrew-tb-still-1 *,
html.ecrew-tb-still-1 *::before,
html.ecrew-tb-still-1 *::after {
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	animation-delay: 0s !important;
	transition-duration: 0.001ms !important;
	transition-delay: 0s !important;
	scroll-behavior: auto !important;
}

/* Reading guide. */
#ecrew-tb .ecrew-tb-guide {
	position: fixed;
	left: 0;
	right: 0;
	top: -40px;
	height: 14px;
	z-index: 1; /* Below the panel. */
	pointer-events: none;
	background: rgba(255, 213, 0, 0.35);
	border-top: 3px solid #000;
	border-bottom: 3px solid #000;
	box-shadow: 0 0 0 1px #fff;
}
#ecrew-tb .ecrew-tb-guide[hidden] { display: none; }

/* ---------- the toolbar ----------
 * Scoped to #ecrew-tb so theme button and link styles (Divi, Elementor, block themes) can't leak in. */

#ecrew-tb {
	--ecrew-tb-color: #0056b3;
	--ecrew-tb-offset: 20px;
	position: fixed;
	bottom: var(--ecrew-tb-offset);
	left: 20px;
	z-index: 2147483000;
	font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #1e1e1e;
	text-align: left;
	direction: ltr;
}
#ecrew-tb.ecrew-tb--right { left: auto; right: 20px; }

#ecrew-tb,
#ecrew-tb * {
	box-sizing: border-box;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-shadow: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#ecrew-tb button,
#ecrew-tb a {
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 600;
	cursor: pointer;
	box-shadow: none;
	min-height: 0;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
}

#ecrew-tb .ecrew-tb-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;
}

#ecrew-tb .ecrew-tb-icon { width: 26px; height: 26px; flex: none; display: block; }

/* Launcher */
#ecrew-tb .ecrew-tb-launch {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--ecrew-tb-color);
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease;
	position: relative;
	z-index: 2;
}
#ecrew-tb .ecrew-tb-launch:hover { transform: scale(1.06); }
#ecrew-tb .ecrew-tb-launch-icon { width: 32px; height: 32px; display: block; }

/* Focus: two-tone ring, visible on any background. */
#ecrew-tb button:focus-visible,
#ecrew-tb a:focus-visible {
	outline: 3px solid var(--ecrew-tb-color) !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #fff !important;
}
#ecrew-tb .ecrew-tb-launch:focus-visible {
	outline: 3px solid #000 !important;
	box-shadow: 0 0 0 6px #fff !important;
}
#ecrew-tb .ecrew-tb-panel:focus { outline: none; }
/* No focus ring after a mouse click (some themes add one to every focused button). */
#ecrew-tb button:focus:not(:focus-visible),
#ecrew-tb a:focus:not(:focus-visible) {
	outline: none !important;
}

/* Panel */
#ecrew-tb .ecrew-tb-panel {
	position: absolute;
	bottom: 68px;
	left: 0;
	width: 360px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - var(--ecrew-tb-offset) - 90px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	color: #1e1e1e;
	border: 1px solid #c3c4c7;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
	z-index: 2;
}
#ecrew-tb.ecrew-tb--right .ecrew-tb-panel { left: auto; right: 0; }
#ecrew-tb .ecrew-tb-panel[hidden] { display: none; }

#ecrew-tb .ecrew-tb-head {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 12px 12px 16px;
	background: var(--ecrew-tb-color);
	color: #fff;
	border-radius: 11px 11px 0 0;
}
#ecrew-tb .ecrew-tb-title { font-size: 17px; font-weight: 700; color: #fff; }
#ecrew-tb .ecrew-tb-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: #fff;
}
#ecrew-tb .ecrew-tb-close:hover { border-color: #fff; }
#ecrew-tb .ecrew-tb-head .ecrew-tb-close:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 0 !important;
	box-shadow: none !important;
}

#ecrew-tb .ecrew-tb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 14px;
}

#ecrew-tb .ecrew-tb-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 96px;
	padding: 12px 8px 14px;
	border: 2px solid #c3c4c7;
	border-radius: 10px;
	background: #f6f7f7;
	color: #1e1e1e;
	text-align: center;
}
#ecrew-tb .ecrew-tb-tile:hover { border-color: var(--ecrew-tb-color); }
#ecrew-tb .ecrew-tb-tile[aria-pressed="true"] {
	border-color: var(--ecrew-tb-color);
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--ecrew-tb-color);
	color: var(--ecrew-tb-color);
}
#ecrew-tb .ecrew-tb-tile[aria-pressed="true"]::after {
	content: "";
	position: absolute;
	top: 7px;
	right: 7px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ecrew-tb-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3 6.8 11 12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
#ecrew-tb .ecrew-tb-label { font-size: 14px; font-weight: 600; line-height: 1.25; color: inherit; }
#ecrew-tb .ecrew-tb-state { font-size: 13px; font-weight: 400; color: #50575e; }
#ecrew-tb .ecrew-tb-tile[aria-pressed="true"] .ecrew-tb-state { color: inherit; font-weight: 600; }

#ecrew-tb .ecrew-tb-dots { display: flex; gap: 4px; margin-top: 2px; }
#ecrew-tb .ecrew-tb-dot {
	width: 18px;
	height: 5px;
	border-radius: 3px;
	background: #c3c4c7;
}
#ecrew-tb .ecrew-tb-dot.is-on { background: var(--ecrew-tb-color); }

#ecrew-tb .ecrew-tb-foot {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding: 0 14px 16px;
}
#ecrew-tb .ecrew-tb-reset {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 11px 12px;
	border: 2px solid var(--ecrew-tb-color);
	border-radius: 8px;
	background: #fff;
	color: var(--ecrew-tb-color);
}
#ecrew-tb .ecrew-tb-reset .ecrew-tb-icon { width: 20px; height: 20px; }
#ecrew-tb .ecrew-tb-reset:hover { background: var(--ecrew-tb-color); color: #fff; }
#ecrew-tb .ecrew-tb-link {
	align-self: center;
	padding: 4px;
	color: var(--ecrew-tb-color);
	text-decoration: underline;
	font-weight: 600;
}

/* Phones: panel spans the screen width above the button. */
@media (max-width: 480px) {
	#ecrew-tb .ecrew-tb-panel {
		position: fixed;
		left: 8px;
		right: 8px;
		bottom: calc(var(--ecrew-tb-offset) + 66px);
		width: auto;
		max-width: none;
	}
	#ecrew-tb.ecrew-tb--right .ecrew-tb-panel { left: 8px; right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	#ecrew-tb .ecrew-tb-launch { transition: none; }
	#ecrew-tb .ecrew-tb-launch:hover { transform: none; }
}

@media print {
	#ecrew-tb { display: none !important; }
}
