/**
 * Burbuja Flotante de Accesibilidad — Formulario Becas IEmpresa
 * Diseño amigable inspirado en la referencia, con colores institucionales IEmpresa
 * y filtros reales SVG de daltonismo aplicados sobre #site-content.
 */

/* Enlace "Saltar al formulario" */
.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 100050;
    background: #002D56;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 45, 86, 0.35);
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 16px;
    outline: 3px solid #F15A24;
    outline-offset: 2px;
    color: #ffffff;
}

/* ========================================================================= */
/* CLASES DE ACCESIBILIDAD APLICADAS SOBRE #site-content                     */
/* ========================================================================= */
#site-content.a11y-high-contrast {
    background: #000000 !important;
    color: #ffff00 !important;
}

#site-content.a11y-high-contrast::before {
    display: none !important;
}

#site-content.a11y-high-contrast .form-container,
#site-content.a11y-high-contrast .stepper-rail,
#site-content.a11y-high-contrast .rail-tip,
#site-content.a11y-high-contrast .stepper,
#site-content.a11y-high-contrast .step,
#site-content.a11y-high-contrast .section-block,
#site-content.a11y-high-contrast .upload-card,
#site-content.a11y-high-contrast .upload-dropzone,
#site-content.a11y-high-contrast .policy-box,
#site-content.a11y-high-contrast .docs-notice {
    background: #111111 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
}

#site-content.a11y-high-contrast .form-header {
    background: #000000 !important;
    color: #ffff00 !important;
    border-bottom: 3px solid #ffff00 !important;
}

#site-content.a11y-high-contrast .section-title,
#site-content.a11y-high-contrast .section-title i,
#site-content.a11y-high-contrast .form-label,
#site-content.a11y-high-contrast .rail-heading,
#site-content.a11y-high-contrast .step-label,
#site-content.a11y-high-contrast .upload-meta h3,
#site-content.a11y-high-contrast .upload-meta p,
#site-content.a11y-high-contrast .dropzone-empty,
#site-content.a11y-high-contrast .dropzone-empty strong,
#site-content.a11y-high-contrast .policy-box .form-check-label,
#site-content.a11y-high-contrast .file-name {
    color: #ffff00 !important;
}

#site-content.a11y-high-contrast .step-sub,
#site-content.a11y-high-contrast .rail-tip,
#site-content.a11y-high-contrast .rail-tip i {
    color: #ffffff !important;
}

#site-content.a11y-high-contrast .step-item {
    opacity: 1 !important;
}

#site-content.a11y-high-contrast .step-item.active {
    background: #000000 !important;
    border: 2px solid #ffff00 !important;
    border-left: 5px solid #ffff00 !important;
    box-shadow: none !important;
}

#site-content.a11y-high-contrast .step-item.active::after {
    background: #000000 !important;
    border-top: 2px solid #ffff00 !important;
    border-right: 2px solid #ffff00 !important;
}

#site-content.a11y-high-contrast .step-circle {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

#site-content.a11y-high-contrast .step-item.active .step-circle {
    background: #ffff00 !important;
    color: #000000 !important;
    border-color: #ffff00 !important;
}

#site-content.a11y-high-contrast .step-item.completed .step-circle {
    background: #000000 !important;
    color: #00ffff !important;
    border-color: #00ffff !important;
}

#site-content.a11y-high-contrast .step-connector {
    background: #555555 !important;
}

#site-content.a11y-high-contrast .step-connector.completed {
    background: #ffff00 !important;
}

#site-content.a11y-high-contrast .form-control,
#site-content.a11y-high-contrast .form-select {
    background: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

#site-content.a11y-high-contrast .form-control::placeholder {
    color: #cbd5e1 !important;
    opacity: 1 !important;
}

#site-content.a11y-high-contrast .btn-brand {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
    box-shadow: none !important;
}

#site-content.a11y-high-contrast .btn-prev {
    background: #000000 !important;
    color: #00ffff !important;
    border: 2px solid #00ffff !important;
}

#site-content.a11y-high-contrast a {
    color: #00ffff !important;
}

#site-content.a11y-readable-font,
#site-content.a11y-readable-font input,
#site-content.a11y-readable-font select,
#site-content.a11y-readable-font button {
    font-family: Arial, Verdana, sans-serif !important;
    letter-spacing: 0.06em !important;
    word-spacing: 0.14em !important;
    line-height: 1.85 !important;
}

#site-content.a11y-highlight-links a,
#site-content.a11y-highlight-links button,
#site-content.a11y-highlight-links .upload-dropzone {
    outline: 3px solid #F15A24 !important;
    outline-offset: 2px !important;
}

#site-content.a11y-highlight-links a {
    background-color: #fde047 !important;
    color: #000000 !important;
    padding: 2px 6px;
    border-radius: 4px;
    text-decoration: underline !important;
}

#site-content.a11y-no-motion *,
#site-content.a11y-no-motion *::before,
#site-content.a11y-no-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

.a11y-speaking-active {
    outline: 3px dashed #F15A24 !important;
    background-color: rgba(241, 90, 36, 0.08) !important;
    border-radius: 6px;
}

/* Guía de lectura horizontal */
#a11y-reading-guide {
    display: none;
    position: fixed;
    left: 0;
    width: 100%;
    height: 18px;
    background: rgba(250, 204, 21, 0.34);
    border-top: 2px solid #eab308;
    border-bottom: 2px solid #eab308;
    pointer-events: none;
    z-index: 99998;
    transform: translateY(-50%);
}

/* ========================================================================= */
/* BURBUJA FLOTANTE Y PANEL DE ACCESIBILIDAD                                 */
/* ========================================================================= */
#a11y-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

#a11y-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, #002D56 0%, #0B4F8A 100%);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 45, 86, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    position: relative;
}

#a11y-toggle-btn:hover,
#a11y-toggle-btn:focus-visible {
    transform: scale(1.07);
    background: linear-gradient(135deg, #F15A24 0%, #FF8200 100%);
    outline: 3px solid #002D56;
    outline-offset: 2px;
}

.a11y-active-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #16a34a;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
}

#a11y-toggle-btn.has-active .a11y-active-dot {
    display: flex;
}

#a11y-panel {
    display: none;
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 336px;
    max-width: calc(100vw - 28px);
    max-height: 82vh;
    overflow-y: auto;
    background: #ffffff;
    color: #0A1F44;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(10, 31, 68, 0.22);
    border: 1px solid #DCE3EC;
    border-top: 4px solid #F15A24;
    padding: 16px;
}

#a11y-panel.open {
    display: block;
}

.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.a11y-header h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: #002D56;
    display: flex;
    align-items: center;
    gap: 7px;
}

.a11y-header h3 i {
    color: #F15A24;
}

.a11y-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748B;
    padding: 4px 8px;
    border-radius: 6px;
}

.a11y-close:hover {
    background: #F1F5F9;
    color: #0A1F44;
}

.a11y-section {
    margin-bottom: 14px;
}

.a11y-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #52627A;
    margin-bottom: 7px;
    display: block;
}

.a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.a11y-btn {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 9px 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #0A1F44;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.a11y-btn:hover {
    background: #FFF3EE;
    border-color: #F15A24;
    color: #002D56;
}

.a11y-btn.active {
    background: #002D56;
    color: #ffffff;
    border-color: #002D56;
}

.a11y-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 6px 10px;
}

.a11y-zoom-bar button {
    background: #EDF3F8;
    border: 1px solid #C6D8E8;
    border-radius: 8px;
    width: 36px;
    height: 32px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #002D56;
}

.a11y-zoom-bar button:hover {
    background: #F15A24;
    border-color: #F15A24;
    color: #ffffff;
}

.a11y-select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    font-size: 13px;
    font-weight: 600;
    color: #0A1F44;
}

.a11y-select:focus {
    outline: none;
    border-color: #002D56;
    box-shadow: 0 0 0 3px rgba(0, 45, 86, 0.12);
}

.a11y-reset {
    width: 100%;
    background: #FFF3EE;
    color: #D94814;
    border: 1px solid #FDD4C4;
    border-radius: 10px;
    padding: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.15s ease;
}

.a11y-reset:hover {
    background: #F15A24;
    color: #ffffff;
    border-color: #F15A24;
}

@media (max-width: 576px) {
    #a11y-widget {
        bottom: 14px;
        right: 14px;
    }

    #a11y-toggle-btn {
        width: 54px;
        height: 54px;
    }
}
