/**
 * Accessibility remediation stylesheet.
 *
 * Added on top of style.min.css to fix the issues listed in the accessibility
 * audit ("דוח נגישות - דיור מוגן רעות"), without hand-editing the generated
 * minified file. Each block below is labelled with the report item it fixes
 * so it can be cross-checked against the report.
 *
 * Loaded after main-style, so these rules can safely override it.
 */

/* ------------------------------------------------------------------ */
/* Item 2 — visible focus indicator on all interactive elements       */
/* ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.tab:focus-visible,
[role="tab"]:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px !important;
    border-radius: 2px;
}

/* Older browsers without :focus-visible support still get an outline */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus,
[role="tab"]:focus,
[role="button"]:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Item 1: the skip link already had its own show-on-focus style in
   style.min.css (#skiplinks a { opacity:0 } / &:focus { opacity:1 }) — no
   CSS change needed here, the actual bug was that focus never landed on
   main (fixed in accessibility-fixes.js). */

/* ------------------------------------------------------------------ */
/* Item 6 — open desktop submenus on keyboard focus, not just :hover  */
/* ------------------------------------------------------------------ */
.menu li.menu-item-has-children:focus-within > ul {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate(-50%, 0) !important;
}

/* ------------------------------------------------------------------ */
/* Item 9 — language switcher: readable label instead of bare "HE"    */
/* ------------------------------------------------------------------ */
.WPML-lngs .a11y-lang-text {
    margin-inline-start: 4px;
}

/* ------------------------------------------------------------------ */
/* Items 12/13 — accessible tabs (homes selector) keyboard/focus look */
/* ------------------------------------------------------------------ */
[role="tab"] {
    cursor: pointer;
}

[role="tab"][aria-selected="true"] {
    font-weight: bold;
}

/* ------------------------------------------------------------------ */
/* Item 19 — required form fields need a visible marker                */
/* ------------------------------------------------------------------ */
.a11y-required-mark {
    color: #c00;
    margin-inline-start: 2px;
}

.a11y-required-note {
    display: block;
    margin-bottom: 10px;
    font-size: .9em;
}

/* ------------------------------------------------------------------ */
/* Item 23 — visible inline error messages under form fields            */
/* ------------------------------------------------------------------ */
.a11y-field-error {
    display: block;
    color: #c00;
    font-size: .85em;
    margin-top: 4px;
}

/* ------------------------------------------------------------------ */
/* Item 29/30/31 — search overlay presented as an accessible dialog    */
/* ------------------------------------------------------------------ */
body.a11y-search-open #srchBox ~ * ,
body.a11y-search-open #TopWrap > *:not(#HeadFix),
body.a11y-search-open main#Content,
body.a11y-search-open footer {
    /* visual state only — actual focus containment handled in JS via inert/aria-hidden */
}

/* ------------------------------------------------------------------ */
/* Item 24 — social links converted to a semantic list (ul/li)         */
/* ------------------------------------------------------------------ */
ul.socials {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.socials li {
    display: flex;
}

/* ------------------------------------------------------------------ */
/* Item 6 (about page) — staff list converted to ul/li                 */
/* ------------------------------------------------------------------ */
ul.a11y-staff-list,
ul.a11y-plans-list,
ul.cardsBox,
ol.routesList {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.a11y-staff-list > li,
ul.a11y-plans-list > li {
    display: flex;
}

/* ------------------------------------------------------------------ */
/* Item 4 (about page) — gallery prev/next buttons: stronger contrast  */
/* against whatever photo happens to be behind them                    */
/* ------------------------------------------------------------------ */
.swiper-button.circle {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* ------------------------------------------------------------------ */
/* Item 35 — cookie banner policy link contrast                        */
/* ------------------------------------------------------------------ */
#MavilixCookiesBox .priv a {
    color: #eaf1ff !important;
    text-decoration: underline;
    font-weight: 600;
}

#MavilixCookiesBox .priv a:hover,
#MavilixCookiesBox .priv a:focus {
    color: #ffffff !important;
}

/* Note: .sr-only (visually-hidden-but-accessible utility) already exists
   in style.min.css and is reused throughout these fixes. */
