/* ==========================================================================
   Accessibility (WCAG 2.2 AA) fixes -- H30-27437 epic
   ==========================================================================
   Every CSS-only fix produced by this epic lives here, not in common.css or
   any other stylesheet. If accessibility CSS ever needs to be pulled out,
   removing this one file (and its <link> in templates/element/includes.php)
   is the entire rollback.

   Load order: this file must be linked AFTER common.css (see includes.php).
   Some rules below intentionally reuse a selector that also exists in
   common.css with a different value (e.g. .main-sidebar a) -- the override
   here wins because it loads later, at equal specificity. Do not reorder.
   ========================================================================== */

/* ---- H30-27448: Assessment View/Detail page ---- */

/* Overrides .add-arrest-badge/.add-arrest-email label text color (was
   #9999ab in common.css, 2.47:1 on the #f1f1f1 badge background -- fails
   WCAG 1.4.3). Reuses the #595959 grey already established below. Only
   the label color changes; the value `span` inside stays #000000. */
.add-arrest-badge, .add-arrest-email {
    color: #595959;
}

/* ---- H30-27438 / H30-27439: login flow + forgot password ---- */

button.resendCode {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
}
button.resendCode:disabled {
    cursor: not-allowed;
}

/* Overrides .authAbout.grayText: the shared .grayText color (#9999ab,
   ~2.9:1 on white) fails WCAG 1.4.3. Scoped to the auth-flow subtitle
   lines only, not the global .grayText class. */
.authAbout.grayText {
    color: #595959;
}

/* Scoped focus-visible indicator: forgot_password.php only. .btnBlue:focus
   in common.css renders identical to its resting/hover state, and .btnBlue
   is also used app-wide outside the login family, so it isn't edited
   directly. The .fpSubmitBtn class (added only on this template's Submit
   button) raises selector specificity above .btnBlue:focus so this ring
   wins regardless of source order. */
.btnBlue.fpSubmitBtn:focus {
    outline: 3px solid #0b2aa8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(11, 42, 168, 0.45);
}

/* Scoped focus-visible indicator: forgot_password.php only. .authFooter
   .withoutBg:focus in common.css renders identical to its resting state.
   The .fpBackToLoginLink class (added only on this template's "Back To
   Login" link) raises selector specificity so this outline + underline
   wins regardless of source order. */
.authFooter .withoutBg.fpBackToLoginLink:focus {
    outline: 3px solid #0f33e7;
    outline-offset: 2px;
    text-decoration: underline;
}

/* Overrides .formGroupCover label color (was #B6B6C6 in common.css,
   ~1.6:1 on white -- fails WCAG 1.4.3). .formGroupCover is used app-wide,
   so this fix is intentionally global rather than page-scoped. */
.formGroupCover label {
    color: #595959;
}

/* Overrides part of .input_custom_disabled (base rule stays in
   common.css): disabled input text was invisible-low-contrast at default
   browser opacity. */
.input_custom_disabled {
    color: #595959 !important;
    opacity: 1 !important;
}

.authOrDivider {
    color: #595959;
}

.otpHelperText {
    color: #595959;
}

/* ---- H30-27440: reset password ---- */

/* Scoped focus-visible indicator: reset_password.php only. Same pattern
   as .fpSubmitBtn above, via the .rpSubmitBtn class. */
.btnBlue.rpSubmitBtn:focus {
    outline: 3px solid #0b2aa8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(11, 42, 168, 0.45);
}

/* Scoped focus-visible indicator: reset_password.php only. Same pattern
   as .fpBackToLoginLink above, via the .rpBackToLoginLink class. */
.authFooter .withoutBg.rpBackToLoginLink:focus {
    outline: 3px solid #0f33e7;
    outline-offset: 2px;
    text-decoration: underline;
}

/* Scoped focus-visible indicator: reset_password.php only.
   .formGroupCover .form-control:focus in common.css renders identical to
   its resting state, and .formGroupCover is used app-wide, so this isn't
   edited directly. The .rpPasswordInput class (added only on this
   template's password inputs) raises selector specificity so this ring
   wins regardless of source order. */
.formGroupCover .form-control.rpPasswordInput:focus {
    outline: 3px solid #0b2aa8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(11, 42, 168, 0.45);
}

/* Scoped placeholder-contrast fix: reset_password.php only. Default
   placeholder colour computes to ~2.82:1 against white, below the 4.5:1
   minimum (SC 1.4.3). Page-scoped selector avoids touching the shared
   `.formGroupCover .form-control::placeholder` rule in common.css. */
.formGroupCover .form-control.rpPasswordInput::placeholder {
    color: #595959;
}

/* reset_password.php corrects its heading hierarchy (h1 .authWelcone ->
   h2 "Password Rules"; was an un-headed div followed by an orphan h3 with
   no h1/h2 above it). change_password.php still renders this same block's
   heading as <h3> (.passwordRules h3 stays in common.css, untouched) --
   this is an additive rule for the new <h2> used only on
   reset_password.php. */
.passwordRules h2 {
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 10px;
    font-family: 'Avenir Next LT Pro', sans-serif;
}

/* ---- H30-27441: dashboard (home) page ---- */

/* Overrides .main-sidebar a / [class*='sidebar-dark-'] .sidebar a color
   (was #9999ab/#9999AB in common.css, ~2.9:1 on white -- fails WCAG
   1.4.3). Reuses the #595959 grey already established above. */
.main-sidebar a {
    color: #595959;
}
[class*='sidebar-dark-'] .sidebar a {
    color: #595959;
}

/* Overrides .navigationText.grayText: same .grayText contrast issue as
   .authAbout.grayText above, scoped to the sidebar nav label. */
.navigationText.grayText {
    color: #595959;
}

/* App-wide visible focus indicator for keyboard navigation (WCAG 2.4.7). */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #0F33E7;outline-offset:2px;}

/* Skip-to-main-content link (WCAG 2.4.1). */
.skip-link{position:absolute;top:-40px;left:0;background:#0F33E7;color:#fff;padding:8px 16px;z-index:10000;transition:top .2s ease-in-out;}
.skip-link:focus{top:0;}

/* Overrides .footerCover span a / :hover: link sat inline with plain text,
   distinguished only by color (WCAG 1.4.1). Underline gives a non-color
   cue. Base color rule stays in common.css. */
.footerCover span a, .footerCover span a:hover {
    text-decoration: underline;
}

/* ---- H30-27443: DV Assessments List page ---- */
/* Color-contrast fixes (action buttons, field labels, risk badges, Edit
   History badge, pagination footer, Select label) to meet WCAG 4.5:1
   minimum, scoped to .dvAssessmentsList so the global .grayText/.riskGreen/
   .btnGray/etc rules used elsewhere in the app are untouched. */
.dvAssessmentsList .grayText,
.dvAssessmentsList .graySubtitle {
    color: #595959;
}

.dvAssessmentsList .riskYellow {
    /* H30-27449: #976500 measured 4.285:1 on the #f1eddd badge background --
       fails the 4.5:1 minimum by a hair. Darkened to pass (5.124:1). */
    color: #875a00;
}

.dvAssessmentsList .riskGreen {
    /* H30-27449: #357822 measured 4.30:1 on the #d4eadc badge background --
       fails the 4.5:1 minimum by a hair. Darkened to pass (5.054:1). */
    color: #2f6c1e;
}

.dvAssessmentsList .btnGray {
    background-color: #74747F;
}

.dvAssessmentsList .btn-blue-light {
    background-color: #417AB2 !important;
}

.dvAssessmentsList .editHistory {
    background-color: #417AB2;
}

.dvAssessmentsList .filterOptions .selectAll .custom-control-label {
    color: #74747F;
}

/* H30-27449: the rule above was written as `.dvAssessmentsList.listingPagination`
   (compound selector, no space) -- it requires both classes on the SAME
   element, but `.listingPagination` is always a sibling div rendered outside
   the AJAX-loaded `.dvAssessmentsList` container (see templates/Admin/Assessments/
   tempassessment.php and templates/Admin/AssessmentsList/tempassessment.php),
   never a descendant of it. The rule could never match on any page, so the
   #ffffff-on-#9b9ba7 footer (2.74:1) was still failing everywhere this
   pagination footer is used. `.listingPagination` is a single-purpose class
   (the grid pagination footer only), so fixing it unscoped is safe. */
.listingPagination {
    background-color: #6F6F78;
}

/* ---- H30-27450: My Assessments (Supplemental) page ---- */
/* Same color-contrast defect and same fix values as the .dvAssessmentsList
   block above (H30-27443/H30-27449) -- Filters/Flag/Print/Export button
   backgrounds and the "Select" checkbox label all fell short of 4.5:1 here
   too, on templates/Admin/AssessmentsList/myassessment.php. This page's
   action buttons and Select label sit in markup rendered directly by
   myassessment.php (outside the .dvAssessmentsList-scoped
   supplement_assessment_list.php element and assessment_filter.php
   offcanvas), so the existing .dvAssessmentsList rules never reached them.
   Scoped to a new .mySupplementalList class added to this page's two
   wrapper divs, mirroring the existing convention instead of widening
   .dvAssessmentsList's reach onto content it doesn't structurally own. */
.mySupplementalList .grayText,
.mySupplementalList .graySubtitle {
    color: #595959;
}

.mySupplementalList .btnGray {
    background-color: #74747F;
}

.mySupplementalList .btn-blue-light {
    background-color: #417AB2 !important;
}

.mySupplementalList .filterOptions .selectAll .custom-control-label {
    color: #74747F;
}

/* ---- H30-27451: Pending Edit Requests List page ---- */
/* Same .grayText contrast defect as .dvAssessmentsList/.mySupplementalList
   above, plus the Pending/Approved request-count labels (Bootstrap
   .text-warning #ffc107 measured 1.63:1, .text-success #28a745 measured
   3.13:1 on white) and the Reject/Cancel Request .btnGray buttons, all on
   templates/element/edit_request_list.php and
   templates/Admin/AssessmentsList/pending_detail.php. Scoped to the new
   .editRequestsList/.pendingEditDetail wrapper classes so the global
   .text-warning/.text-success/.btnGray rules used elsewhere are untouched. */
.editRequestsList .grayText {
    color: #595959;
}

.editRequestsList .text-warning {
    /* adminlte.min.css defines .text-warning with !important, so the
       override needs it too. */
    color: #7a5900 !important;
}

.editRequestsList .text-success {
    color: #1e7e34 !important;
}

.pendingEditDetail .btnGray {
    background-color: #74747F;
}

/* ---- H30-27452: Pending Edit Request Detail page ---- */
/* .btn:focus{outline:0} in the admin theme CSS beats the app-wide
   button:focus-visible rule above (higher specificity: two classes vs
   one element + pseudo-class), so the four action buttons per field row
   (View Comments, View Edit History, Approve, Reject) showed no visible
   focus indicator at all when tabbing. Approve/Reject's resting-state
   box-shadow is static (identical focused vs unfocused), so it doesn't
   double as a focus cue either. Scoped to .pendingEditDetail so other
   .btn usage elsewhere is untouched. */
.pendingEditDetail .btn:focus-visible {
    outline: 3px solid #0F33E7;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 51, 231, 0.35);
}

/* ---- H30-27453: Pending Delete Requests List page ---- */
/* Same .grayText and Bootstrap .text-warning contrast defects as
   .editRequestsList above (this page's "Status:" label and "Pending" badge
   reuse the same classes), plus the Decline/Cancel action divs -- same
   #B6B6C6-on-white 2:1 failure as the .btnGray buttons fixed on the other
   list pages. Scoped to the new .deleteRequestsList wrapper class on
   templates/element/delete_request_list.php so the global rules used
   elsewhere are untouched. */
.deleteRequestsList .grayText {
    color: #595959;
}

.deleteRequestsList .text-warning {
    /* adminlte.min.css defines .text-warning with !important, so the
       override needs it too. */
    color: #7a5900 !important;
}

.deleteRequestsList .btnGray {
    background-color: #74747F;
}

/* ---- H30-27464: Alerts List page ---- */
/* Same color-contrast defect family as the list pages above, on
   templates/Admin/Alerts/index.php, templates/element/alert_filter.php and
   the alert rows rendered into #list (templates/element/alert_list.php /
   alerts/dynamic_alert.php / alerts/arrest_alert.php). Scoped to a new
   .myAlertsList class added to this page's two content wrapper divs and to
   the alert_filter.php offcanvas root, so the global .btnGray/.btn-blue-light/
   .riskGreen/.riskRed/.graySubtitle rules used elsewhere are untouched. */
.myAlertsList .graySubtitle {
    color: #595959;
}

.myAlertsList .btnGray {
    background-color: #74747F;
}

.myAlertsList .btn-blue-light {
    background-color: #417AB2 !important;
}

.myAlertsList .filterOptions .selectAll .custom-control-label {
    color: #74747F;
}

/* #3A8425 measured 3.89:1 on this page's #e0efdc badge background -- fails
   the 4.5:1 minimum. Reuses the #2f6c1e value already validated at 5.054:1
   on the same background shade in H30-27449 (measures 5.343:1 here). */
.myAlertsList .riskGreen {
    color: #2f6c1e;
}

/* #E93D3D measured 3.47:1 on this page's #ffe9e9 badge background -- fails
   the 4.5:1 minimum. Darkened to pass (6.2:1). No prior .riskRed override
   existed to reuse -- this is the first page in the epic to hit it. */
.myAlertsList .riskRed {
    color: #b30000;
}

/* ---- H30-27465: Alert Add/Edit form ---- */
/* Same color-contrast defect family, on templates/Admin/Alerts/add.php and
   edit.php. Scoped to the pages' existing .activAlertMain wrapper so the
   global .btnGray/.riskGreen/.riskRed/.riskYellow/.themeBtnDark-yellow
   rules used elsewhere are untouched. */
.activAlertMain .btnGray {
    background-color: #74747F;
}

/* #3A8425 measured 3.89:1 on this page's #e0efdc badge background -- fails
   the 4.5:1 minimum. Reuses the #2f6c1e value already validated at 5.054:1
   on the same background shade in H30-27449/H30-27464. */
.activAlertMain .riskGreen {
    color: #2f6c1e;
}

/* #E93D3D measured 3.47:1 (bold) on this page's #ffe9e9 badge background --
   fails the 4.5:1 minimum. Reuses the #b30000 value already validated at
   6.2:1 on the same background shade in H30-27464. */
.activAlertMain .riskRed {
    color: #b30000;
}

/* #D58E00 measured 2.46:1 on this page's #fdf2dd badge background -- fails
   the 4.5:1 minimum. Reuses the #875a00 value already validated at 5.42:1
   on a near-identical cream background in H30-27443. */
.activAlertMain .riskYellow {
    color: #875a00;
}

/* White text on #E5A628 measured 2.14:1 on the Suspend Alert button --
   fails the 4.5:1 minimum. Darkened to #9C6300 to pass (5.0:1); no prior
   .themeBtnDark-yellow override existed to reuse. */
.activAlertMain .themeBtnDark-yellow {
    background: #9C6300;
}
