/*
 * HD Accessibility - preferences widget and the preference classes it sets on <html>.
 * No external requests. Logical properties keep it correct in RTL and LTR.
 */

/* ---- widget shell ---------------------------------------------------- */
.hdacc-w {
	position: fixed;
	right: 16px;
	bottom: var(--hdacc-off, 96px);
	z-index: 99990;
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial, Assistant, sans-serif;
	/* Never below 16px even when the theme sets html{font-size:62.5%}; capped at 22px at large root sizes. */
	font-size: max(16px, min(1rem, 22px));
	color: #1a1a1a;
	letter-spacing: normal;
	word-spacing: normal;
	text-align: start;
}

.hdacc-w[data-pos^="top"] {
	top: var(--hdacc-off, 96px);
	bottom: auto;
}

/* data-side is the physical side (set by widget.js from the page direction): the panel itself is always RTL Hebrew. */
.hdacc-w[data-side="left"] {
	left: 16px;
	right: auto;
}

.hdacc-w *,
.hdacc-w *::before,
.hdacc-w *::after {
	box-sizing: border-box;
}

.hdacc-w [hidden] {
	display: none !important;
}

.hdacc-w__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- trigger button -------------------------------------------------- */
.hdacc-w .hdacc-w__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	margin: 0;
	padding: 0;
	background: var(--hdacc-bg, #0b4f9e);
	color: #fff;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px #000, 0 2px 8px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	line-height: 1;
}

.hdacc-w .hdacc-w__btn svg {
	width: 28px;
	height: 28px;
	fill: currentcolor;
	pointer-events: none;
}

/* ---- panel ----------------------------------------------------------- */
.hdacc-w .hdacc-w__panel {
	position: absolute;
	right: 0;
	bottom: 60px;
	width: max(320px, 22em);
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - var(--hdacc-off, 96px) - 84px);
	max-height: calc(100dvh - var(--hdacc-off, 96px) - 84px);
	overflow: auto;
	padding: 14px;
	background: #fff;
	color: #1a1a1a;
	border: 2px solid #1a1a1a;
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.hdacc-w[data-side="left"] .hdacc-w__panel {
	left: 0;
	right: auto;
}

.hdacc-w[data-pos^="top"] .hdacc-w__panel {
	top: 60px;
	bottom: auto;
	max-height: calc(100vh - var(--hdacc-off, 96px) - 84px);
	max-height: calc(100dvh - var(--hdacc-off, 96px) - 84px);
}

.hdacc-w .hdacc-w__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 8px;
}

.hdacc-w .hdacc-w__h {
	margin: 0;
	padding: 0;
	color: #1a1a1a;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.hdacc-w .hdacc-w__h:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 3px;
}

.hdacc-w p,
.hdacc-w .hdacc-w__note {
	margin: 0 0 10px;
	color: #1a1a1a;
	font-size: 0.875em;
	line-height: 1.5;
}

.hdacc-w .hdacc-w__grp {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
}

.hdacc-w .hdacc-w__lbl {
	display: block;
	margin: 0 0 6px;
	font-weight: 700;
	font-size: 0.95em;
	color: #1a1a1a;
}

.hdacc-w .hdacc-w__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.hdacc-w .hdacc-w__val {
	min-width: 3.2em;
	font-weight: 700;
	text-align: center;
	color: #1a1a1a;
}

/* ---- buttons inside the panel ---------------------------------------- */
.hdacc-w .hdacc-w__b,
.hdacc-w .hdacc-w__x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	min-width: 44px;
	margin: 0;
	padding: 6px 12px;
	background: #f1f3f5;
	color: #111;
	border: 2px solid #3d3d3d;
	border-radius: 8px;
	box-shadow: none;
	font: inherit;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}

.hdacc-w .hdacc-w__t {
	display: flex;
	width: 100%;
	margin: 0 0 6px;
	justify-content: flex-start;
	text-align: start;
}

.hdacc-w .hdacc-w__t::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid currentcolor;
	border-radius: 4px;
	background: transparent;
}

.hdacc-w .hdacc-w__t[aria-pressed="true"] {
	background: var(--hdacc-bg, #0b4f9e);
	color: #fff;
	border-color: var(--hdacc-bg, #0b4f9e);
}

.hdacc-w .hdacc-w__t[aria-pressed="true"]::before {
	content: "\2713";
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--hdacc-bg, #0b4f9e);
	border-color: #fff;
	font-size: 14px;
	line-height: 1;
}

.hdacc-w .hdacc-w__b[aria-disabled="true"] {
	background: #e6e8ea;
	color: #4a4a4a;
	border-color: #6b6b6b;
	border-style: dashed;
	cursor: default;
}

.hdacc-w .hdacc-w__b:hover,
.hdacc-w .hdacc-w__x:hover {
	border-color: var(--hdacc-bg, #0b4f9e);
}

.hdacc-w .hdacc-w__t[aria-pressed="true"]:hover {
	border-color: #000;
}

/*
 * Explicit colour pairs in :hover and :focus, so that a theme rule such as
 * ".elementor-kit-7 button:hover" cannot turn a button into a low-contrast pair.
 * Not in the high-contrast set, which has its own forced pairs.
 */
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__b:hover,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__b:focus,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__x:hover,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__x:focus {
	background: #f1f3f5 !important;
	color: #111 !important;
	text-decoration: none !important;
}

html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__t[aria-pressed="true"]:hover,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__t[aria-pressed="true"]:focus {
	background: var(--hdacc-bg, #0b4f9e) !important;
	color: #fff !important;
}

html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__b[aria-disabled="true"]:hover,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__b[aria-disabled="true"]:focus {
	background: #e6e8ea !important;
	color: #4a4a4a !important;
}

html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__btn:hover,
html:not(.hdacc-contrast):not(#hdacc-x) .hdacc-w .hdacc-w__btn:focus {
	background: var(--hdacc-bg, #0b4f9e) !important;
	color: #fff !important;
}

.hdacc-w .hdacc-w__reset {
	width: 100%;
	margin-top: 4px;
}

.hdacc-w .hdacc-w__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 10px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid #6b6b6b;
	list-style: none;
}

.hdacc-w .hdacc-w__links li {
	margin: 0;
	padding: 0;
}

.hdacc-w .hdacc-w__links a {
	color: #0a3d7a;
	font-size: 0.95em;
	text-decoration: underline;
}

/* A double ring that is visible on light and dark backgrounds. */
.hdacc-w button:focus-visible,
.hdacc-w a:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 0;
	box-shadow: 0 0 0 6px #000;
}

@media (forced-colors: active) {
	.hdacc-w .hdacc-w__btn,
	.hdacc-w .hdacc-w__b,
	.hdacc-w .hdacc-w__x {
		border: 2px solid ButtonText;
	}
}

@media print {
	.hdacc-w {
		display: none !important;
	}
}

/* ---- the widget in the high-contrast colour set ----------------------- */
html.hdacc-contrast:not(#hdacc-x) .hdacc-w .hdacc-w__panel {
	border: 2px solid #fff !important;
}

html.hdacc-contrast:not(#hdacc-x) .hdacc-w .hdacc-w__t[aria-pressed="true"] {
	background: #ffd400 !important;
	color: #000 !important;
	border-color: #ffd400 !important;
}

html.hdacc-contrast:not(#hdacc-x) .hdacc-w .hdacc-w__t[aria-pressed="true"]::before {
	background: #000 !important;
	color: #ffd400 !important;
	border-color: #000 !important;
}

html.hdacc-contrast:not(#hdacc-x) .hdacc-w .hdacc-w__btn svg {
	fill: #fff;
}

/* ---- preference classes ------------------------------------------------ */

/* Line, letter and word spacing (WCAG 1.4.12 values). */
html.hdacc-spacing:not(#hdacc-x) body :where(*:not(.hdacc-w, .hdacc-w *, svg, svg *, script, style)) {
	letter-spacing: 0.05em !important;
	word-spacing: 0.1em !important;
}

html.hdacc-spacing:not(#hdacc-x) body :where(p, li, dd, dt, td, th, label, blockquote, figcaption, h1, h2, h3, h4, h5, h6, a, span, strong, em, small, button, div, summary):not(.hdacc-w, .hdacc-w *) {
	line-height: 1.8 !important;
}

/* Highlight links. */
html.hdacc-links:not(#hdacc-x) body a:not(.hdacc-w a) {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
	outline: 2px dashed currentcolor;
	outline-offset: 2px;
}

html.hdacc-links:not(#hdacc-x) body a:not(.hdacc-w a):focus-visible {
	outline: 3px solid currentcolor;
	outline-offset: 3px;
}

/* Readable font: never on icon fonts. */
html.hdacc-readable-font:not(#hdacc-x) body :where(*:not(i, svg, svg *, .hdacc-w, .hdacc-w *, [class*="icon"]:not(h1, h2, h3, h4, h5, h6, p, li, .elementor-icon-box-title, .elementor-icon-box-description, .elementor-icon-list-text), [class*="material-symbols"], [class*="material-icons"], [class*="fa-"], .fa, .fas, .far, .fab, .fal, .fad, [class^="eicon"], [class*=" eicon"], .dashicons, .star-rating, .star-rating *)) {
	font-family: Arial, Assistant, "Segoe UI", Tahoma, Verdana, sans-serif !important;
}

/* Pause animations and transitions; elements still reach their final state. */
html.hdacc-no-motion:not(#hdacc-x) *,
html.hdacc-no-motion:not(#hdacc-x) *::before,
html.hdacc-no-motion:not(#hdacc-x) *::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;
}

/* Big cursor: 48px, black with a white outline. */
html.hdacc-big-cursor:not(#hdacc-x),
html.hdacc-big-cursor:not(#hdacc-x) body *:not(a, button, [role="button"], input, select, textarea, label, 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 3v34l9-8 6 14 7-3-6-13h13z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

html.hdacc-big-cursor:not(#hdacc-x) body :is(a, button, [role="button"], input[type="submit"], input[type="button"], label, select, 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='M17 5a3 3 0 016 0v14l2-1a3 3 0 015 1l1 0a3 3 0 015 2l1 0a3 3 0 013 3v10c0 6-4 11-10 11h-4c-4 0-7-2-9-5l-8-12a3 3 0 015-3l4 4z' fill='%23fff' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 20 4, pointer !important;
}
