/**
 * Accessibility — assets/css/accessibility.css
 * WCAG 2.1 AA compliance styles: skip links, screen reader text, focus indicators,
 * reduced motion, and high contrast mode support.
 *
 * @package  DEI4SME
 * @used-in  header.php (.skip-link), all interactive elements globally
 * @see      00_product_documentation/accessibility-plan.md
 * @see      .windsurf/rules/accessibility.md
 *
 * SELECTORS:
 *   .skip-link              — Hidden skip-to-content link, visible on :focus (header.php line 11)
 *   .screen-reader-text     — Visually hidden but screen-reader-accessible content
 *   :focus-visible           — 3px solid --color-primary outline on keyboard focus
 *   .using-mouse :focus     — Suppressed outline for mouse users (requires JS class toggle)
 *   @prefers-reduced-motion — Disables all animations/transitions for motion-sensitive users
 *   @forced-colors          — Adds explicit borders for Windows High Contrast Mode
 */

/* === Skip Link === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 999;
    padding: 15px 23px 14px;
    background-color: #f1f1f1;
    color: #21759b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
}

.skip-link:focus {
    top: 0;
}

/* === Screen Reader Text === */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* === Focus Styles (WCAG 2.1 AA) === */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
.using-mouse :focus {
    outline: 0;
}

.using-mouse ::-moz-focus-inner {
    border: 0;
}

/* === Reduced Motion (WCAG 2.3.3) === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === High Contrast Mode Support === */
@media (forced-colors: active) {
    .btn,
    .partner-card__links a {
        border: 1px solid ButtonText;
    }

    .partner-card {
        border: 2px solid ButtonText;
    }
}
