/*
 * Barra de accesibilidad - Lineamientos MinTIC (Resolución 1519 de 2020, Anexo 1 / WCAG 2.1 AA)
 * Contraste, tamaño de letra, Centro de Relevo y enlace "Ir al contenido".
 */

/* ---- Enlace saltar al contenido ---- */
.acc-saltar-contenido {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 10px 16px;
    background: #3F7A28; /* verde SEPEC oscurecido: contraste 5.2:1 con texto blanco */
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
}

.acc-saltar-contenido:focus {
    left: 10px;
    top: 10px;
    outline: 3px solid #ffbf47;
}

/* ---- Barra flotante ---- */
.acc-barra {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: #3F7A28; /* verde SEPEC oscurecido: contraste 5.2:1 con texto blanco */
    border-radius: 8px 0 0 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.acc-barra .acc-boton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    background: transparent;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.acc-barra .acc-boton:last-child {
    border-bottom: 0;
}

.acc-barra .acc-boton:hover,
.acc-barra .acc-boton[aria-pressed="true"] {
    background: #2C5A1B;
    color: #fff;
}

.acc-barra .acc-boton:focus {
    outline: 3px solid #ffbf47;
    outline-offset: -3px;
}

.acc-barra .acc-boton svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.acc-solo-lectores {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Indicación de foco visible en toda la página (WCAG 2.4.7) */
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: 2px solid #ffbf47;
    outline-offset: 1px;
}

/* ---- Modo alto contraste ---- */
html.acc-alto-contraste,
html.acc-alto-contraste body,
html.acc-alto-contraste body *:not(.acc-barra):not(.acc-boton):not(svg):not(path):not(img) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.acc-alto-contraste body a,
html.acc-alto-contraste body a *,
html.acc-alto-contraste body .btn-link {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

html.acc-alto-contraste body button:not(.acc-boton),
html.acc-alto-contraste body .btn,
html.acc-alto-contraste body input[type=submit],
html.acc-alto-contraste body input[type=button] {
    border: 2px solid #ffff00 !important;
    color: #ffff00 !important;
}

html.acc-alto-contraste body input,
html.acc-alto-contraste body select,
html.acc-alto-contraste body textarea {
    border: 1px solid #fff !important;
}

html.acc-alto-contraste body ::placeholder {
    color: #ccc !important;
}

html.acc-alto-contraste body img {
    filter: grayscale(100%) contrast(120%);
}

html.acc-alto-contraste body .acc-barra {
    background: #000 !important;
    border: 2px solid #ffff00 !important;
    border-right: 0 !important;
}

html.acc-alto-contraste body .acc-barra .acc-boton {
    background: #000 !important;
    color: #ffff00 !important;
    border: 0 !important;
    border-bottom: 1px solid #ffff00 !important;
    text-decoration: none !important;
}

html.acc-alto-contraste body .acc-barra .acc-boton[aria-pressed="true"],
html.acc-alto-contraste body .acc-barra .acc-boton:hover {
    background: #ffff00 !important;
    color: #000 !important;
}

@media print {
    .acc-barra, .acc-saltar-contenido {
        display: none !important;
    }
}

#contenido-principal:focus {
    outline: none;
}
