/* =========================================================================
   WP A11y Toolbar — front-end styles
   כל הכללים הגלובליים (שמשפיעים על שאר האתר) כוללים חריגה מפורשת מהווידג'ט
   עצמו (#wpa11y-root), כדי שהתפריט תמיד יישאר קריא ויציב, ללא תלות בהגדרות
   שהמשתמש בחר להפעיל על שאר העמוד.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. קישור "דלג לתוכן הראשי"
   ------------------------------------------------------------------------- */
.wpa11y-skip-link {
	position: fixed;
	inset-block-start: -60px;
	inset-inline-start: 8px;
	z-index: 2147483000;
	background: #000;
	color: #fff;
	padding: 12px 20px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: inset-block-start 0.2s ease;
}
.wpa11y-skip-link:focus {
	inset-block-start: 8px;
	outline: 3px solid #ffbf47;
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   2. מיכל הווידג'ט ומיקום
   ------------------------------------------------------------------------- */
#wpa11y-root, #wpa11y-root * {
	box-sizing: border-box;
}
.wpa11y-root {
	position: fixed;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Tahoma, sans-serif;
}
.wpa11y-pos-bottom-end   { inset-block-end: 20px; inset-inline-end: 20px; }
.wpa11y-pos-bottom-start { inset-block-end: 20px; inset-inline-start: 20px; }
.wpa11y-pos-top-end      { inset-block-start: 20px; inset-inline-end: 20px; }
.wpa11y-pos-top-start    { inset-block-start: 20px; inset-inline-start: 20px; }

/* -------------------------------------------------------------------------
   3. כפתור ההפעלה הצף
   ------------------------------------------------------------------------- */
.wpa11y-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--wpa11y-primary, #154273);
	color: var(--wpa11y-icon-color, #fff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wpa11y-trigger.wpa11y-shape-round  { border-radius: 50%; }
.wpa11y-trigger.wpa11y-shape-square { border-radius: 14px; }
.wpa11y-trigger:hover { transform: scale(1.06); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32); }
.wpa11y-trigger:active { transform: scale(0.97); }
.wpa11y-trigger:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: 3px;
}
.wpa11y-icon-small  { width: 44px;  height: 44px; }
.wpa11y-icon-medium { width: 56px;  height: 56px; }
.wpa11y-icon-large  { width: 68px;  height: 68px; }
.wpa11y-trigger svg {
	width: 71%;
	height: 71%;
	display: block;
}

/* -------------------------------------------------------------------------
   4. הפאנל
   ------------------------------------------------------------------------- */
.wpa11y-panel {
	position: absolute;
	inset-block-end: calc(100% + 12px);
	inset-inline-end: 0;
	width: 360px;
	max-width: calc(100vw - 24px);
	max-height: min(78vh, 640px);
	overflow-y: auto;
	background: #ffffff;
	color: #1a1a1a;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 15px;
	line-height: 1.5;
}
.wpa11y-pos-top-end .wpa11y-panel,
.wpa11y-pos-top-start .wpa11y-panel {
	inset-block-end: auto;
	inset-block-start: calc(100% + 12px);
}
.wpa11y-pos-bottom-start .wpa11y-panel,
.wpa11y-pos-top-start .wpa11y-panel {
	inset-inline-end: auto;
	inset-inline-start: 0;
}
.wpa11y-panel[hidden] { display: none; }
.wpa11y-panel.wpa11y-shape-round  { border-radius: 20px; }
.wpa11y-panel.wpa11y-shape-square { border-radius: 10px; }
.wpa11y-panel.wpa11y-shape-round .wpa11y-panel-header  { border-radius: 20px 20px 0 0; }
.wpa11y-panel.wpa11y-shape-square .wpa11y-panel-header { border-radius: 10px 10px 0 0; }

.wpa11y-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid #ececec;
	position: sticky;
	top: 0;
	background: #fff;
	border-radius: 14px 14px 0 0;
}
.wpa11y-panel-header h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
}
.wpa11y-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #333;
	cursor: pointer;
}
.wpa11y-icon-btn:hover { background: rgba(0, 0, 0, 0.06); }
.wpa11y-icon-btn:focus-visible { outline: 3px solid var(--wpa11y-primary, #154273); outline-offset: 1px; }

.wpa11y-panel-body { padding: 6px 18px 4px; }

.wpa11y-group { margin-block: 16px; }
.wpa11y-group-title {
	margin: 0 0 6px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5a5a5a;
	border-inline-start: 4px solid var(--wpa11y-primary, #154273);
	padding-inline-start: 8px;
}
.wpa11y-controls { display: flex; flex-direction: column; }

.wpa11y-control {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 2px;
	border-bottom: 1px solid #f0f0f0;
}
.wpa11y-group .wpa11y-controls .wpa11y-control:last-child { border-bottom: none; }
.wpa11y-control-choice { flex-direction: column; align-items: stretch; gap: 6px; }
.wpa11y-control-label { font-size: 14.5px; color: #222; }

/* מתג הפעלה/כיבוי (switch) */
.wpa11y-switch {
	flex: 0 0 auto;
	width: 44px;
	height: 26px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	position: relative;
}
.wpa11y-switch-track {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: #c7c7c7;
	transition: background-color 0.15s ease;
	position: relative;
}
.wpa11y-switch-thumb {
	position: absolute;
	inset-block-start: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	transition: inset-inline-start 0.15s ease;
}
.wpa11y-switch[aria-checked="true"] .wpa11y-switch-track { background: var(--wpa11y-primary, #154273); }
.wpa11y-switch[aria-checked="true"] .wpa11y-switch-thumb { inset-inline-start: calc(100% - 23px); }
.wpa11y-switch:focus-visible { outline: 3px solid var(--wpa11y-primary, #154273); outline-offset: 3px; }

/* בקרת מדרגות (stepper) */
.wpa11y-stepper { display: flex; align-items: center; gap: 8px; }
.wpa11y-step-btn {
	width: 30px;
	height: 30px;
	border-radius: 7px;
	border: 1.5px solid #cfcfcf;
	background: #fafafa;
	color: #1a1a1a;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wpa11y-step-btn:hover:not(:disabled) { background: #f0f0f0; }
.wpa11y-step-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wpa11y-step-btn:focus-visible { outline: 3px solid var(--wpa11y-primary, #154273); outline-offset: 2px; }
.wpa11y-step-value { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

/* בחירה (select) */
.wpa11y-select {
	width: 100%;
	padding: 7px 10px;
	border-radius: 8px;
	border: 1.5px solid #cfcfcf;
	background: #fff;
	color: #1a1a1a;
	font-size: 14.5px;
}
.wpa11y-select:focus-visible { outline: 3px solid var(--wpa11y-primary, #154273); outline-offset: 1px; }

/* פוטר */
.wpa11y-panel-footer {
	padding: 14px 18px 18px;
	border-top: 1px solid #ececec;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.wpa11y-reset-btn {
	width: 100%;
	padding: 10px;
	border-radius: 9px;
	border: 1.5px solid var(--wpa11y-primary, #154273);
	background: #fff;
	color: var(--wpa11y-primary, #154273);
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
}
.wpa11y-reset-btn:hover { background: rgba(21, 66, 115, 0.06); }
.wpa11y-reset-btn:focus-visible { outline: 3px solid var(--wpa11y-primary, #154273); outline-offset: 2px; }
.wpa11y-statement-link { color: var(--wpa11y-primary, #154273); text-align: center; font-size: 13.5px; text-decoration: underline; }
.wpa11y-credit { margin: 0; text-align: center; font-size: 11.5px; color: #9a9a9a; }

/* מסך קורא בלבד */
.wpa11y-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* סרגל הקראה עוקב עכבר */
.wpa11y-reading-guide {
	position: fixed;
	inset-inline-start: 0;
	width: 100%;
	height: 42px;
	background: rgba(255, 235, 59, 0.35);
	border-block: 2px solid rgba(0, 0, 0, 0.35);
	pointer-events: none;
	z-index: 2147482999;
}
.wpa11y-reading-guide[hidden] { display: none; }

/* מובייל */
@media (max-width: 480px) {
	.wpa11y-panel { width: calc(100vw - 20px); }
}

/* תנועה מופחתת ומצב ניגודיות מאולץ במערכת ההפעלה */
@media (prefers-reduced-motion: reduce) {
	.wpa11y-trigger, .wpa11y-switch-thumb, .wpa11y-switch-track, .wpa11y-skip-link { transition: none !important; }
}
@media (forced-colors: active) {
	.wpa11y-trigger { border: 2px solid ButtonText; }
	.wpa11y-panel { border: 2px solid CanvasText; }
}

/* =========================================================================
   5. אפקטים גלובליים על העמוד — מופעלים ע"י JavaScript על ה-<html>
   כל כלל כאן מחריג במפורש את הווידג'ט עצמו (#wpa11y-root ותתי-האלמנטים שלו)
   ========================================================================= */

/* --- גודל גופן --- */
html.wpa11y-fontsize-1 body :not(#wpa11y-root):not(#wpa11y-root *) { font-size: 1.08em !important; }
html.wpa11y-fontsize-2 body :not(#wpa11y-root):not(#wpa11y-root *) { font-size: 1.18em !important; }
html.wpa11y-fontsize-3 body :not(#wpa11y-root):not(#wpa11y-root *) { font-size: 1.3em !important; }
html.wpa11y-fontsize-4 body :not(#wpa11y-root):not(#wpa11y-root *) { font-size: 1.45em !important; }

/* --- ריווח בין אותיות --- */
html.wpa11y-ls-1 body :not(#wpa11y-root):not(#wpa11y-root *) { letter-spacing: 0.04em !important; }
html.wpa11y-ls-2 body :not(#wpa11y-root):not(#wpa11y-root *) { letter-spacing: 0.09em !important; }
html.wpa11y-ls-3 body :not(#wpa11y-root):not(#wpa11y-root *) { letter-spacing: 0.15em !important; }

/* --- ריווח בין שורות --- */
html.wpa11y-lh-1 body :not(#wpa11y-root):not(#wpa11y-root *) { line-height: 1.6 !important; }
html.wpa11y-lh-2 body :not(#wpa11y-root):not(#wpa11y-root *) { line-height: 1.9 !important; }
html.wpa11y-lh-3 body :not(#wpa11y-root):not(#wpa11y-root *) { line-height: 2.2 !important; }

/* --- יישור טקסט --- */
html.wpa11y-align-right body :not(#wpa11y-root):not(#wpa11y-root *)  { text-align: right !important; }
html.wpa11y-align-center body :not(#wpa11y-root):not(#wpa11y-root *) { text-align: center !important; }
html.wpa11y-align-left body :not(#wpa11y-root):not(#wpa11y-root *)   { text-align: left !important; }

/* --- גופן קריא --- */
html.wpa11y-readable-font body :not(#wpa11y-root):not(#wpa11y-root *) {
	font-family: Verdana, Arial, "Segoe UI", Tahoma, sans-serif !important;
	word-spacing: 0.06em !important;
}

/* --- מצבי ניגודיות/רקע --- */
html.wpa11y-mode-high-contrast body :not(#wpa11y-root):not(#wpa11y-root *) {
	background-color: #000 !important;
	color: #ffe27a !important;
	border-color: #ffe27a !important;
}
html.wpa11y-mode-high-contrast body a:not(#wpa11y-root *) { color: #7fd3ff !important; }
html.wpa11y-mode-high-contrast img:not(#wpa11y-root *),
html.wpa11y-mode-high-contrast video:not(#wpa11y-root *) { filter: grayscale(0.3) contrast(1.1); opacity: 0.9; }

html.wpa11y-mode-light body :not(#wpa11y-root):not(#wpa11y-root *) {
	background-color: #ffffff !important;
	color: #111111 !important;
}
html.wpa11y-mode-light body a:not(#wpa11y-root *) { color: #0b4a8f !important; }

/* מצב כהה + היפוך צבעים משתמשים בטריק "היפוך כפול": הופכים את כל הדף, ואז
   הופכים בחזרה תמונות/וידאו/את הווידג'ט עצמו, כדי לשמור על צבעים טבעיים בהם. */
html.wpa11y-mode-dark { background: #fff; filter: invert(1) hue-rotate(180deg); }
html.wpa11y-mode-dark img, html.wpa11y-mode-dark video, html.wpa11y-mode-dark svg,
html.wpa11y-mode-dark canvas, html.wpa11y-mode-dark #wpa11y-root {
	filter: invert(1) hue-rotate(180deg);
}
html.wpa11y-mode-invert { filter: invert(1); }
html.wpa11y-mode-invert img, html.wpa11y-mode-invert video, html.wpa11y-mode-invert svg,
html.wpa11y-mode-invert canvas, html.wpa11y-mode-invert #wpa11y-root {
	filter: invert(1);
}

/* --- סינון עבור עיוורי צבעים (best-effort: הגברת ניגודיות והפרדת גוונים) --- */
html.wpa11y-cb-protanopia body { filter: saturate(1.6) contrast(1.05) hue-rotate(8deg); }
html.wpa11y-cb-deuteranopia body { filter: saturate(1.6) contrast(1.05) hue-rotate(-8deg); }
html.wpa11y-cb-tritanopia body { filter: saturate(1.5) contrast(1.05) hue-rotate(-16deg); }
html.wpa11y-cb-achromatopsia body { filter: grayscale(1) contrast(1.25); }

/* --- הדגשות --- */
html.wpa11y-highlight-titles h1:not(#wpa11y-root *), html.wpa11y-highlight-titles h2:not(#wpa11y-root *),
html.wpa11y-highlight-titles h3:not(#wpa11y-root *), html.wpa11y-highlight-titles h4:not(#wpa11y-root *),
html.wpa11y-highlight-titles h5:not(#wpa11y-root *), html.wpa11y-highlight-titles h6:not(#wpa11y-root *) {
	outline: 2px dashed #d6a300 !important;
	outline-offset: 3px;
	background-color: rgba(255, 224, 102, 0.25) !important;
}
html.wpa11y-highlight-links a:not(#wpa11y-root *) {
	background-color: rgba(21, 66, 115, 0.12) !important;
	text-decoration: underline !important;
	text-decoration-thickness: 2px !important;
	outline: 1px dashed rgba(21, 66, 115, 0.5) !important;
}
html.wpa11y-focus-highlight *:focus:not(#wpa11y-root *) {
	outline: 3px solid #ff7a00 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px rgba(255, 122, 0, 0.25) !important;
}

/* --- עצירת תנועה --- */
html.wpa11y-stop-animations *:not(#wpa11y-root):not(#wpa11y-root *) {
	animation-play-state: paused !important;
	animation-duration: 0s !important;
	transition: none !important;
	scroll-behavior: auto !important;
}

/* --- סמן מוגדל --- */
html.wpa11y-big-cursor,
html.wpa11y-big-cursor body:not(#wpa11y-root) {
	cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M3 2l7.07 17.61 2.05-6.87 6.87-2.05z" fill="black" stroke="white" stroke-width="1.2"/></svg>') 2 2, auto !important;
}
html.wpa11y-big-cursor a:not(#wpa11y-root *),
html.wpa11y-big-cursor button:not(#wpa11y-root *) {
	cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M3 2l7.07 17.61 2.05-6.87 6.87-2.05z" fill="%23154273" stroke="white" stroke-width="1.2"/></svg>') 2 2, pointer !important;
}

/* --- מצב קריאה נקי --- */
html.wpa11y-reading-mode body :not(#wpa11y-root):not(#wpa11y-root *) {
	background-image: none !important;
	animation: none !important;
}
html.wpa11y-reading-mode img:not(#wpa11y-root *):not(.wpa11y-keep-visible) { opacity: 0.15 !important; }
html.wpa11y-reading-mode iframe:not(#wpa11y-root *) { opacity: 0.15 !important; }
html.wpa11y-reading-mode body :not(#wpa11y-root):not(#wpa11y-root *) {
	max-width: 100% !important;
}
