/* =====================================================================
   Andrew Hudson's Jobs List - accessibility fix pack (CSS)  v1
   Target: WCAG 2.1 AA. Paste into Simple Custom CSS (already installed:
   Appearance > Custom CSS). Safe to remove as one block.
   ===================================================================== */

/* ---------- 1. Visible keyboard focus (WCAG 2.4.7) ----------
   Theme sets outline:none on every link. Two-tone ring = visible on
   dark, light and gold backgrounds. :focus-visible = keyboard only,
   mouse clicks do not show it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #1a1a1a !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px #ffffff !important;
}
/* Search page filter checkboxes are visually hidden; show focus on the label */
.cl-tri-checkbox:focus-within {
  outline: 3px solid #1a1a1a;
  outline-offset: 2px;
}

/* ---------- 2. Skip link + screen-reader-only utility (WCAG 2.4.1) ---------- */
.a11y-skip-link {
  position: absolute;
  left: 8px;
  top: -200px;
  z-index: 100000;
  padding: 10px 16px;
  background: #1a1a1a;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: underline;
}
.a11y-skip-link:focus { top: 8px; }

.a11y-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. Colour contrast (WCAG 1.4.3, needs 4.5:1) ---------- */

/* Header menu: #555 on gold = 4.21 -> #1a1a1a on gold = 9.6 */
.cl-menu a,
.cl-primary-menu a,
.cl-login-menu a { color: #1a1a1a !important; }

/* Gold buttons: white on #fab72b = 1.76 -> dark text = 9.6
   (includes the job "Apply" button and the search page "Search" button) */
a.search-button,
input.search-button,
.view-all a.parent,
a.more.blue-btn,
a.rpt_foot,
.cl-bs .btn-block,
.cl-bs .btn-danger,
.job-apply .btn-danger,
button.btn-block[type="submit"] { color: #1a1a1a !important; }
.job-apply .btn-danger i { color: #1a1a1a !important; }

/* Archive pagination numbers: #888 on white = 3.54 -> 7.0 */
.page-numbers { color: #595959 !important; }
.page-numbers.current { color: #1a1a1a !important; }

/* Employers page feature blurbs: #767c89 = 4.2 -> 6.0 */
.button-info h4,
.button-info p { color: #50555f !important; }

/* Footer widgets: gold on cream = 1.48 -> brown on cream = 8.3 */
.footer .textwidget,
.footer .textwidget p,
.footer .widget a,
.footer .widget li { color: #5c3d00 !important; }

/* Copyright bar: gold on #545454 = 4.28 -> light gold = 5.3 */
.credits-text,
.credits-text span,
.credits-text a { color: #ffd36b !important; }
.credits-text .cl-version { color: #e0e0e0 !important; opacity: 1 !important; }
/* Bottom footer menu: gold on #545454 = 4.28, current page #888 = 1.9 */
.credits-inner a:not(.tothetop) { color: #ffd36b !important; }
.credits-inner .current-menu-item > a,
.credits-inner .current_page_item > a { color: #ffffff !important; text-decoration: underline !important; }

/* WPBakery buttons: white on "warning" orange #ff9900 = 2.1 and
   "danger" coral #ff675b = 2.9 -> dark text (8.1 / 6.1) */
.vc_general[style*="#ff9900" i],
.vc_general[style*="#ff675b" i],
.vc_general[style*="255, 153, 0"],
.vc_general[style*="255, 103, 91"],
.vc_btn3.vc_btn3-color-warning,
.vc_btn3.vc_btn3-color-danger { color: #1a1a1a !important; }
.vc_general[style*="#ff9900" i] i,
.vc_general[style*="#ff675b" i] i { color: #1a1a1a !important; }

/* WPBakery grid "Show More": white on #5472d2 = 4.47 -> use its own hover blue #3c5ecc = 5.7 */
.vc_grid-btn-load_more .vc_btn3 {
  background-color: #3c5ecc !important;
  border-color: #3c5ecc !important;
  color: #ffffff !important;
}

/* WPBakery grid filter ("All / Career Advice ..."): #555 on #f7be68 = 4.45 */
.vc_grid-filter-item,
.vc_grid-filter-item span { color: #1a1a1a !important; }

/* Job/blog meta "pills": white on pastel (1.8 - 3.4) -> dark text (5.1 - 9.0) */
.meta-tag,
.meta-tag b,
.meta-tag h3,
.post-categories a,
.tagcloud a { color: #1a1a1a !important; }
p.post-categories { color: #4d4d4d !important; }
p.nocomments { color: #3d5a70 !important; }

/* Search results (JobEngine): #a7a7a7 on white/blue = 2.3 -> #595959 = 6.7+ */
.cl-job-info-cont .cl-job-company,
.cl-job-info-cont .cl-job-location,
.cl-job-info-cont .cl-job-dates,
.cl-job-info-cont .cl-job-dates span { color: #595959 !important; }
.search-job-alerts em,
.search-job-alerts i,
p > i > em { color: #5a6573 !important; }
input.alert-name { color: #3d5a70 !important; }

/* Bootstrap blue #428bca = 3.63 -> #2a6496 = 6.3 */
.pagination > li > a,
#forgot-password,
.no-account a { color: #2a6496 !important; }
.btn-primary {
  background-color: #2a6496 !important;
  border-color: #245580 !important;
}

/* ---------- 4. Links in body text must not rely on colour alone (WCAG 1.4.1) ---------- */
.post-content p a,
.wpb_text_column p a,
.wpb_text_column h3 a,
.textwidget p a:not([class*="btn"]):not([class*="button"]) { text-decoration: underline !important; }
