/* AC Accessibility Fix - stili tema-agnostici */

/* Screen-reader-only (utility standard WP) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    background: #fff;
    color: #000;
    display: block;
    font-size: 1rem;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.ac-skip-link {
    background: #000;
    color: #fff;
    padding: 10px 16px;
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
}
.ac-skip-link:focus {
    left: 10px;
    top: 10px;
    outline: 3px solid #005a9c;
}

/* 2.4.7 Focus visibile */
.ac-a11y-keyboard a:focus-visible,
.ac-a11y-keyboard button:focus-visible,
.ac-a11y-keyboard input:focus-visible,
.ac-a11y-keyboard select:focus-visible,
.ac-a11y-keyboard textarea:focus-visible,
.ac-a11y-keyboard [tabindex]:focus-visible {
    outline: 3px solid #005a9c !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px #fff !important;
}

/* 1.4.10 position:fixed responsive */
@media (max-width: 40rem) {
    .ac-a11y-fixed [style*="position: fixed"],
    .ac-a11y-fixed [style*="position:fixed"],
    .ac-a11y-fixed [class*="sticky-"]:not(body):not(html),
    .ac-a11y-fixed [class*="-sticky"]:not(body):not(html),
    .ac-a11y-fixed [class*="fixed-top"],
    .ac-a11y-fixed [class*="fixed-bottom"],
    .ac-a11y-fixed #topcontrol {
        position: static !important;
    }
}

/* 1.4.3 override contrasto generico su link/bottoni */
.ac-a11y-contrast a { text-decoration-skip-ink: auto; }
.ac-a11y-contrast a:not([class]):not(:hover) { text-decoration: underline; }

/* CookieYes */
.ac-tp-cookieyes .cky-btn,
.ac-tp-cookieyes .cky-title,
.ac-tp-cookieyes .cky-notice-des,
.ac-tp-cookieyes .cky-preference-center {
    color: #111 !important;
}
.ac-tp-cookieyes .cky-btn-customize,
.ac-tp-cookieyes .cky-btn-reject,
.ac-tp-cookieyes .cky-btn-preferences {
    background-color: #fff !important;
    color: #a00d1c !important;
    border-color: #a00d1c !important;
}
.ac-tp-cookieyes .cky-btn-accept {
    background-color: #a00d1c !important;
    color: #fff !important;
    border-color: #a00d1c !important;
}
.ac-tp-cookieyes .cky-footer-shadow { display: none !important; }

/* MyStickyWelcomeBar contrasto close */
.ac-tp-mysticky .mysticky-welcomebar-close { color: #fff !important; text-shadow: 0 0 2px rgba(0,0,0,.6); }

/* OneTap */
.ac-tp-onetap #onetap-language-list p span { color: #111 !important; }

/* Footer ribbon generico (Porto/altri) */
.ac-a11y-contrast .footer-ribbon { color: #fff !important; text-shadow: 0 0 2px rgba(0,0,0,.6); }

/* Injected submit button totally hidden but still submitabile */
button.ac-injected-submit {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
