/* =========================================================
   Site Accessibility Widget — עיצוב
   צבעי מותג: כחול כהה #0b2442 | בז' #eae5df | לבן #ffffff
   ========================================================= */

#sacc-root {
	--sacc-navy: #0b2442;
	--sacc-navy-soft: #16345c;
	--sacc-beige: #eae5df;
	--sacc-white: #ffffff;
	--sacc-text: #1c2a3a;
	--sacc-muted: #5b6b7d;
	--sacc-radius: 16px;
	--sacc-top: auto;
	--sacc-bottom: 24px;
	--sacc-left: 24px;
	--sacc-right: auto;

	position: fixed;
	top: var(--sacc-top);
	bottom: var(--sacc-bottom);
	left: var(--sacc-left);
	right: var(--sacc-right);
	width: -moz-fit-content;
	width: fit-content;
	height: -moz-fit-content;
	height: fit-content;
	z-index: 2147483000; /* מעל כמעט כל תוכן, כולל פופאפים נפוצים */
	font-family: Arial, Helvetica, sans-serif;
}

#sacc-root * {
	box-sizing: border-box;
}

/* מונע גלילת רקע כשמגירת הנגישות פתוחה */
html.sacc-scroll-lock,
html.sacc-scroll-lock body {
	overflow: hidden !important;
}

/* ---------- כפתור פתיחה (אייקון צף) ---------- */

.sacc-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--sacc-navy);
	color: var(--sacc-white);
	border: 3px solid var(--sacc-white);
	box-shadow: 0 8px 24px rgba(11, 36, 66, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 160ms ease, background 160ms ease;
}

.sacc-toggle:hover {
	background: var(--sacc-navy-soft);
	transform: scale(1.06);
}

.sacc-toggle:focus-visible {
	outline: 3px solid var(--sacc-beige);
	outline-offset: 3px;
}

/* ---------- רקע מטושטש (Backdrop) ---------- */

.sacc-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(11, 36, 66, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 2147482998;
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms ease;
}

.sacc-backdrop[hidden] {
	opacity: 0;
	pointer-events: none;
}

.sacc-backdrop.sacc-backdrop-visible {
	opacity: 1;
	pointer-events: auto;
}

/* ---------- פאנל: מגירה בגובה מלא ---------- */

.sacc-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	height: 100%;
	width: min(440px, 86vw);
	max-height: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: var(--sacc-white);
	border-radius: 0;
	box-shadow: 0 0 60px rgba(11, 36, 66, 0.35);
	direction: rtl;
	color: var(--sacc-text);
	z-index: 2147483000;
	opacity: 0;
	transition: transform 220ms ease, opacity 220ms ease;
}

@supports (height: 100dvh) {
	.sacc-panel {
		height: 100dvh;
	}
}

@media (min-width: 900px) {
	.sacc-panel {
		width: min(34vw, 460px);
	}
}

/* המגירה נצמדת לצד שהוגדר עבור האייקון (ברירת מחדל: שמאל) - הסטה קטנה בלבד, לעולם לא מחוץ לגבולות המסך */
.sacc-pos-bottom-left .sacc-panel,
.sacc-pos-top-left .sacc-panel {
	left: 0;
	transform: translateX(-16px);
	border-radius: 0 var(--sacc-radius) var(--sacc-radius) 0;
}

.sacc-pos-bottom-right .sacc-panel,
.sacc-pos-top-right .sacc-panel {
	right: 0;
	transform: translateX(16px);
	border-radius: var(--sacc-radius) 0 0 var(--sacc-radius);
}

.sacc-panel.sacc-panel-visible {
	transform: translateX(0);
	opacity: 1;
}

.sacc-panel[hidden] {
	display: none; /* ללא footprint בעמוד כלל כשסגור - מונע כל בעיית גלילה אופקית */
}

.sacc-panel-header {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--sacc-navy);
	color: var(--sacc-white);
	padding: 20px 52px 16px 20px;
	border-radius: 0;
}

.sacc-panel-header h2 {
	margin: 0 0 4px;
	font-size: 1.15rem;
}

.sacc-panel-sub {
	margin: 0;
	font-size: 0.82rem;
	color: var(--sacc-beige);
	line-height: 1.5;
}

.sacc-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--sacc-white);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.sacc-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.sacc-close:focus-visible {
	outline: 3px solid var(--sacc-beige);
	outline-offset: 2px;
}

.sacc-panel-body {
	padding: 18px 20px 20px;
}

.sacc-section {
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--sacc-beige);
}

.sacc-section:last-of-type {
	border-bottom: none;
}

.sacc-section h3 {
	font-size: 0.95rem;
	color: var(--sacc-navy);
	margin: 0 0 10px;
}

/* ---------- רשתות כפתורים ---------- */

.sacc-grid {
	display: grid;
	gap: 8px;
}

.sacc-grid-2 { grid-template-columns: 1fr 1fr; }
.sacc-grid-3 { grid-template-columns: repeat(3, 1fr); }

.sacc-profile-btn,
.sacc-toggle-btn,
.sacc-list-btn {
	font-family: inherit;
	font-size: 0.85rem;
	color: var(--sacc-navy);
	background: var(--sacc-white);
	border: 1.5px solid var(--sacc-beige);
	border-radius: 10px;
	padding: 10px 8px;
	cursor: pointer;
	text-align: center;
	transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.sacc-profile-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.sacc-btn-icon {
	font-size: 1.3rem;
}

.sacc-list-btn {
	display: block;
	width: 100%;
	text-align: right;
	margin-bottom: 6px;
}

.sacc-profile-btn:hover,
.sacc-toggle-btn:hover,
.sacc-list-btn:hover {
	background: var(--sacc-beige);
}

.sacc-profile-btn:focus-visible,
.sacc-toggle-btn:focus-visible,
.sacc-list-btn:focus-visible,
.sacc-reset-btn:focus-visible {
	outline: 3px solid var(--sacc-navy);
	outline-offset: 2px;
}

.sacc-toggle-btn.sacc-active,
.sacc-list-btn.sacc-active,
.sacc-profile-btn.sacc-active {
	background: var(--sacc-navy);
	color: var(--sacc-white);
	border-color: var(--sacc-navy);
}

/* ---------- שולט גודל טקסט ---------- */

.sacc-stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	background: var(--sacc-beige);
	border-radius: 12px;
	padding: 10px;
}

.sacc-step-btn {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: none;
	background: var(--sacc-navy);
	color: var(--sacc-white);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.sacc-step-btn:hover {
	background: var(--sacc-navy-soft);
}

.sacc-step-btn:focus-visible {
	outline: 3px solid var(--sacc-navy);
	outline-offset: 3px;
}

.sacc-step-value {
	min-width: 56px;
	text-align: center;
	font-weight: 700;
	color: var(--sacc-navy);
}

/* ---------- קיצורי מקלדת ---------- */

.sacc-shortcuts ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.85rem;
	color: var(--sacc-muted);
}

.sacc-shortcuts li {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-top: 1px dashed var(--sacc-beige);
}

.sacc-shortcuts li:first-child {
	border-top: none;
}

kbd {
	background: var(--sacc-beige);
	color: var(--sacc-navy);
	border-radius: 5px;
	padding: 2px 7px;
	font-size: 0.78rem;
	font-family: inherit;
}

/* ---------- איפוס והצהרה ---------- */

.sacc-reset-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--sacc-white);
	color: var(--sacc-navy);
	border: 1.5px solid var(--sacc-navy);
	border-radius: 10px;
	padding: 11px;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	margin-top: 4px;
}

.sacc-reset-btn-top {
	margin-top: 0;
	margin-bottom: 18px;
}

.sacc-reset-btn:hover {
	background: var(--sacc-navy);
	color: var(--sacc-white);
}

.sacc-footer {
	margin-top: 16px;
	text-align: center;
	font-size: 0.78rem;
	color: var(--sacc-muted);
}

.sacc-footer p {
	margin: 0 0 6px;
}

.sacc-footer a {
	display: inline-block;
	color: var(--sacc-navy);
	font-weight: 700;
	text-decoration: underline;
	margin: 0 6px;
}

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

@media (max-width: 480px) {
	#sacc-root {
		--sacc-left: 12px !important;
		--sacc-right: 12px !important;
		--sacc-bottom: 12px !important;
	}

	.sacc-toggle {
		width: 50px;
		height: 50px;
	}

	.sacc-panel {
		width: 92vw;
	}
}

/* =========================================================
   מצבי נגישות המוחלים על כל האתר (html.sacc-*)
   ========================================================= */

html.sacc-contrast-bright {
	filter: contrast(1.25) brightness(1.08);
}

html.sacc-contrast-dark {
	filter: invert(1) hue-rotate(180deg) contrast(1.1);
}
html.sacc-contrast-dark img,
html.sacc-contrast-dark video,
html.sacc-contrast-dark svg,
html.sacc-contrast-dark #sacc-root {
	filter: invert(1) hue-rotate(180deg);
}

html.sacc-dark-mode body {
	background: var(--sacc-dark-bg, #0b2442) !important;
	color: #f4f1ec !important;
}
html.sacc-dark-mode a {
	color: #eae5df !important;
}

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

html.sacc-invert {
	filter: invert(1) hue-rotate(180deg);
}
html.sacc-invert img,
html.sacc-invert video,
html.sacc-invert #sacc-root {
	filter: invert(1) hue-rotate(180deg);
}

html.sacc-cb-protanopia { filter: url(#sacc-protanopia); }
html.sacc-cb-deuteranopia { filter: url(#sacc-deuteranopia); }
html.sacc-cb-tritanopia { filter: url(#sacc-tritanopia); }

html.sacc-readable-font body,
html.sacc-readable-font body * {
	font-family: Arial, Verdana, "Segoe UI", sans-serif !important;
}

html.sacc-letter-spacing body * {
	letter-spacing: 0.06em !important;
	word-spacing: 0.12em !important;
}

html.sacc-line-height body * {
	line-height: 1.9 !important;
}

html.sacc-highlight-titles h1,
html.sacc-highlight-titles h2,
html.sacc-highlight-titles h3,
html.sacc-highlight-titles h4,
html.sacc-highlight-titles h5,
html.sacc-highlight-titles h6 {
	background: #fff3b0 !important;
	color: #1c2a3a !important;
	box-shadow: 0 0 0 4px #fff3b0;
	display: inline-block;
}

html.sacc-align-right body p,
html.sacc-align-right body li,
html.sacc-align-right body td {
	text-align: right !important;
}

html.sacc-align-left body p,
html.sacc-align-left body li,
html.sacc-align-left body td {
	text-align: left !important;
}

html.sacc-highlight-links a,
html.sacc-highlight-links button {
	outline: 2px solid #0b2442 !important;
	background: #fff3b0 !important;
	color: #0b2442 !important;
}

html.sacc-underline-links a {
	text-decoration: underline !important;
}

html.sacc-focus-outline *:focus {
	outline: 4px solid #0b2442 !important;
	outline-offset: 2px !important;
}

html.sacc-big-targets a,
html.sacc-big-targets button,
html.sacc-big-targets input[type="submit"] {
	padding: 10px 14px !important;
	display: inline-block;
}

html.sacc-cursor-black,
html.sacc-cursor-black * {
	cursor: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"%3E%3Cpath d="M4 2l14 8-6 2 4 6-2 1-4-6-4 4z" fill="black" stroke="white" stroke-width="1"/%3E%3C/svg%3E') 2 2, auto !important;
}

html.sacc-cursor-white,
html.sacc-cursor-white * {
	cursor: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"%3E%3Cpath d="M4 2l14 8-6 2 4 6-2 1-4-6-4 4z" fill="white" stroke="black" stroke-width="1"/%3E%3C/svg%3E') 2 2, auto !important;
}

html.sacc-pause-animations *,
html.sacc-pause-animations *::before,
html.sacc-pause-animations *::after {
	animation-play-state: paused !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

html.sacc-hide-images img,
html.sacc-hide-images picture,
html.sacc-hide-images svg:not(#sacc-root svg),
html.sacc-hide-images video {
	display: none !important;
}

/* קו עזר לקריאה */
#sacc-reading-guide {
	position: fixed;
	left: 0;
	right: 0;
	height: 3px;
	background: #0b2442;
	box-shadow: 0 0 8px rgba(11, 36, 66, 0.6);
	z-index: 2147483001;
	pointer-events: none;
	display: none;
}

html.sacc-reading-guide #sacc-reading-guide {
	display: block;
}

/* מסכת קריאה */
#sacc-reading-mask-top,
#sacc-reading-mask-bottom {
	position: fixed;
	left: 0;
	right: 0;
	background: rgba(11, 36, 66, 0.82);
	z-index: 2147483001;
	pointer-events: none;
	display: none;
}

#sacc-reading-mask-top {
	top: 0;
}

#sacc-reading-mask-bottom {
	bottom: 0;
}

html.sacc-reading-mask #sacc-reading-mask-top,
html.sacc-reading-mask #sacc-reading-mask-bottom {
	display: block;
}

/* הדגשת סביבת העכבר */
#sacc-cursor-ring {
	position: fixed;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 3px solid #0b2442;
	background: rgba(234, 229, 223, 0.35);
	pointer-events: none;
	z-index: 2147483001;
	transform: translate(-50%, -50%);
	display: none;
}

html.sacc-cursor-highlight #sacc-cursor-ring {
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	.sacc-toggle,
	.sacc-profile-btn,
	.sacc-toggle-btn,
	.sacc-list-btn {
		transition: none;
	}
}
