/**
 * TURI Accessibility
 * תיקוני נגישות בצד השרת, ת"י 5568 / WCAG 2.1 AA
 * גרסה 1.0.2
 *
 * כל הכללים כאן מתקנים ליקויים שנמצאו בסקר הנגישות ומתועדים
 * בקובץ העבודה. מספר הליקוי מצוין מעל כל מקטע.
 */

/* ==========================================================================
   ליקוי 1: WCAG 2.4.7 Focus Visible (AA) + 2.4.11 Focus Appearance
   --------------------------------------------------------------------------
   התבנית מגדירה :focus:not(:focus-visible){outline:none} אך לא מספקת
   סימון חלופי נראה עבור :focus-visible, ולכן 59 מתוך 66 אלמנטים
   הניתנים למיקוד לא הציגו שום אינדיקציה, לרבות כל שדות טופס התשלום.

   הפתרון: טבעת כפולה. טבעת פנימית לבנה שמפרידה מהרקע, וטבעת חיצונית
   כהה. השילוב מבטיח יחס ניגודיות של 3:1 לפחות גם על רקע בהיר (קרם, לבן)
   וגם על רקע כהה (שחור), שני הרקעים הקיימים באתר.

   ההצגה היא ב-:focus-visible בלבד, ולכן משתמשי עכבר אינם רואים שינוי
   כלשהו והעיצוב נשמר במלואו.
   ========================================================================== */

:where(a[href], button, input, select, textarea, summary, details,
       [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"],
       [role="tab"], [role="menuitem"], [contenteditable="true"]):focus-visible {
	outline: 3px solid #0b3d91 !important;
	outline-color: #0b3d91 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #ffffff !important;
	border-radius: 2px;
}

/* אלמנטור, ווקומרס וג'ט מגדירים outline:none בסלקטורים ספציפיים מאוד.
   הכללים הבאים מכוונים אליהם ישירות כדי לגבור עליהם. */
.elementor a:focus-visible,
.elementor button:focus-visible,
.elementor .elementor-button:focus-visible,
.elementor-item:focus-visible,
.elementor-icon:focus-visible,
.woocommerce a:focus-visible,
.woocommerce button:focus-visible,
.woocommerce input:focus-visible,
.woocommerce select:focus-visible,
.woocommerce textarea:focus-visible,
.woocommerce .button:focus-visible,
.jet-woo-item-overlay-link:focus-visible,
.woo-variation-gallery-trigger:focus-visible,
input.input-text:focus-visible,
textarea.input-text:focus-visible,
select.country_to_state:focus-visible,
input.shipping_method:focus-visible,
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
	outline: 3px solid #0b3d91 !important;
	outline-color: #0b3d91 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #ffffff !important;
}

/* שדות טופס: הדגשה נוספת של הגבול, כי טבעת בלבד על שדה לבן על רקע לבן
   עלולה להיבלע. שינוי הגבול מספק אינדיקציה שנייה ובלתי תלויה. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	border-color: #0b3d91 !important;
}

/* על רקעים כהים באתר, היפוך הטבעות כדי לשמור על ניגודיות. */
.elementor-element[data-settings*="dark"] :focus-visible,
[style*="background-color: #000"] :focus-visible,
[style*="background-color:#000"] :focus-visible,
.dark-section :focus-visible {
	outline-color: #ffffff !important;
	box-shadow: 0 0 0 2px #0b3d91 !important;
}

/* ==========================================================================
   ליקוי 6: WCAG 2.5.8 Target Size (Minimum) (AA, WCAG 2.2)
   --------------------------------------------------------------------------
   יעדי מגע קטנים מ-24 על 24 פיקסלים ללא מרווח מספק מסביבם.
   ========================================================================== */

.elementor a.elementor-icon,
.elementor-icon-wrapper a,
.woo-variation-gallery-trigger,
.jet-woo-item-overlay-link,
a.pojo-a11y-toolbar-link {
	min-width: 24px;
	min-height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* קישורי טקסט קצרים בהדר ובפוטר: הגדלת אזור המגע דרך ריפוד אנכי
   בלי לשנות את המראה, כי הריפוד שקוף. */
.elementor-widget-heading a,
.site-footer a,
footer a {
	display: inline-block;
	min-height: 24px;
	padding-block: 2px;
}

/* ==========================================================================
   ליקוי 7: WCAG 1.4.3 Contrast (Minimum) (AA)
   --------------------------------------------------------------------------
   הודעות ווקומרס (התחברות, קופון) בעמודי הסל והתשלום לא הגיעו ליחס 4.5:1.
   הצבעים שנבחרו: טקסט #1d2327 על רקע #eef1f4 נותן יחס של כ-14:1.
   ========================================================================== */

.woocommerce-info,
.woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message {
	background-color: #eef1f4 !important;
	color: #1d2327 !important;
	border-top-color: #0b3d91 !important;
}

.woocommerce-info a,
.woocommerce-message a,
.woocommerce-info .showlogin,
.woocommerce-info .showcoupon {
	color: #0b3d91 !important;
	text-decoration: underline !important;
}

/* הודעות שגיאה: אדום כהה מספיק כדי לעמוד ב-4.5:1 על רקע בהיר. */
.woocommerce-error,
.woocommerce .woocommerce-error {
	background-color: #fcf0f1 !important;
	color: #8a1f11 !important;
}

.woocommerce-error a {
	color: #8a1f11 !important;
	text-decoration: underline !important;
}

/* ==========================================================================
   ליקוי 8: WCAG 1.4.1 Use of Color (A)
   --------------------------------------------------------------------------
   קישורים בתוך גוש טקסט זוהו בצבע בלבד. הוספת קו תחתון מספקת
   סימן ויזואלי שאינו תלוי בתפיסת צבע.

   מוחל רק על קישורים בתוך פסקאות ורשימות תוכן, ולא על תפריטים,
   כפתורים או כרטיסי מוצר, שבהם ההקשר הויזואלי מספיק לפי התקן.
   ========================================================================== */

.entry-content p a:not(.button):not(.elementor-button),
.entry-content li a:not(.button):not(.elementor-button),
.entry-content td a:not(.button):not(.elementor-button),
.elementor-widget-text-editor p a:not(.button):not(.elementor-button),
.elementor-widget-text-editor li a:not(.button):not(.elementor-button),
.elementor-widget-text-editor td a:not(.button):not(.elementor-button),
.elementor-widget-theme-post-content p a:not(.button):not(.elementor-button),
.elementor-widget-theme-post-content li a:not(.button):not(.elementor-button),
.woocommerce-privacy-policy-text a,
.woocommerce-terms-and-conditions-wrapper a,
a.woocommerce-privacy-policy-link {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* תפריטי ניווט פטורים מהדרישה הזו: ההקשר הויזואלי של תפריט מספיק
   כדי לזהות פריט כניתן ללחיצה, ואין הסתמכות על צבע בלבד. */
.elementor-nav-menu a,
.elementor-nav-menu li a,
nav a {
	text-decoration: none;
}

/* ==========================================================================
   תמיכה כללית בהעדפות משתמש
   -------------------------------------------------------------------------- */

/* WCAG 2.3.3 Animation from Interactions: כיבוד העדפת המערכת. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* מחלקת עזר להסתרה ויזואלית תוך השארת הטקסט זמין לקורא מסך.
   משמשת את תיקוני ה-PHP שמוסיפים שמות נגישים לקישורי אייקון. */
.turi-a11y-sr-only {
	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;
}

/* קישור הדילוג חייב להיות נראה כשהוא מקבל פוקוס. */
.turi-a11y-sr-only:focus,
.turi-a11y-sr-only:focus-visible {
	position: fixed !important;
	top: 8px !important;
	inset-inline-start: 8px !important;
	width: auto !important;
	height: auto !important;
	padding: 12px 20px !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	z-index: 100000 !important;
	background: #ffffff !important;
	color: #0b3d91 !important;
	font-weight: 700 !important;
}

/* ==========================================================================
   ליקוי 7 (המשך): WCAG 1.4.3 Contrast (Minimum) (AA)
   --------------------------------------------------------------------------
   שדות טופס וטקסט עזר נמסרו בצבע #777 על רקע #f4f4f4, יחס 4.07:1
   בלבד מול הדרישה של 4.5:1. הצבע #4a4a4a על אותו רקע נותן כ-7.5:1.
   ========================================================================== */

.woocommerce input.qty,
.woocommerce .quantity input.qty,
input.qty,
input[type="number"].qty {
	color: #1d2327 !important;
}

/* טקסט עזר, תיאורים ופלייסהולדרים: העלאה מעל הסף. */
.woocommerce-input-wrapper .description,
.woocommerce form .form-row .description,
small.woocommerce-input-wrapper,
.product_meta,
.posted_in,
.sku_wrapper {
	color: #4a4a4a !important;
}

input::placeholder,
textarea::placeholder,
.woocommerce input::placeholder,
.woocommerce textarea::placeholder {
	color: #595959 !important;
	opacity: 1 !important;
}

/* ליקוי 7 (המשך): בורר המיון בעמוד החנות נמסר בניגודיות נמוכה. */
.theme-selectInner,
.theme-select .theme-selectInner,
.woocommerce-ordering .theme-selectInner,
.woocommerce-ordering select {
	color: #1d2327 !important;
}

/* ==========================================================================
   ליקוי 17: WCAG 2.2.2 Pause, Stop, Hide (A) + 2.3.3 Animation from Interactions
   --------------------------------------------------------------------------
   כפתור השהיה לקרוסלות שמתחלפות אוטומטית. עומד בגודל יעד מגע מזערי
   (44px), בניגודיות מספקת, ומקבל את טבעת הפוקוס הכללית של האתר.
   ========================================================================== */

.turi-a11y-motion-toggle {
	position: absolute;
	inset-block-end: 12px;
	inset-inline-start: 12px;
	z-index: 20;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background-color: rgba(17, 17, 17, 0.82);
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.turi-a11y-motion-toggle:hover {
	background-color: rgba(17, 17, 17, 0.95);
}

/* האייקון מצויר בשני פסאודו אלמנטים, בלי HTML מוזרק. */
.turi-a11y-motion-toggle::before,
.turi-a11y-motion-toggle::after {
	content: "";
	display: block;
	background-color: currentColor;
}

/* מצב "רץ": מציג סמל השהיה, שני פסים. */
.turi-a11y-motion-toggle.is-playing::before,
.turi-a11y-motion-toggle.is-playing::after {
	width: 4px;
	height: 16px;
	border-radius: 1px;
}

.turi-a11y-motion-toggle.is-playing::before {
	margin-inline-end: 4px;
}

/* מצב "מושהה": מציג סמל הפעלה, משולש אחד. */
.turi-a11y-motion-toggle.is-paused::before {
	width: 0;
	height: 0;
	background-color: transparent;
	border-block: 8px solid transparent;
	border-inline-end: 13px solid currentColor;
	border-inline-start: 0;
	margin-inline-start: 3px;
}

.turi-a11y-motion-toggle.is-paused::after {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.turi-a11y-motion-toggle {
		transition: none;
	}
}

/* ==========================================================================
   ליקוי 21: WCAG 1.4.3 + 4.1.2, מצב "לא זמין" של כפתור ההוספה לסל
   --------------------------------------------------------------------------
   ווקומרס מחיל שקיפות 0.5 על הכפתור כל עוד לא נבחרה וריאציה, וכך
   הניגודיות האפקטיבית יורדת מתחת לסף. העלאה ל-0.75 שומרת על ההבחנה
   הויזואלית בין זמין ללא זמין, ומחזירה את הניגודיות מעל 4.5:1.
   הסימון התכנותי (aria-disabled) מתווסף ב-assets/js/keyboard.js.
   ========================================================================== */

.woocommerce button.single_add_to_cart_button.disabled,
.woocommerce button.single_add_to_cart_button:disabled,
button.single_add_to_cart_button.disabled,
button.single_add_to_cart_button.wc-variation-selection-needed {
	opacity: 0.75 !important;
	cursor: not-allowed;
}

/* מצב לא זמין חייב להיות מובחן גם למי שאינו מבחין בשקיפות. */
button.single_add_to_cart_button[aria-disabled="true"] {
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}
