/**
 * Ajcon Accessibility Fixer — base styles
 * Focus-ring colour/width are added inline from the settings page.
 */

/* ---------- Screen-reader-only text ---------- */
.ajcon-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;
}

/* ---------- Skip link (2.4.1) ---------- */
a.ajcon-skip-link:focus,
a.skip-link:focus {
    position: fixed !important;
    top: 8px !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    z-index: 2147483647 !important;
    background: #ffffff !important;
    color: #0b2a4a !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    text-decoration: underline !important;
    transition: none !important;   /* theme animates "all" — the link used to fly in from -10000em */
}

/* ---------- Drop-down menus opened from the keyboard (2.1.1) ---------- */
li.ajcon-open > ul,
li.ajcon-open > .sub-menu,
li.ajcon-open > .dropdown-menu,
li.ajcon-open > .children {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* ---------- Entrance animations never hide content from keyboard users ---------- */
html.ajcon-kbd .elementor-invisible {
    visibility: visible !important;
}

/* ---------- Scrolling tickers hold still while hovered or focused (2.2.2) ---------- */
.wdt-animation-holder:hover *,
.wdt-animation-holder:focus-within *,
[class*="marquee"]:hover *,
[class*="marquee"]:focus-within *,
[class*="marqee"]:hover *,
[class*="marqee"]:focus-within * {
    animation-play-state: paused !important;
}

/* ---------- Motion control (2.2.2) ---------- */
#ajcon-motion-toggle {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 99998;
}
#ajcon-pause-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;                 /* 2.5.8 target size */
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 4px;
    padding: 8px 14px;
    font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
#ajcon-pause-btn:hover {
    background: #000000;
}
#ajcon-pause-btn[data-paused="true"] {
    background: #0b4f9c;
    border-color: #ffffff;
}

/* prefers-reduced-motion: stop decorative motion for users who asked the OS for it */
@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;
    }
    .elementor-invisible {
        visibility: visible !important;
    }
}

/* User pressed "Pause animations" */
html.ajcon-motion-paused *,
html.ajcon-motion-paused *::before,
html.ajcon-motion-paused *::after {
    animation-play-state: paused !important;
    scroll-behavior: auto !important;
}
html.ajcon-motion-paused .elementor-invisible {
    visibility: visible !important;
}
html.ajcon-motion-paused marquee {
    display: block;
    overflow: hidden;
}

/* ---------- Form errors (3.3.1 / 3.3.3) ---------- */
[aria-invalid="true"]:not(form) {
    border-color: #b00020 !important;
}
