
/* LMIS Inclusive Digital Access */

#lmis-accessibility {
    --a11y-green: #0b3d24;
    --a11y-gold: #e0b23f;
    position: relative;
    z-index: 99990;
    font-family: Arial, sans-serif;
}

#lmis-accessibility [hidden] {
    display: none !important;
}

#lmis-a11y-toggle {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 2px solid #e0b23f;
    border-radius: 50%;
    background: #0b3d24;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px #0004;
    transition: transform .2s;
}

#lmis-a11y-toggle:hover {
    transform: scale(1.08);
}

#lmis-a11y-panel {
    position: fixed;
    right: 20px;
    bottom: 160px;
    width: min(365px, calc(100vw - 24px));
    max-height: min(72vh, 720px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: #24352a;
    border: 1px solid #d8e4dc;
    border-radius: 18px;
    box-shadow: 0 18px 65px #0004;
    animation: lmisA11yIn .25s ease-out;
}

@keyframes lmisA11yIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lmis-a11y-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b3d24;
    color: white;
    padding: 18px;
    border-bottom: 3px solid #e0b23f;
}

.lmis-a11y-header h2 {
    color: white;
    font-size: 21px;
    margin: 0 0 5px;
}

.lmis-a11y-header small {
    color: #e0b23f;
}

#lmis-a11y-close {
    border: 0;
    background: transparent;
    color: white;
    font-size: 29px;
    cursor: pointer;
}

.lmis-a11y-body {
    padding: 18px;
}

.lmis-a11y-body label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin: 12px 0 8px;
}

.lmis-a11y-body select {
    width: 100%;
    padding: 12px;
    border: 1px solid #bacfc0;
    border-radius: 8px;
    background: #fff;
    color: #183e29;
    font-size: 15px;
}

.lmis-a11y-body input[type="range"] {
    width: 100%;
    accent-color: #17643d;
}

.lmis-a11y-body h3 {
    font-size: 14px;
    color: #0b3d24;
    margin: 20px 0 10px;
}

.lmis-a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
}

.lmis-a11y-grid button,
.lmis-a11y-full {
    border: 1px solid #cdded2;
    border-radius: 9px;
    background: #f0f7f2;
    color: #0b3d24;
    min-height: 44px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lmis-a11y-grid button:hover,
.lmis-a11y-full:hover,
.lmis-a11y-grid button[aria-pressed="true"] {
    background: #0b3d24;
    color: #fff;
}

.lmis-a11y-full {
    width: 100%;
}

.lmis-a11y-reset {
    margin-top: 12px;
}

#lmis-a11y-status {
    font-size: 13px;
    line-height: 1.5;
    color: #335344;
}

#lmis-sign-video {
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

/* Keyboard focus visibility */

:focus-visible {
    outline: 3px solid #d7ac35 !important;
    outline-offset: 4px !important;
}

/* High contrast */

html.lmis-high-contrast body,
html.lmis-high-contrast body * {
    color: #fff !important;
    background-color: #000 !important;
    border-color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.lmis-high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

html.lmis-high-contrast :focus-visible {
    outline-color: #ffff00 !important;
}

html.lmis-high-contrast section,
html.lmis-high-contrast main,
html.lmis-high-contrast button {
    background-image: none !important;
}

/* Enhanced reading spacing */

html.lmis-text-spacing p,
html.lmis-text-spacing li,
html.lmis-text-spacing td,
html.lmis-text-spacing a {
    letter-spacing: .12em !important;
    word-spacing: .16em !important;
    line-height: 1.8 !important;
}

html.lmis-highlight-links a {
    text-decoration: underline !important;
    outline: 1px solid currentColor;
    outline-offset: 2px;
}

/* Reduced animation */

html.lmis-reduce-motion *,
html.lmis-reduce-motion *::before,
html.lmis-reduce-motion *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

html.lmis-reduce-motion .dex__network,
html.lmis-reduce-motion canvas.dex__network {
    visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
    #lmis-accessibility *,
    #lmis-accessibility *::before,
    #lmis-accessibility *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 600px) {
    #lmis-a11y-toggle {
        right: 12px;
        bottom: 75px;
        width: 52px;
        height: 52px;
    }

    #lmis-a11y-panel {
        right: 12px;
        bottom: 140px;
        max-height: 68vh;
    }
}



/* LMIS Phase 6 voice enhancements */

#lmis-voice-info {
    padding: 10px;
    margin: 8px 0;
    background: #f0f7f2;
    color: #0b3d24;
    border-left: 3px solid #e0b23f;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

#lmis-a11y-status:not(:empty) {
    padding: 10px;
    border: 1px solid #cdded2;
    border-radius: 8px;
    background: #f0f7f2;
    overflow-wrap: anywhere;
}

