/**
 * תפריט הנגישות + מחלקות ההתאמה שהוא מחיל על html.
 */

.il-a11y-toolbar {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	direction: rtl;
}

.il-a11y-toolbar--right {
	right: 20px;
}

.il-a11y-toolbar--left {
	left: 20px;
}

/* ---------- כפתור הפתיחה ---------- */

.il-a11y-toolbar__toggle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #10395c;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	/* תבניות כמו Flatsome נותנות לכל button שוליים וגובה מינימלי כלליים — הם הזיזו את הכפתור מהפינה
	   ומתחו אותו לאליפסה. */
	margin: 0;
	min-height: 0;
	min-width: 0;
}

.il-a11y-toolbar__icon {
	font-size: 28px;
	line-height: 1;
}

.il-a11y-toolbar__toggle:hover {
	background: #0a2740;
}

.il-a11y-toolbar__toggle:focus-visible,
.il-a11y-toolbar button:focus-visible,
.il-a11y-toolbar a:focus-visible {
	outline: 3px solid #ffd400;
	outline-offset: 2px;
}

/* ---------- הפאנל ---------- */

.il-a11y-toolbar__panel {
	position: absolute;
	bottom: 64px;
	width: 280px;
	max-width: calc(100vw - 40px);
	max-height: 75vh;
	overflow-y: auto;
	background: #fff;
	color: #1a1a1a;
	border: 2px solid #10395c;
	border-radius: 8px;
	padding: 14px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.il-a11y-toolbar--right .il-a11y-toolbar__panel {
	right: 0;
}

.il-a11y-toolbar--left .il-a11y-toolbar__panel {
	left: 0;
}

.il-a11y-toolbar__panel[hidden] {
	display: none;
}

.il-a11y-toolbar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #d7d7d7;
	padding-bottom: 8px;
	margin-bottom: 10px;
}

.il-a11y-toolbar__title {
	font-size: 17px;
	margin: 0;
	color: #10395c;
}

.il-a11y-toolbar__close {
	background: none;
	border: 0;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #1a1a1a;
	padding: 2px 6px;
}

.il-a11y-toolbar__group {
	margin-bottom: 12px;
}

.il-a11y-toolbar__label {
	display: block;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 6px;
}

.il-a11y-toolbar__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.il-a11y-toolbar__btn {
	flex: 0 0 auto;
	min-width: 46px;
	padding: 8px;
	border: 1px solid #10395c;
	background: #f4f7fa;
	color: #10395c;
	font-weight: 700;
	border-radius: 4px;
	cursor: pointer;
	font-size: 15px;
}

.il-a11y-toolbar__value {
	flex: 1 1 auto;
	text-align: center;
	font-weight: 700;
}

.il-a11y-toolbar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.il-a11y-toolbar__list li {
	margin: 0 0 4px;
}

.il-a11y-toolbar__opt {
	display: block;
	width: 100%;
	text-align: right;
	padding: 9px 10px;
	border: 1px solid #c3ced8;
	background: #fff;
	color: #1a1a1a;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14.5px;
}

.il-a11y-toolbar__opt:hover {
	background: #eef3f8;
}

/* מצב פעיל מסומן גם בצבע וגם בסימן — לא בצבע בלבד (WCAG 1.4.1) */
.il-a11y-toolbar__opt[aria-pressed="true"] {
	background: #10395c;
	color: #fff;
	border-color: #10395c;
	font-weight: 700;
}

.il-a11y-toolbar__opt[aria-pressed="true"]::before {
	content: "\2713\00a0";
}

.il-a11y-toolbar__reset {
	width: 100%;
	padding: 9px;
	border: 1px solid #8a1c1c;
	background: #fff;
	color: #8a1c1c;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 700;
	font-size: 14.5px;
}

.il-a11y-toolbar__foot {
	margin: 10px 0 4px;
	font-size: 13.5px;
}

.il-a11y-toolbar__foot a {
	color: #0b4a75;
}

.il-a11y-toolbar__note {
	margin: 0;
	padding-top: 8px;
	border-top: 1px solid #d7d7d7;
	font-size: 12.5px;
	color: #555;
}

/* .il-a11y-sr-only מוגדר פעם אחת ב-base.css, שנטען כתלות של הקובץ הזה. */

/* ================= התאמות המשתמש ================= */

/* התפריט עצמו נשאר קריא בכל מצב — לכן הוא מוחרג מהמסננים */

html.il-a11y-contrast-invert {
	filter: invert(1) hue-rotate(180deg);
	background: #fff;
}

html.il-a11y-contrast-invert img,
html.il-a11y-contrast-invert video,
html.il-a11y-contrast-invert iframe,
html.il-a11y-contrast-invert .il-a11y-toolbar {
	filter: invert(1) hue-rotate(180deg);
}

html.il-a11y-grayscale {
	filter: grayscale(1);
}

html.il-a11y-grayscale .il-a11y-toolbar {
	filter: grayscale(0);
}

html.il-a11y-contrast-high body,
html.il-a11y-contrast-high body *:not(.il-a11y-toolbar):not(.il-a11y-toolbar *) {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}

html.il-a11y-contrast-high body a:not(.il-a11y-toolbar *) {
	color: #ffd400 !important;
	text-decoration: underline !important;
}

html.il-a11y-readable-font body *:not(.il-a11y-toolbar):not(.il-a11y-toolbar *) {
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
	letter-spacing: 0.01em;
}

html.il-a11y-highlight-links body a:not(.il-a11y-toolbar *) {
	text-decoration: underline !important;
	outline: 2px solid #ffd400;
	outline-offset: 1px;
	background-color: #1a1a1a !important;
	color: #ffd400 !important;
}

html.il-a11y-highlight-titles body :is(h1, h2, h3, h4, h5, h6):not(.il-a11y-toolbar *) {
	outline: 2px dashed #0b4a75;
	outline-offset: 3px;
	background-color: #fffbe6 !important;
	color: #1a1a1a !important;
}

html.il-a11y-spacing body *:not(.il-a11y-toolbar):not(.il-a11y-toolbar *) {
	line-height: 1.9 !important;
	letter-spacing: 0.06em !important;
	word-spacing: 0.14em !important;
}

html.il-a11y-stop-motion *,
html.il-a11y-stop-motion *::before,
html.il-a11y-stop-motion *::after {
	animation: none !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

html.il-a11y-big-cursor,
html.il-a11y-big-cursor * {
	cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M6 2 L6 38 L15 30 L21 44 L28 41 L22 27 L34 27 Z' fill='%23000' stroke='%23fff' stroke-width='2'/></svg>") 4 2, auto !important;
}

/* ---------- מובייל ---------- */

@media (max-width: 480px) {

	.il-a11y-toolbar {
		bottom: 12px;
	}

	.il-a11y-toolbar--right {
		right: 12px;
	}

	.il-a11y-toolbar--left {
		left: 12px;
	}

	.il-a11y-toolbar__panel {
		width: calc(100vw - 24px);
	}
}
