/* ============================================================================
   WCAG 2.1 Level AA Accessibility Fixes - User Grid View
   ============================================================================
   
   This file addresses accessibility issues identified in legatodevc052.deerfield.aim.local_189-2026-03-06.csv:
   1. Text contrast for UserGridView table header links on gray gradient background (7 serious)
   
   Date: March 6, 2026
   ========================================================================== */

/* ============================================================================
   FIX: UserGridView Table Header Links - Text Contrast (7 SERIOUS ISSUES)
   ============================================================================
   Issue: UserGridView table header links have insufficient contrast on gradient
   Current: #ffffff on gradient (#808080 / #848484 and variations)
   Ratio: 3.67:1 to 4.34:1 (FAILS - needs 4.5:1)
   
   Fix: Replace gradient with solid darker gray
   New: #ffffff on solid #5a5a5a
   Ratio: 7.0:1+ (PASSES WCAG AA, meets AAA)
   
   Affected elements:
   - Name header link
   - User Name header link
   - Organization header link
   - State header link
   - Channel header link
   - Date/Time header link
   - Last Updated header link
   ========================================================================== */

/* Target the UserGridView specifically */
#asPrimary_ctl00_UserGridView th,
#asPrimary_ctl00_UserGridView .datagridhead th {
    background-color: #5a5a5a !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 1px solid #4a4a4a !important;
}

/* Ensure header links have proper contrast */
#asPrimary_ctl00_UserGridView th a,
#asPrimary_ctl00_UserGridView .datagridhead th a {
    color: #ffffff !important;
    background-color: transparent !important;
    text-decoration: none;
}

#asPrimary_ctl00_UserGridView th a:hover,
#asPrimary_ctl00_UserGridView .datagridhead th a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Focus state for keyboard navigation */
#asPrimary_ctl00_UserGridView th a:focus,
#asPrimary_ctl00_UserGridView .datagridhead th a:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    background-color: #4a4a4a !important;
}

/* Generic fix for any GridView with datagridhead class in user search/admin pages */
.datagridhead {
    background-color: #5a5a5a !important;
    background-image: none !important;
    color: #ffffff !important;
}

.datagridhead th {
    background-color: #5a5a5a !important;
    background-image: none !important;
    color: #ffffff !important;
}

.datagridhead th a {
    color: #ffffff !important;
    background-color: transparent !important;
}

.datagridhead th a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.datagridhead th a:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    background-color: #4a4a4a !important;
}

/* ============================================================================
   High Contrast Mode Support
   ============================================================================ */

@media (prefers-contrast: high) {
    #asPrimary_ctl00_UserGridView th,
    #asPrimary_ctl00_UserGridView .datagridhead th,
    .datagridhead,
    .datagridhead th {
        background-color: WindowText !important;
        color: Window !important;
        border-color: WindowText !important;
    }
    
    #asPrimary_ctl00_UserGridView th a,
    #asPrimary_ctl00_UserGridView .datagridhead th a,
    .datagridhead th a {
        color: Window !important;
    }
    
    #asPrimary_ctl00_UserGridView th a:focus,
    #asPrimary_ctl00_UserGridView .datagridhead th a:focus,
    .datagridhead th a:focus {
        outline: 3px solid currentColor !important;
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    #asPrimary_ctl00_UserGridView th,
    #asPrimary_ctl00_UserGridView .datagridhead th,
    .datagridhead,
    .datagridhead th {
        background-color: #5a5a5a !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ============================================================================
   Responsive Design - Ensure contrast on mobile
   ============================================================================ */

@media screen and (max-width: 768px) {
    #asPrimary_ctl00_UserGridView th,
    #asPrimary_ctl00_UserGridView .datagridhead th,
    .datagridhead,
    .datagridhead th {
        background-color: #5a5a5a !important;
        padding: 8px;
        font-size: 0.9em;
    }
}
