/*! Yam Nadlan accessibility layer - WCAG 2.2 AA. Own selectors are prefixed "ya-"; the rest are scoped to theme classes. Works alongside the existing accessibility toolbar. */

/* ---------- helpers ---------- */
.ya-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

/* ---------- skip links (2.4.1) ---------- */
#ya-skip { position: absolute; top: 0; inset-inline-start: 0; z-index: 2147483000; }
#ya-skip a { position: absolute; top: -200px; inset-inline-start: 8px; padding: 12px 20px; background: #0b2545; color: #fff !important; font: 700 16px/1.4 Arial, sans-serif; border-radius: 0 0 6px 6px; text-decoration: underline; white-space: nowrap; }
#ya-skip a:focus { top: 0; outline: 3px solid #ffbf47 !important; outline-offset: 0 !important; }

/* ---------- visible keyboard focus (2.4.7, 2.4.11, 2.4.13) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible, [role="button"]:focus-visible, .bootstrap-select .dropdown-toggle:focus-visible {
  outline: 3px solid #0b2545 !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px #ffffff !important;
}
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none !important; box-shadow: none !important; }
html { scroll-padding-top: 130px; } /* keep focused elements clear of the sticky header */

/* ---------- colour contrast (1.4.3 / 1.4.11) - brand colours are kept, only text colours change ---------- */
/* Coloured surfaces with white text: a11y.js measures each element's own background and adds .ya-dark-text
   only where white text is below 4.5:1 (the theme mixes a configurable primary colour with a hard-coded light blue). */
html body .ya-dark-text, html body .ya-dark-text a, html body .ya-dark-text address, html body .ya-dark-text i, html body .ya-dark-text span, html body .ya-dark-text div,
html body .mdl-button.ya-dark-text, html body .mdl-button.ya-dark-text:hover, html body .mdl-button.ya-dark-text:focus, html body input.ya-dark-text {
  color: #0b2545 !important;
}
html body .mdl-button.ya-dark-text, html body input.ya-dark-text { font-weight: 700 !important; }
/* hard-coded light blue (#29aae3) used as text on light backgrounds: 2.3-2.5:1 -> 5:1 (buttons inside the navy property cards keep the theme's white) */
body .mdl-button.mdl-button--primary-ghost, body .mdl-button--clear { color: #0a6699 !important; border-color: #0a6699 !important; }
body .mdl-button.mdl-button--primary-ghost:hover, body .mdl-button.mdl-button--primary-ghost:focus, body .mdl-button.mdl-button--primary-ghost:active { color: #0b2545 !important; }
body .mh-estate-vertical .mdl-button.mdl-button--primary-ghost, body .mh-estate-horizontal .mdl-button.mdl-button--primary-ghost { color: #fff !important; border-color: #fff !important; }
body .mh-estate-vertical .mdl-button.mdl-button--primary-ghost:hover, body .mh-estate-vertical .mdl-button.mdl-button--primary-ghost:focus, body .mh-estate-vertical .mdl-button.mdl-button--primary-ghost:active,
body .mh-estate-horizontal .mdl-button.mdl-button--primary-ghost:hover, body .mh-estate-horizontal .mdl-button.mdl-button--primary-ghost:focus, body .mh-estate-horizontal .mdl-button.mdl-button--primary-ghost:active { color: #134a83 !important; background: #fff !important; }
.mh-search .bootstrap-select .filter-option, .bootstrap-select .dropdown-toggle .filter-option { color: #0a5f8f !important; }
/* orange surfaces (#f3b66e): white text was 1.8:1 -> navy 8:1 */
.myform1 { color: #0b2545 !important; }
@media (min-width: 768px) {
  body .mh-estate-vertical .mh-estate-vertical__primary div, body .mh-estate-horizontal .mh-estate-horizontal__primary div { color: #0b2545 !important; }
}
/* orange text on white: 2.25:1 -> 5.6:1 */
#ten strong, [style*="#e99c43"]:not([style*="background"]), [style*="#E99C43"]:not([style*="background"]) { color: #9a5300 !important; }
/* main menu: white on the orange header texture was ~2:1 -> navy (same as the logo) */
@media (min-width: 1023px) {
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li > .item_link,
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li > .item_link *,
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li:hover > .item_link * { color: #0b2545 !important; font-weight: 700; }
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li > .item_link::after { border-top-color: #0b2545 !important; color: #0b2545 !important; }
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li > .item_link:hover .link_text,
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li > .item_link:focus .link_text,
  html body#myhome-app #mega_main_menu.mh-primary > .menu_holder > .menu_inner > ul > li.current-menu-item > .item_link .link_text { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link,
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link * { color: #0b2545 !important; }
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link:hover,
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link:focus,
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li.current-menu-item > .item_link { background: #0b2545 !important; }
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link:hover *,
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li > .item_link:focus *,
  html body#myhome-app #mega_main_menu.mh-primary .mega_dropdown > li.current-menu-item > .item_link * { color: #fff !important; }
}
@media (max-width: 1022px) {
  html body#myhome-app #mega_main_menu .mobile_toggle .mobile_button, html body#myhome-app #mega_main_menu .mobile_toggle .mobile_button i { color: #0b2545 !important; }
  html body#myhome-app #mega_main_menu .mobile_toggle { min-width: 44px; min-height: 44px; }
}

/* ---------- target size (2.5.8) ---------- */
.mh-footer__row__column p a, .mh-footer__row__column li a, .mh-footer-bottom a { display: inline-block; min-height: 24px; line-height: 1.5; padding-block: 3px; }
.mh-social-icon, .mh-top-header__element--social-icons a { min-width: 24px; min-height: 24px; display: inline-flex !important; align-items: center; justify-content: center; }
.mh-favorite-card button { min-width: 32px; min-height: 32px; }
/* in RTL the gallery "next" arrow sat underneath the "previous" arrow and could not be clicked */
.rtl .swiper-container-rtl > .swiper-button-next { right: auto !important; left: 10px !important; }

/* ---------- keyboard access to hover drop-downs (2.1.1) ---------- */
#mega_main_menu li.menu-item-has-children.ya-open > .mega_dropdown,
#mega_main_menu li.menu-item-has-children:focus-within > .mega_dropdown {
  display: block !important; visibility: visible !important; opacity: 1 !important; max-height: none !important; overflow: visible !important; transform: none !important; pointer-events: auto !important;
}

/* ---------- video pause control (2.2.2) ---------- */
.ya-video-btn { position: absolute !important; bottom: 100px; inset-inline-start: 18px; z-index: 50; width: 46px; height: 46px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(11, 37, 69, .92); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ya-video-btn:hover { background: #000; }
.ya-video-btn .ya-ico-pause { display: block; width: 14px; height: 16px; border-inline: 5px solid #fff; box-sizing: border-box; }
.ya-video-btn .ya-ico-play { display: none; width: 0; height: 0; border-block: 9px solid transparent; border-left: 15px solid #fff; margin-left: 4px; }
.ya-video-btn[data-state="paused"] .ya-ico-pause { display: none; }
.ya-video-btn[data-state="paused"] .ya-ico-play { display: block; }

/* ---------- respect the visitor's OS setting (2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
}

@media print { #ya-skip, .ya-video-btn { display: none !important; } }

/* ---------- footer icons: the updated theme prints inline SVG icons without any size rules ---------- */
.mh-svg-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: 0 0 24px; vertical-align: middle; margin-inline-end: 8px; }
.mh-svg-icon svg { display: block; width: 24px !important; height: 24px !important; max-width: none; }
.mh-social-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mh-social-icons .mh-social-icon { width: 44px; height: 44px; min-width: 44px; padding: 0; margin: 0; line-height: 1; }
.mh-social-icon svg { display: block; width: 24px !important; height: 24px !important; max-width: none; fill: currentColor; }
