/* ♿ BizSpace CRM - Global Accessibility Styles (ת"י 5568 / WCAG 2.0 AA) */

/* 1. Skip to Content Link (דילוג לתוכן מרכזי)
   -------------------------------------------------- */
.skip-to-content {
    position: absolute;
    top: -100px;
    right: 20px;
    background: #800020; /* Burgundy - צבע המשרד */
    color: #ffffff;
    padding: 12px 24px;
    z-index: 99999;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: top 0.2s ease-in-out;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
    top: 0;
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* 2. Accessible Focus Indicator (מסגרת מיקוד בולטת לניווט מקלדת)
   -------------------------------------------------- */
/* ביטול ברירת המחדל הישנה של outline: none והחלפתו במסגרת בולטת בטוחה */
*:focus {
    outline: none;
}

/* הפעלת פוקוס בולט רק כאשר הניווט מתבצע באמצעות המקלדת (ולא בקליק עכבר רגיל) */
*:focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(0, 95, 204, 0.3) !important;
}

/* התאמות מיוחדות עבור כפתורים, קישורים ושדות קלט */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px !important;
}

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

/* 4. Text Zoom & Contrast Enhancements (התאמות זום וניגודיות)
   -------------------------------------------------- */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* מניעת שבירת אלמנטים בזום 200% בדפדפן */
@media screen and (max-width: 480px) {
    body {
        font-size: 16px; /* וידוא גודל קריא מינימלי במובייל */
    }
}

/* 5. Reduced Motion (ביטול אנימציות למניעת סחרחורת/רגישות)
   -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* 6. High Contrast Theme Helper (תומך ניגודיות גבוהה)
   -------------------------------------------------- */
.accessible-contrast {
    filter: contrast(1.2);
}
