/* =============================================================
   Atmire theme — surgical WCAG fixes + Fira Sans / Open Sans
   Loaded AFTER bootstrap.min.css and grayscale.css.

   This stylesheet is intentionally minimal: it ONLY changes
   typography, focus visibility, form-input casing, panel-link
   contrast on cream surfaces, and the status column in showlist.
   It does NOT override grayscale.css's section backgrounds,
   navbar, button shapes, hero, or color palette — those are part
   of the analyzer's visual identity and stay.
   ============================================================= */

/* ---------- Self-hosted webfonts (latin subset) ---------- */
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/FiraSans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/FiraSans-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/FiraSans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/OpenSans-variable-latin.woff2") format("woff2-variations"),
       url("/fonts/OpenSans-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Typography swap: keep grayscale's casing, colors, layout ---------- */
body,
p, li, label, td, th, dd, dt,
.panel, .panel-body, .panel-heading, .panel-title,
footer {
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600; /* semibold body — addresses "fonts too thin" without changing weights on every selector */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.navbar-custom,
.navbar-custom .navbar-brand,
.navbar-custom .nav li a,
.btn,
.input-repourl,
.btn-circle,
input.btn,
button.btn,
input[type="submit"] {
  font-family: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
}

/* Keep the existing uppercase styling on headings/buttons — it's part of
   the analyzer's identity. We do NOT strip text-transform here. */

/* ---------- Form inputs: drop UPPERCASE for readability ---------- */
.input-repourl,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select,
.form-control {
  text-transform: none !important;
  letter-spacing: 0;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
}
.input-repourl::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

/* ---------- Focus visibility — overrides grayscale's `outline: none` ---------- */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid #0F65A6 !important;
  outline-offset: 2px;
  border-radius: 2px;
}
a:focus-visible {
  text-decoration-thickness: 2px;
}
/* Inputs need a slightly tighter offset so the ring hugs the field */
.input-repourl:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.form-control:focus-visible {
  outline-offset: 1px;
}

/* ---------- Link affordance ----------
   Body text is light blue (#63B3DE) and grayscale.css colors anchors
   #95bcdd — an even paler blue — making links visually indistinguishable
   from surrounding text. Shift all anchors to a saturated dark navy +
   bold weight + no underline. Two strong cues (color + weight) replace
   the underline. Navbar/brand anchors are unaffected because
   .navbar-custom a is more specific. */
a {
  color: #005989;
  font-weight: 700;
  text-decoration: none;
}
a:hover,
a:focus {
  color: #003a5f;
  text-decoration: none;
}

/* ---------- showlist.jsp status column ---------- */
.table .status-cell {
  white-space: nowrap;
  font-weight: 700;
  font-family: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
}
.table .status-cell .fa { margin-right: 0.4em; }
.table .status-up    { color: #157f3a; } /* 4.7:1 on white */
.table .status-down  { color: #b32020; } /* 5.9:1 on white */
.table .status-atmire { color: #0F65A6; } /* 7.0:1 on white */

/* ---------- WCAG 1.4.1 (Use of Color) — pass/fail prefixes ----------
   The result-row accordion headings on repositorysuccess.jsp use color
   (panel-success / panel-danger / panel-warning) as the only pass/fail
   signal. Add a leading ✓ / ✗ / ⚠ glyph so colour-blind users and
   screen readers get the status without relying on hue. */
.status-pass::before { content: "\2713\00a0"; color: #157f3a; font-weight: 700; }
.status-fail::before { content: "\2717\00a0"; color: #b32020; font-weight: 700; }
.status-warn::before { content: "\26A0\00a0"; color: #b27300; font-weight: 700; }

/* Visible un-collapsed summary paragraph on per-repository pages. */
.repo-summary {
  font-size: 1.05em;
  line-height: 1.55;
  padding: 0.9em 1.1em;
  margin: 0.5em 0 1.25em;
  background-color: #f6f9fb;
  border-left: 4px solid #0F65A6;
  border-radius: 3px;
}
