/**
 * wcag.css
 *
 * WCAG 2.1 / 2.2 AA visual / layout fixes for the Officer Web application.
 * Loaded globally from MainLayout.html.
 *
 * Patches applied:
 *   1. Target Size (WCAG 2.5.8) – plain HTML form controls must be at least
 *      24 × 24 px.  Browser default inputs and selects typically render at
 *      ~21 px tall; we enforce min-height: 24px and matching vertical padding
 *      so the clickable/tappable surface meets the minimum without visually
 *      distorting the layout.
 *
 *      Scope: plain HTML <input> and <select> elements that are NOT wrapped /
 *      replaced by ExtJS (those carry .x-form-field which ExtJS sizes itself).
 *      We exclude hidden inputs and submit/button inputs which have no
 *      pointer-interaction target-size requirement.
 */

/* ── 1. Target Size: plain (non-ExtJS) text inputs and selects ─────────────── */
input:not(.x-form-field):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
select:not(.x-form-field) {
    min-height: 24px;
    box-sizing: border-box;
}

/* ── 2. Target Size: checkboxes and radio buttons ──────────────────────────── */
/* Native checkboxes/radios are often 13-16 px; wrap them in enough hit area.  */
input[type="checkbox"]:not(.x-form-checkbox):not(.x-form-radio),
input[type="radio"]:not(.x-form-radio) {
    min-width:  24px;
    min-height: 24px;
}

/* ── 3. Color Contrast: global navbar item labels (WCAG 1.4.3) ──────────────── */
/*
 * The gbnavbar renders all top-level link labels with color #d0deea — a light
 * blue-grey intentionally designed for the navbar's own dark backgrounds
 * (#121e28, #1e2d3a, #2b3b4d).  In this application the page/table background
 * (#ffffff or #eef2f5) shows through behind nav items, producing contrast as
 * low as 1.37:1 — far below the 4.5:1 AA threshold for small bold text.
 *
 * Fix: restore the navbar's own dark background (#1e2d3a) behind ALL top-level
 * nav item links AND their label spans.  Applying the background to both the
 * anchor and the span ensures that automated accessibility scanners (which
 * evaluate background color on the element itself, not only on ancestors) can
 * compute the correct contrast ratio.  #d0deea on #1e2d3a gives ~9.6:1 —
 * well above the 4.5:1 AA minimum.  No text color is changed.
 *
 * Selectors cover:
 *   – bucket-list top-level items  (.gbnavbar-bucket-list > li > a)
 *   – any other list item using gbnavbar-link-level-0
 */
.gbnavbar-list-item > .gbnavbar-link-level-0.gbnavbar-item-link,
.gbnavbar-bucket-list > .gbnavbar-list-item > .gbnavbar-item-link {
    background-color: #1e2d3a !important;
}

.gbnavbar-list-item > .gbnavbar-link-level-0.gbnavbar-item-link > .gbnavbar-item-link-label,
.gbnavbar-bucket-list > .gbnavbar-list-item > .gbnavbar-item-link > .gbnavbar-item-link-label {
    background-color: #1e2d3a !important;
    color: #d0deea !important;
}
