/* Modern Forced Colors Mode CSS - Updated for new standard */
/* This file provides modern alternatives to deprecated -ms-high-contrast */

/* Modern forced-colors media query - replaces deprecated -ms-high-contrast */
@media (forced-colors: active) {
    /* High contrast mode styles */
    body {
        background: Canvas;
        color: CanvasText;
    }
    
    a {
        color: LinkText;
    }
    
    a:visited {
        color: VisitedText;
    }
    
    button {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonText;
    }
    
    input, select, textarea {
        background: Field;
        color: FieldText;
        border: 1px solid FieldText;
    }
    
    /* Ensure proper contrast for brand elements */
    .bem__title, .fcbd00 {
        color: Highlight;
    }
    
    /* OneTrust and other third-party elements */
    .onetrust-pc-sdk, .ot-sdk-container {
        background: Canvas;
        color: CanvasText;
        border: 1px solid CanvasText;
    }
    
    /* Additional modern forced colors support */
    .highlight, .focus {
        forced-color-adjust: none;
        background-color: Highlight;
        color: HighlightText;
    }
}

/* Legacy browser support - Maintains compatibility while providing modern alternatives */
/* These rules provide fallback support for older browsers using deprecated -ms-high-contrast */
@media (-ms-high-contrast: active) {
    body {
        background: window;
        color: windowtext;
    }
    
    a {
        color: highlight;
    }
    
    button {
        background: buttonface;
        color: buttontext;
        border: 1px solid buttontext;
    }
    
    input, select, textarea {
        background: window;
        color: windowtext;
        border: 1px solid windowtext;
    }
}

@media (-ms-high-contrast: black-on-white) {
    body { background: white; color: black; }
    a { color: #0000EE; }
}

@media (-ms-high-contrast: white-on-black) {
    body { background: black; color: white; }
    a { color: #FFFF00; }
}

/* Fallback for browsers that support prefers-contrast but not forced-colors */
@media (prefers-contrast: high) {
    body {
        background-color: white;
        color: black;
    }
    
    a {
        color: blue;
        text-decoration: underline;
    }
    
    button {
        background-color: #f0f0f0;
        color: black;
        border: 1px solid black;
    }
}
