/*
 * WÖRTH Selection · asistente de accesibilidad (js/ws-a11y.js)
 * Barra superior con herramientas, como la de Michael Page.
 */

.ws-a11y-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #DCE3DF;
    box-shadow: 0 6px 18px rgba(15, 59, 46, .08);
    color: #0F3B2E;
    -webkit-text-fill-color: currentColor;
    line-height: 1.3;
    font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

.ws-a11y-bar[hidden] {
    display: none;
}

.ws-a11y-bar__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 0 max(18px, calc((100% - 1150px) / 2));
}

.ws-a11y-bar__title {
    flex: 0 0 auto;
    font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0F3B2E;
}

.ws-a11y-bar__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    padding: 12px 2px;
    scrollbar-width: thin;
}

.ws-a11y-bar__sep {
    flex: 0 0 1px;
    align-self: stretch;
    margin: 4px 4px;
    background: #DCE3DF;
}

.ws-a11y-bar .ws-a11y-bar__btn {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #0F3B2E;
    border-radius: 8px;
    background: #0F3B2E;
    color: #fff;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ws-a11y-bar .ws-a11y-bar__btn:hover {
    background: #1A5543;
}

.ws-a11y-bar .ws-a11y-bar__btn[aria-pressed="true"] {
    background: #C8A574;
    border-color: #C8A574;
    color: #0F3B2E;
}

.ws-a11y-bar .ws-a11y-bar__btn:disabled {
    opacity: .4;
    cursor: default;
}

.ws-a11y-bar .ws-a11y-bar__btn:focus-visible {
    outline: 3px solid #C8A574;
    outline-offset: 2px;
}

.ws-a11y-bar .ws-a11y-bar__close {
    margin-left: auto;
    border-color: #DCE3DF;
    border-radius: 50%;
    background: #fff;
    color: #0F3B2E;
}

.ws-a11y-bar .ws-a11y-bar__close:hover {
    background: #F1F5F3;
}

.ws-a11y-bar__notice {
    margin: 0;
    padding: 10px max(18px, calc((100% - 1150px) / 2));
    background: #FFF7E6;
    border-top: 1px solid #F0E2C2;
    font-size: 15px;
    color: #0F3B2E;
}

@media (max-width: 700px) {
    .ws-a11y-bar__title {
        display: none;
    }

    .ws-a11y-bar__inner {
        gap: 8px;
        min-height: 64px;
    }

    .ws-a11y-bar .ws-a11y-bar__btn {
        width: 42px;
        height: 42px;
    }
}

/* ---------- Efectos sobre la página (la barra no cambia) ---------- */

html.ws-a11y-zoom body > :not(.ws-a11y-bar):not(.ws-a11y-guide) {
    zoom: var(--ws-a11y-zoom, 1);
}

html.ws-a11y-font body :not(.ws-a11y-bar):not(.ws-a11y-bar *):not(svg):not(svg *) {
    font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
    letter-spacing: .03em !important;
    word-spacing: .12em !important;
    line-height: 1.7 !important;
}

html.ws-a11y-gray body > :not(.ws-a11y-bar):not(.ws-a11y-guide) {
    filter: grayscale(1);
}

/* Alto contraste: fondo negro, texto blanco y enlaces amarillos */
html.ws-a11y-contrast body,
html.ws-a11y-contrast body :not(.ws-a11y-bar):not(.ws-a11y-bar *):not(svg):not(svg *):not(img) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
}

html.ws-a11y-contrast body a:not(.ws-a11y-bar):not(.ws-a11y-bar *):not(svg):not(svg *):not(img),
html.ws-a11y-contrast body a :not(.ws-a11y-bar):not(.ws-a11y-bar *):not(svg):not(svg *):not(img) {
    color: #FFE34D !important;
    -webkit-text-fill-color: #FFE34D !important;
}

html.ws-a11y-contrast body img:not(.ws-a11y-bar *) {
    background: #fff;
    border-radius: 4px;
}

html.ws-a11y-contrast body svg:not(.ws-a11y-bar *) {
    color: #fff;
}

html.ws-a11y-links body a:not(.ws-a11y-bar *) {
    outline: 3px solid #FFD400 !important;
    outline-offset: 2px;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

html.ws-a11y-cursor,
html.ws-a11y-cursor body * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 8-6.5 2L9 19z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

html.ws-a11y-still *,
html.ws-a11y-still *::before,
html.ws-a11y-still *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

.ws-a11y-guide {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 44px;
    pointer-events: none;
    border-top: 3px solid #C8A574;
    border-bottom: 3px solid #C8A574;
    background: rgba(200, 165, 116, .12);
    box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .28);
}

.ws-a11y-reading {
    background: #FFF1B8 !important;
    color: #0F3B2E !important;
    -webkit-text-fill-color: #0F3B2E !important;
    border-radius: 4px;
    box-shadow: 0 0 0 4px #FFF1B8 !important;
}
