/* ═══════════════════════════════════════════════════════════════════
   NJ Job Source – Enhanced Portal  |  Main Stylesheet
   Matches jobsource.nj.gov visual design
═══════════════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────────────── */
html { font-size: 100%; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nj-teal:    #3a6d88;
  --nj-teal-dk: #2d566c;
  --nj-navy:    #003366;
  --nj-blue:    #0066b3;
  --nj-blue-lt: #e0ecf8;
  --nj-gold:    #c8a600;
  --nj-red:     #c8102e;
  --white:      #ffffff;
  --gray-50:    #f8f8f8;
  --gray-100:   #f4f4f4;
  --gray-200:   #e6e6e6;
  --gray-400:   #b0bac6;
  --gray-600:   #5a6a7e;
  --gray-900:   #1a1a1a;
  --border:     #cccccc;
  --link:       #0052a5;
  --link-hover: #003366;
  --success:    #197a3d;
  --danger:     #b5141e;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.12);
  --radius:     3px;
  --tbl-cols:   1fr 140px 185px 90px;
}

body {
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 0.875rem;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.4;
}

a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--link-hover); }
button { cursor: pointer; font-family: inherit; }
.hidden { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--nj-navy); color: #fff;
  padding: 8px 14px; font-weight: bold;
  text-decoration: none; z-index: 9999;
  border-radius: 0 0 4px 0; transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════════════════════════════
   SITE HEADER  (image banner, matching jobsource.nj.gov)
══════════════════════════════════════════════════════════════════ */
#site-header {
  background: var(--nj-teal);
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 132px;
  overflow: hidden;
}
#site-header a {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 0;
}
#site-header img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: left top;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   TOP UTILITY ROW  (Translate – right-aligned, above breadcrumb)
══════════════════════════════════════════════════════════════════ */
#utility-top {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 3px 16px;
  display: flex;
  justify-content: flex-end;
  font-size: 0.75rem;
}
#utility-top .util-translate a {
  color: var(--link); text-decoration: underline; font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════
   BREADCRUMB + ACCOUNT ROW
══════════════════════════════════════════════════════════════════ */
#breadcrumb-row {
  background: var(--white);
  border-bottom: 2px solid var(--border);
}
.bc-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 6px 16px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#breadcrumb {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--gray-600);
}
#breadcrumb a {
  color: var(--link); text-decoration: none; font-size: 0.875rem;
}
#breadcrumb a:hover { text-decoration: underline; }
.bc-sep     { margin: 0 4px; color: var(--gray-600); font-size: 0.8125rem; }
.bc-current { font-size: 0.8125rem; color: var(--gray-600); }
.util-account {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  padding: 3px 8px;
  background: var(--gray-50);
}
.util-account span {
  font-weight: bold; color: var(--gray-900);
}
.util-sep { color: var(--gray-400); font-size: 0.6875rem; }
.util-account a {
  color: var(--link); text-decoration: none;
}
.util-account a:hover { text-decoration: underline; }
.util-print {
  background: none; border: none; padding: 0 2px;
  font-size: 0.8125rem; cursor: pointer; color: var(--gray-600); line-height: 1;
}
.util-print:hover { color: var(--nj-navy); }
.util-print:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: 2px; }

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADING
══════════════════════════════════════════════════════════════════ */
#page-heading {
  background: var(--white);
  padding: 8px 16px 6px;
  max-width: 980px;
  margin: 0 auto;
}
#page-heading h1,
.page-heading-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nj-navy);
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
}

/* ══════════════════════════════════════════════════════════════════
   SEARCH PANEL
══════════════════════════════════════════════════════════════════ */
#search-panel {
  background: var(--white);
  padding: 0 0 10px;
}
#search-panel-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* "Search for jobs which interest you." – dark navy bar (matches reference) */
.search-top-bar {
  background: var(--nj-navy);
  color: var(--white);
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: bold;
  margin-bottom: 8px;
}

/* Section box (Search Options) */
.search-section {
  border: 1px solid var(--border);
  background: var(--white);
  margin-bottom: 8px;
}
.search-section-title {
  background: var(--gray-100);
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--gray-900);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-section-body {
  padding: 10px 12px;
}

/* ══════════════════════════════════════════════════════════════════
   SEARCH RESULTS SECTION HEADER
══════════════════════════════════════════════════════════════════ */
.results-section-header {
  border: 1px solid var(--border);
  background: var(--white);
  margin-bottom: 0;
}
.results-section-header.hidden { display: none !important; }
.results-section-title {
  background: var(--gray-100);
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--gray-900);
  border-bottom: 1px solid var(--border);
}
.results-section-desc {
  padding: 5px 10px;
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* Keyword row */
.kw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.kw-row label {
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--gray-900);
  white-space: nowrap;
}
.kw-row input[type=text] {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}
.kw-row input:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; }

.btn-search {
  padding: 5px 18px;
  background: var(--nj-teal);
  color: var(--white);
  border: 1px solid var(--nj-teal-dk);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}
.btn-search:hover { background: var(--nj-teal-dk); }

/* Match strength row */
.match-strength-row {
  font-size: 0.78125rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.match-strength-row label {
  color: var(--gray-900);
}
.match-strength-row select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78125rem;
}

/* Search option links (Simple Search / Clear Search Options) */
.search-option-links {
  font-size: 0.75rem;
  margin-top: 6px;
  display: flex;
  gap: 12px;
}
.search-option-links a,
.search-option-links .adv-toggle-btn {
  color: var(--link);
  text-decoration: underline;
  background: none;
  border: none;
  font-size: 0.75rem;
  padding: 0;
  cursor: pointer;
  border-radius: 0;
}
.search-option-links .adv-toggle-btn:hover { background: none; color: var(--link-hover); }

/* Advanced search collapsible panel */
.adv-search-panel {
  border: 1px solid var(--border);
  margin-top: 8px;
}
.adv-search-header {
  background: var(--nj-navy);
  padding: 6px 10px;
  font-size: 0.78125rem;
  font-weight: bold;
  color: var(--white);
  border-bottom: 1px solid #002255;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.adv-toggle-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  color: var(--white);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 1px 8px;
  border-radius: var(--radius);
}
.adv-toggle-btn:hover { background: rgba(255,255,255,.15); }
.adv-hdr-btn {
  min-width: 24px; min-height: 24px;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.15); color: var(--white);
  font-size: 1rem; font-weight: bold; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px; padding: 0; cursor: pointer; font-family: inherit;
  flex-shrink: 0;
}
.adv-hdr-btn:hover { background: rgba(255,255,255,.3); }
.adv-hdr-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.adv-search-body {
  padding: 10px 12px;
  background: var(--white);
}
.adv-search-body.hidden { display: none !important; }

/* Location row — mirrors kw-row structure; <fieldset> resets */
.loc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  border: none;
  padding: 0;
  min-inline-size: 0;
}
.loc-label {
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--gray-900);
  white-space: nowrap;
  float: none;
  padding: 0;
}
.loc-options {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.loc-opt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78125rem;
}
.loc-opt label {
  white-space: nowrap;
  color: var(--gray-900);
}
.loc-text-input {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78125rem;
  width: 110px;
}
.loc-text-input:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; }
.adv-radius-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78125rem;
}
.adv-radius-row.hidden { display: none !important; }

.adv-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78125rem;
  margin-bottom: 5px;
}
.adv-filter-row label {
  color: var(--gray-900);
  white-space: nowrap;
  min-width: 110px;
}

.adv-select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78125rem;
  background: var(--white);
}
.adv-select:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; }

.adv-text-input {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78125rem;
  width: 160px;
}
.adv-text-input:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; }

.adv-search-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Intro paragraph */
.search-intro {
  font-size: 0.78125rem;
  margin-bottom: 8px;
  color: #444;
}

/* Keyword input */
.kw-input {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}
.kw-input:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; }

/* Match strength */
.ms-bold { font-weight: bold; }
.ms-select {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78125rem;
}

/* API Config strip */
#api-strip {
  background: #fff8dc;
  border: 1px solid #e0c040;
  border-radius: var(--radius);
  padding: 7px 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.api-label { font-weight: bold; color: #7a5800; white-space: nowrap; }
#api-strip input {
  padding: 4px 7px; border: 1px solid #c8a600; border-radius: var(--radius); font-size: 0.75rem;
}
.btn-connect {
  padding: 4px 12px; background: var(--nj-teal); color: var(--white);
  border: none; border-radius: var(--radius); font-size: 0.75rem; font-weight: bold;
}
.btn-connect:hover { background: var(--nj-teal-dk); }
.btn-disconnect {
  padding: 2px 6px; background: none; border: none; color: var(--link);
  font-size: 0.6875rem; text-decoration: underline; cursor: pointer;
}
.api-connected { font-size: 0.75rem; color: var(--success); font-weight: bold; }
.api-help      { font-size: 0.6875rem; color: var(--gray-600); }
.api-status-msg{ font-size: 0.75rem; color: var(--danger); }

/* ══════════════════════════════════════════════════════════════════
   RESULTS AREA
══════════════════════════════════════════════════════════════════ */
#page-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* ── Paginator ─────────────────────────────────────────────────── */
.results-paginator {
  background: var(--nj-navy);
  border: 1px solid #002255;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  margin-bottom: 0;
}
.results-paginator.hidden       { display: none !important; }
.results-paginator-bottom       { margin-top: 0; border-top: none; }
.pg-count { color: var(--white); font-size: 0.75rem; font-weight: bold; white-space: nowrap; }
.pg-nav-area {
  flex: 1; display: flex; justify-content: center;
}
.pg-nav-area form {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
}
.pg-nav-btn {
  padding: 3px 6px; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08); color: var(--white);
  font-size: 0.6875rem; border-radius: 2px; cursor: pointer; white-space: nowrap;
}
.pg-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.pg-nav-btn:disabled { opacity: .3; cursor: default; }
.pg-num-btn {
  padding: 3px 6px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1); color: var(--white);
  font-size: 0.6875rem; border-radius: 2px; cursor: pointer; min-width: 22px; text-align: center;
}
.pg-num-btn:hover:not(:disabled) { background: rgba(255,255,255,.25); }
.pg-num-btn.active {
  background: var(--white); color: var(--nj-navy);
  border-color: var(--white); font-weight: bold; pointer-events: none;
}
.pg-size-select {
  padding: 1px 4px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 2px; font-size: 0.6875rem; background: var(--white);
  color: var(--gray-900); margin-left: 6px;
}
.pg-size-label { color: rgba(255,255,255,.85); font-size: 0.6875rem; margin-left: 3px; }
.pg-of-label   { color: #ffffff;  font-size: 0.6875rem; margin-left: 4px; white-space: nowrap; }

/* ── State panels ──────────────────────────────────────────────── */
.loading-panel, .empty-panel, .error-panel {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  color: var(--gray-600);
  font-size: 0.8125rem;
}
.loading-panel.hidden, .empty-panel.hidden, .error-panel.hidden { display: none !important; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--nj-teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { color: var(--danger); }

/* ── Results table ─────────────────────────────────────────────── */
/* 4-column grid: title | location | company | date */
#job-table-wrap {
  border: 1px solid var(--border);
  border-top: none;
}

/* Single-row table header – border matches job-table-wrap so grids share identical width */
#job-table-header {
  display: grid;
  grid-template-columns: var(--tbl-cols);
  background: #d6e8ff;
  color: var(--nj-navy);
  font-size: 0.75rem;
  font-weight: bold;
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--nj-navy);
}

/* Horizontal padding matches .jr-cell so column text aligns with header text */
.th-c { display: flex; align-items: center; justify-content: center; padding: 5px 10px; }

/* Sort button inside column headers */
.th-sort-btn {
  background: none; border: none; color: var(--nj-navy); font-size: 0.75rem;
  font-weight: bold; font-family: inherit; cursor: pointer; padding: 0;
  text-align: center; width: 100%;
}
.th-sort-btn:hover { text-decoration: underline; color: var(--nj-blue); }

/* ── Job rows (9 columns) ──────────────────────────────────────── */
.job-row {
  display: grid;
  grid-template-columns: var(--tbl-cols);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.job-row:nth-child(even) { background: #f5f9fc; }
.job-row:hover { background: #dceaf5; }
.job-row.selected { background: #c8dff0; }
.job-row:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: -2px; }
@media(max-width:800px){
  :root { --tbl-cols: 1fr 85px; }
  .jr-loc, .jr-co { display: none; }
  #job-table-header .th-c3, #job-table-header .th-c4 { display: none; }
}

.jr-cell {
  padding: 7px 10px;
  font-size: 0.78125rem;
  display: flex;
  align-items: center;
}

/* Match strength stars */
.jr-stars { gap: 2px; }
.star-rating {
  display: inline-flex;
  gap: 1px;
  font-size: 0.875rem;
  color: #c8a600;
  line-height: 1;
}
.star-empty { color: var(--gray-300); }

/* Title cell */
.jr-title-cell { flex-direction: column; align-items: flex-start; gap: 2px; }
.jr-title {
  color: var(--link);
  font-size: 0.8125rem;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  padding: 0;
  font-family: inherit;
}
.jr-title:hover { color: var(--link-hover); }
.jr-tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
.jr-tag  { font-size: 0.625rem; font-weight: bold; padding: 1px 5px; border-radius: 2px; }
.jr-tag.new      { background: #d4edda; color: #145e2c; border: 1px solid #a3d7b0; }
.jr-tag.fulltime { background: #d6eaf8; color: var(--nj-navy); border: 1px solid #aed6f1; }
.jr-tag.parttime { background: #fef9e7; color: #7a5800; border: 1px solid #f0d060; }
.jr-tag.contract { background: #f5eef8; color: #5b2c8d; border: 1px solid #d2b4f0; }
.jr-tag.remote   { background: #e8f8f5; color: #0d7040; border: 1px solid #88d8bb; }
.jr-tag.hybrid   { background: #fef2e7; color: #a04000; border: 1px solid #f0b070; }
.jr-tag.federal    { background: #fde8e8; color: #7b1111; border: 1px solid #e8aaaa; }
.jr-tag.salary    { background: #e6f4ea; color: #1a6640; border: 1px solid #7dcca0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-tag.education { background: #e8eef8; color: #1a3a7a; border: 1px solid #8aabe0; }

.jr-loc  { color: var(--gray-600); font-size: 0.75rem; }
.jr-co   { color: var(--gray-900); font-size: 0.78125rem; }
.jr-date { color: var(--gray-600); font-size: 0.75rem; }
.jr-action { justify-content: center; gap: 4px; }


/* API Filter Panel (v3 refine results) */
.api-filter-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  padding: 12px 16px 14px;
}
.api-filter-panel.hidden { display: none !important; }
.api-filter-title {
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.api-filter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}
.api-filter-group {
  min-width: 160px;
}
.api-filter-label {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--gray-700, #555);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.api-filter-checks table { border-collapse: collapse; }
.api-filter-checks td { padding: 1px 0; white-space: nowrap; }
.api-filter-checks input[type="checkbox"] { margin-right: 5px; }
.api-filter-checks label { font-size: 0.78125rem; color: var(--gray-900); cursor: pointer; }
.api-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Active filter chips */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.active-filters-bar.hidden { display: none !important; }
.active-filters-label {
  font-size: 0.75rem;
  color: var(--gray-700, #555);
  font-weight: bold;
  margin-right: 2px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f0fe;
  border: 1px solid #aac4f7;
  border-radius: 14px;
  padding: 3px 8px 3px 10px;
  font-size: 0.75rem;
  color: #1a3a6b;
}
.chip-label { white-space: nowrap; }
.chip-remove {
  background: none;
  border: none;
  color: #1a3a6b;
  font-size: 0.8125rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.7;
}
.chip-remove:hover { opacity: 1; }
.chip-remove:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: 2px; opacity: 1; }
.chip-clear-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--gray-700, #555);
  font-size: 0.71875rem;
  cursor: pointer;
  padding: 3px 8px;
}
.chip-clear-all:hover { background: #f5f5f5; }

/* Export section */
.export-section {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--white);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.export-section.hidden { display: none !important; }
.export-label { font-size: 0.78125rem; color: var(--gray-600); margin: 0; }
.export-options {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.export-radio { font-size: 0.75rem; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.export-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.6875rem; font-weight: bold;
  background: var(--gray-100); cursor: not-allowed; opacity: .7;
}
.export-pdf { color: #c00; border-color: #c00; }
.export-csv { color: #080; border-color: #080; }

.jr-save-btn {
  background: none; border: none; font-size: 0.9375rem;
  color: var(--gray-400); padding: 0 2px; cursor: pointer;
}
.jr-save-btn:hover, .jr-save-btn.saved { color: #c8a600; }
.jr-save-btn:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: 2px; }

/* ══════════════════════════════════════════════════════════════════
   JOB DETAIL OVERLAY
══════════════════════════════════════════════════════════════════ */
.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0,20,50,.55);
  z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 12px; overflow-y: auto;
}
.detail-overlay.hidden { display: none !important; }

dialog#detail-panel {
  display: block; /* override UA stylesheet which hides <dialog> without [open] */
  border: none; padding: 0;
  background: var(--white);
  width: 100%; max-width: 720px;
  border-top: 4px solid var(--nj-teal);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  animation: panelIn .2s ease;
}
@keyframes panelIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }

#detail-header {
  background: var(--nj-teal);
  color: var(--white);
  padding: 12px 16px;
  position: relative;
}
#detail-header h2 { font-size: 0.9375rem; font-weight: bold; padding-right: 30px; }
.dh-company { font-size: 0.78125rem; opacity: .88; margin-top: 2px; }
.detail-close-btn {
  position: absolute; top: 10px; right: 12px;
  background: rgba(255,255,255,.15); border: none; color: var(--white);
  width: 26px; height: 26px; border-radius: 50%; font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.detail-close-btn:hover { background: rgba(255,255,255,.3); }
.detail-close-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

#detail-meta-bar {
  background: #ebf3fa; border-bottom: 1px solid var(--border);
  padding: 7px 16px; display: flex; flex-wrap: wrap; gap: 12px;
}
.dm-item { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--gray-900); }
.dm-item .icon { font-size: 0.8125rem; }

#detail-body  { padding: 14px; }
.det-section  { margin-bottom: 14px; }
.det-section h3 {
  font-size: 0.75rem; font-weight: bold; color: var(--nj-navy);
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 4px; border-bottom: 2px solid #c8a600; margin-bottom: 8px;
}
.det-section p, .det-section li { font-size: 0.78125rem; line-height: 1.6; color: var(--gray-900); }

.det-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.det-cell {
  background: var(--gray-100); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: var(--radius);
}
.dc-label { font-size: 0.65625rem; font-weight: bold; color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; }
.dc-val   { font-size: 0.78125rem; font-weight: bold; margin-top: 2px; }

#detail-footer {
  background: var(--gray-100); border-top: 1px solid var(--border);
  padding: 10px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
.btn-apply-now {
  padding: 7px 18px; background: var(--nj-teal); color: var(--white);
  border: none; border-radius: var(--radius); font-size: 0.8125rem; font-weight: bold;
  text-decoration: none; display: inline-block;
}
.btn-apply-now:hover { background: var(--nj-teal-dk); color: var(--white); }
.btn-close-det {
  padding: 7px 14px; background: var(--white); color: var(--gray-900);
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.8125rem; cursor: pointer;
}
.btn-close-det:hover { background: var(--gray-200); }

.det-notice {
  background: #f0f6fc; border: 1px solid #b0cceb; border-radius: var(--radius);
  padding: 7px 10px; font-size: 0.71875rem; color: var(--gray-600); margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
footer#site-footer {
  background: #3a6d88;
  border-top: none;
  padding: 14px 16px;
  margin-top: 20px;
  text-align: center;
  font-size: 0.71875rem;
  color: var(--white);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   JSF-SPECIFIC OVERRIDES
══════════════════════════════════════════════════════════════════ */
span.hidden, div.hidden { display: none !important; }
button.jr-title { display: block; width: 100%; }

/* ══════════════════════════════════════════════════════════════════
   JOB DETAIL FULL PAGE
══════════════════════════════════════════════════════════════════ */

/* Navy notice bar below page heading */
.det-page-notice {
  background: var(--nj-navy);
  color: var(--white);
  padding: 8px 16px;
  font-size: 0.78125rem;
  font-weight: bold;
  text-align: center;
}

/* Outer page wrapper */
#det-page-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px 20px;
}

/* Flex row: sidebar + main */
#det-page-inner {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* ── Left sidebar ──────────────────────────────────────────────── */
#det-sidebar {
  flex: 0 0 155px;
  min-width: 140px;
  font-size: 0.78125rem;
}

.det-sb-group {
  margin-bottom: 14px;
}

.det-sb-group-title {
  color: var(--nj-blue);
  font-size: 0.8125rem;
  font-weight: bold;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  margin-bottom: 4px;
}

.det-sb-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.det-sb-nav li {
  border-bottom: 1px solid var(--gray-200);
}
.det-sb-nav a {
  display: block;
  color: var(--link);
  font-size: 0.75rem;
  padding: 4px 2px;
  text-decoration: none;
}
.det-sb-nav a:hover { text-decoration: underline; }

.det-sb-actions {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.det-sb-actions li { margin-bottom: 5px; }

.det-action-btn {
  background: none;
  border: none;
  color: var(--link);
  font-size: 0.75rem;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.det-action-btn:hover { text-decoration: underline; }
.det-action-btn:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: 2px; }

.det-action-link {
  color: var(--link);
  font-size: 0.75rem;
  text-decoration: none;
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.4;
}
.det-action-link:hover { text-decoration: underline; }
.det-email-icon { flex-shrink: 0; }

.det-sb-btn-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.btn-det-nav {
  padding: 3px 10px;
  background: var(--gray-100);
  color: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-det-nav:hover { background: var(--gray-200); }
.btn-det-nav:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: 2px; }

/* ── Main content area ─────────────────────────────────────────── */
#det-main {
  flex: 1;
  min-width: 0;
}

/* Stars + Bright Outlook row */
.det-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 4px 0;
}
.det-stars {
  display: flex;
  gap: 1px;
  font-size: 1.375rem;
  line-height: 1;
}
.det-star        { color: var(--gray-400); }
.det-star.filled { color: var(--nj-gold); }

.det-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.det-bright-outlook {
  color: var(--nj-blue);
  font-size: 0.78125rem;
  font-weight: bold;
}
.det-showhide-links {
  font-size: 0.75rem;
}
.det-showhide-btn {
  background: none;
  border: none;
  color: var(--link);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.det-showhide-btn:hover { color: var(--link-hover); }
.det-pipe { margin: 0 4px; color: var(--gray-400); }

/* ── Accordion sections ────────────────────────────────────────── */
.det-accordion {
  border: 1px solid var(--border);
  margin-bottom: 5px;
}
.det-acc-hdr {
  background: var(--gray-200);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 0.78125rem;
  font-weight: bold;
  font-family: inherit;
  color: var(--gray-900);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
}
.det-acc-hdr:hover { background: #cdd6df; }
.det-acc-hdr:focus-visible { outline: 2px solid var(--nj-teal); outline-offset: -2px; }
.det-acc-arrow { color: var(--nj-blue); font-size: 0.6875rem; flex-shrink: 0; }
.det-acc-body  { padding: 12px 14px; background: var(--white); }
.det-acc-body.det-acc-collapsed { display: none; }

/* ── Info / contact rows ───────────────────────────────────────── */
.det-info-table,
.det-contact-table {
  max-width: 600px;
  margin: 0 auto;
}
.det-info-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2px 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--gray-100);
}
.det-info-row:last-child { border-bottom: none; }
.det-info-label {
  font-size: 0.78125rem;
  font-weight: bold;
  text-align: right;
  color: var(--gray-900);
  padding-right: 4px;
  align-self: start;
}
.det-info-value {
  font-size: 0.78125rem;
  color: var(--gray-900);
  word-break: break-word;
  line-height: 1.5;
}
/* Description row spans wider and has extra top margin */
.det-info-row-full {
  grid-template-columns: 170px 1fr;
  padding-top: 8px;
}

/* ── How to Apply content ──────────────────────────────────────── */
.det-hta-lead        { font-size: 0.78125rem; margin-bottom: 4px; }
.det-hta-list        { font-size: 0.78125rem; margin: 0 0 10px 20px; line-height: 1.6; }
.det-hta-notes-hdr   { font-size: 0.78125rem; margin-bottom: 3px; margin-top: 10px; }
.det-hta-notes-body  { font-size: 0.78125rem; margin-bottom: 12px; line-height: 1.6; }
.det-contact-hdr     { font-size: 0.78125rem; margin-bottom: 6px; }

/* ── Additional Information ────────────────────────────────────── */
.det-addl-intro { font-size: 0.78125rem; margin-bottom: 8px; }
.det-addl-links {
  list-style: disc;
  padding-left: 22px;
  font-size: 0.78125rem;
}
.det-addl-links li     { margin-bottom: 4px; }
.det-addl-links a      { color: var(--link); }
.det-addl-links a:hover{ text-decoration: underline; }

/* ── Driving Directions ────────────────────────────────────────── */
.det-driving-links { font-size: 0.78125rem; margin-bottom: 6px; }
.det-driving-link  { color: var(--link); }
.det-driving-ext   { font-size: 0.625rem; vertical-align: super; color: var(--link); }
.det-driving-note  { font-size: 0.71875rem; color: var(--gray-600); }

/* ── No-job fallback ───────────────────────────────────────────── */
.det-no-job {
  padding: 24px 16px;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--gray-600);
}
.det-no-job a { color: var(--link); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 620px) {
  #det-page-inner { flex-direction: column; }
  #det-sidebar    { flex: none; width: 100%; }
  .det-info-row   { grid-template-columns: 1fr; }
  .det-info-label { text-align: left; }
}

/* Company filter — search input */
.company-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 7px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  color: var(--gray-900);
}
.company-search-input:focus { outline: 2px solid var(--nj-teal); outline-offset: 1px; border-color: #005a9c; }

/* Company filter — modal trigger */
.company-modal-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-900);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: normal;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: border-color .15s, background .15s;
}
.company-modal-trigger:hover {
  border-color: var(--nj-teal);
  background: var(--gray-50);
}
.company-modal-trigger:focus-visible {
  outline: 2px solid var(--nj-teal);
  outline-offset: 1px;
}
.company-modal-trigger.has-selection {
  border-color: var(--nj-blue);
  background: var(--nj-blue-lt);
  color: var(--nj-navy);
  font-weight: bold;
}

/* Company filter — modal overlay */
.company-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,20,50,.45);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.company-modal-overlay.hidden { display: none !important; }

/* Company filter — modal dialog */
.company-modal-dialog {
  background: var(--white);
  border-top: 4px solid var(--nj-teal);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  width: 100%; max-width: 480px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  animation: panelIn .15s ease;
}
.company-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--nj-teal); color: var(--white);
  flex-shrink: 0;
}
.company-modal-title { font-size: 0.875rem; font-weight: bold; }
.company-modal-close {
  background: rgba(255,255,255,.15); border: none; color: var(--white);
  width: 24px; height: 24px; border-radius: 50%; font-size: 0.8125rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.company-modal-close:hover { background: rgba(255,255,255,.3); }
.company-modal-body { padding: 12px 16px; overflow-y: auto; flex: 1; }
.company-modal-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
}

/* Active sort column header */
.th-sort-active {
  color: var(--nj-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.th-sort-btn:not(.th-sort-active) { color: var(--gray-900); font-weight: normal; }
.th-sort-btn:not(.th-sort-active):hover { color: var(--nj-blue); font-weight: bold; }

/* ── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .spinner               { animation: none; }
  #detail-panel          { animation: none; }
  .company-modal-dialog  { animation: none; }
  .job-row               { transition: none; }
}
