/* ============================================================
   TechJobs360 Job Board Pro — full design system.
   Tokens + above-the-fold rules live in tj360-critical.css
   (inlined). This sheet styles everything below the fold and
   the deeper templates. System font stack: zero font requests.
   ============================================================ */

/* ─── Generic ─────────────────────────────────────────────── */
.tj-section__header { margin-bottom: 22px; }
.tj-section__header-row {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}
.tj-section__header-row > * { min-width: 0; }
.tj-section__more { margin: 26px 0 0; text-align: center; }
.tj-section__title--sm { font-size: 20px; margin-top: 34px; }

a.tj-btn, a.tj-tag, a.tj-chip, a.tj-category-card, a.tj-company-card { text-decoration: none; }

.tj-btn--outline {
  background: var(--tj-surface);
  border-color: var(--tj-border-strong);
  color: var(--tj-brand);
}
.tj-btn--outline:hover { background: var(--tj-brand-soft); border-color: var(--tj-brand); color: var(--tj-brand); }
.tj-btn--inverse { background: #fff; border-color: #fff; color: var(--tj-brand); }
.tj-btn--inverse:hover { background: rgba(255, 255, 255, 0.88); border-color: rgba(255, 255, 255, 0.88); color: var(--tj-brand); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  box-shadow: var(--tj-focus);
  outline: none;
}

/* ─── Badges ──────────────────────────────────────────────── */
.tj-badge {
  align-items: center;
  background: var(--tj-surface-2);
  border-radius: 999px;
  color: var(--tj-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 10px;
  white-space: nowrap;
}
.tj-badge--type { background: var(--tj-brand-soft); color: var(--tj-brand); }
.tj-badge--remote { background: var(--tj-good-soft); color: var(--tj-good); }
.tj-badge--level { background: var(--tj-info-soft); color: var(--tj-info); }
.tj-badge--salary { background: var(--tj-good-soft); color: var(--tj-good); }
.tj-badge--featured { background: var(--tj-warn-soft); color: var(--tj-warn); }

/* ─── Job cards ───────────────────────────────────────────── */
.tj-jobs-list { display: grid; gap: 12px; }
.tj-featured-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.tj-jcard {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius);
  box-shadow: var(--tj-shadow-sm);
  display: grid;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 16px;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.tj-jcard:hover { border-color: var(--tj-brand); box-shadow: var(--tj-shadow); transform: translateY(-2px); }
.tj-jcard.is-featured { border-color: #f4cd87; }

.tj-jcard--tile { align-content: start; grid-template-columns: 48px minmax(0, 1fr); }
.tj-jcard--tile .tj-jcard__side {
  align-items: center;
  flex-direction: row;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.tj-logo {
  align-items: center;
  background: var(--tj-surface-2);
  border: 1px solid var(--tj-border);
  border-radius: 10px;
  display: flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  overflow: hidden;
  width: 48px;
}
.tj-logo img { height: 100%; object-fit: contain; width: 100%; }
.tj-logo--initials {
  background: hsl(var(--tj-logo-h, 250), 65%, 93%);
  border-color: hsl(var(--tj-logo-h, 250), 45%, 85%);
  color: hsl(var(--tj-logo-h, 250), 55%, 38%);
  font-size: 15px;
  font-weight: 800;
}
html[data-tj-theme="dark"] .tj-logo--initials {
  background: hsl(var(--tj-logo-h, 250), 30%, 24%);
  border-color: hsl(var(--tj-logo-h, 250), 25%, 34%);
  color: hsl(var(--tj-logo-h, 250), 70%, 80%);
}

.tj-jcard__body { min-width: 0; }
.tj-jcard__title { font-size: 16px; font-weight: 800; line-height: 1.32; margin: 0 0 5px; }
.tj-jcard__title a { color: var(--tj-text); text-decoration: none; }
.tj-jcard__title a::after { content: ""; inset: 0; position: absolute; }
.tj-jcard__title a:hover { color: var(--tj-brand); }
.tj-jcard__meta {
  align-items: center;
  color: var(--tj-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13.5px;
  gap: 4px 8px;
  line-height: 1.4;
  margin: 0 0 9px;
}
.tj-jcard__company { color: var(--tj-text); font-weight: 700; }
.tj-dot { color: var(--tj-faint); }
.tj-jcard__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tj-jcard__side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  text-align: right;
}
.tj-jcard__time { color: var(--tj-faint); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tj-jcard__apply {
  background: var(--tj-brand-soft);
  border-radius: 999px;
  color: var(--tj-brand);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 13px;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  z-index: 1;
}
.tj-jcard:hover .tj-jcard__apply { background: var(--tj-brand); color: var(--tj-on-brand); }

/* Save (bookmark) button */
.tj-save {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--tj-faint);
  cursor: pointer;
  display: inline-flex;
  padding: 6px;
  position: relative;
  z-index: 1;
}
.tj-save svg { height: 18px; width: 18px; }
.tj-save:hover { color: var(--tj-brand); }
.tj-save.is-saved { color: var(--tj-brand); }
.tj-save.is-saved svg { fill: currentColor; }
.tj-save--labelled {
  align-items: center;
  border: 1px solid var(--tj-border-strong);
  border-radius: 10px;
  color: var(--tj-muted);
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  padding: 9px 14px;
}

/* ─── Filter chips ────────────────────────────────────────── */
.tj-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tj-chip {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border-strong);
  border-radius: 999px;
  color: var(--tj-muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
}
.tj-chip:hover { background: var(--tj-brand); border-color: var(--tj-brand); color: var(--tj-on-brand); }

.tj-pulse-dot {
  animation: tj-pulse 1.4s ease-in-out infinite;
  background: var(--tj-good);
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  vertical-align: middle;
  width: 8px;
}
@keyframes tj-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

/* ─── Featured section wash ───────────────────────────────── */
.tj-featured-section {
  background: radial-gradient(circle at 10% 10%, rgba(255, 179, 61, 0.1), transparent 36%), var(--tj-surface-2);
}
html[data-tj-theme="dark"] .tj-featured-section { background: var(--tj-surface-2); }

/* ─── Companies ───────────────────────────────────────────── */
.tj-companies-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tj-company-card {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius);
  box-shadow: var(--tj-shadow-sm);
  color: var(--tj-text);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 18px 14px;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.tj-company-card:hover { border-color: var(--tj-brand); box-shadow: var(--tj-shadow); transform: translateY(-2px); }
.tj-company-card__name { color: var(--tj-text); font-weight: 800; overflow-wrap: anywhere; }
.tj-company-card__count { color: var(--tj-muted); font-size: 13px; }

/* ─── CTA ─────────────────────────────────────────────────── */
.tj-cta-section {
  background: linear-gradient(135deg, var(--tj-brand) 0%, var(--tj-brand-2) 100%);
  color: #fff;
  padding-bottom: 60px;
  padding-top: 60px;
  text-align: center;
}
.tj-cta-section .tj-section__title { color: #fff; }
.tj-cta-section p { color: rgba(255, 255, 255, 0.86); }
.tj-cta-section__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.tj-cta-section .tj-btn--outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.tj-cta-section .tj-btn--outline:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ─── Single job page ─────────────────────────────────────── */
.tj360-quick-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tj360-fact {
  align-items: center;
  background: var(--tj-surface-2);
  border: 1px solid var(--tj-border);
  border-radius: 999px;
  color: var(--tj-text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  padding: 8px 13px;
}
.tj360-expired-notice {
  background: var(--tj-warn-soft);
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: var(--tj-radius);
  color: var(--tj-warn);
  font-size: 14.5px;
  margin: 0 0 18px;
  padding: 14px 16px;
}
.tj360-expired-notice a { color: inherit; font-weight: 800; }
.tj360-share-row { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.tj-share-btn {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border-strong);
  border-radius: 10px;
  color: var(--tj-muted);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
}
.tj-share-btn:hover { border-color: var(--tj-brand); color: var(--tj-brand); }
.tj360-related { margin-top: 10px; }

/* Hide the theme's "By admin / date" byline on job pages — it's scraper
   metadata, not editorial authorship. */
.single-job_listing .entry-meta,
.single-job_listing .ast-single-post-meta,
.single-job_listing .posted-by { display: none; }

/* Sticky mobile apply bar */
.tj-mobile-apply-bar { display: none; }
@media (max-width: 768px) {
  body.tj360p-single-job { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tj-mobile-apply-bar {
    align-items: center;
    background: var(--tj-surface);
    border-top: 1px solid var(--tj-border);
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(24, 32, 51, 0.14);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    left: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 9990;
  }
  .tj-mobile-apply-bar__text { min-width: 0; }
  .tj-mobile-apply-bar__label {
    color: var(--tj-faint);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .tj-mobile-apply-bar__title {
    color: var(--tj-text);
    display: block;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tj-mobile-apply-bar__button {
    background: var(--tj-brand);
    border-radius: 10px;
    color: var(--tj-on-brand);
    font-size: 14px;
    font-weight: 800;
    min-height: 46px;
    padding: 12px 18px;
    text-decoration: none;
    white-space: nowrap;
  }
}

/* ─── Job alerts ──────────────────────────────────────────── */
.tj360-alerts {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius);
  box-shadow: var(--tj-shadow-sm);
  margin: 26px 0;
  padding: 22px;
}
.tj360-alerts__title { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.tj360-alerts__sub { color: var(--tj-muted); font-size: 14px; margin: 0 0 14px; }
.tj360-alerts__form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tj360-alerts__form input,
.tj360-alerts__form select {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border-strong);
  border-radius: 10px;
  color: var(--tj-text);
  font-size: 15px;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}
.tj360-alerts__notice { border-radius: 10px; font-size: 14px; font-weight: 600; margin: 0 0 12px; padding: 10px 14px; }
.tj360-alerts__notice--ok { background: var(--tj-good-soft); color: var(--tj-good); }
.tj360-alerts__notice--err { background: var(--tj-warn-soft); color: var(--tj-warn); }

/* ─── Saved jobs / recently viewed ────────────────────────── */
.tj360-saved-page .tj360-saved-empty { color: var(--tj-muted); }
.tj360-recent { margin: 30px 0; }
.tj360-recent__list { display: grid; gap: 10px; }
.tj360-mini-card {
  align-items: center;
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius-sm);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.tj360-mini-card a { color: var(--tj-text); font-weight: 700; text-decoration: none; }
.tj360-mini-card a:hover { color: var(--tj-brand); }
.tj360-mini-card small { color: var(--tj-muted); display: block; font-weight: 500; }
.tj360-mini-card button {
  background: none;
  border: 0;
  color: var(--tj-faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.tj360-mini-card button:hover { color: var(--tj-warn); }

/* ─── Dark-mode toggle ────────────────────────────────────── */
.tj-dark-toggle {
  align-items: center;
  background: var(--tj-surface);
  border: 1px solid var(--tj-border-strong);
  border-radius: 50%;
  bottom: 18px;
  box-shadow: var(--tj-shadow);
  color: var(--tj-brand);
  cursor: pointer;
  display: flex;
  height: 46px;
  justify-content: center;
  position: fixed;
  right: 16px;
  width: 46px;
  z-index: 9991;
}
.tj-dark-toggle svg { height: 21px; width: 21px; }
.tj-dark-toggle__moon { display: none; }
html[data-tj-theme="dark"] .tj-dark-toggle__moon { display: block; }
html[data-tj-theme="dark"] .tj-dark-toggle__sun { display: none; }
@media (max-width: 768px) {
  body.tj360p-single-job .tj-dark-toggle { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ─── WP Job Manager compatibility polish ─────────────────── */
.job_filters, .job_search_form {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius);
  box-shadow: var(--tj-shadow-sm);
}
ul.job_listings { border: 0; }
ul.job_listings li.job_listing {
  background: var(--tj-surface);
  border: 1px solid var(--tj-border);
  border-radius: var(--tj-radius);
  margin-bottom: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
ul.job_listings li.job_listing:hover { border-color: var(--tj-brand); box-shadow: var(--tj-shadow); }

/* ─── Responsive card collapse ────────────────────────────── */
@media (max-width: 640px) {
  .tj-jcard { gap: 12px; grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
  .tj-logo { height: 44px; width: 44px; }
  .tj-jcard__side {
    align-items: center;
    flex-direction: row;
    grid-column: 1 / -1;
    text-align: left;
    width: 100%;
  }
  .tj-jcard__time { margin-right: auto; }
  .tj-section__header-row { align-items: flex-start; flex-direction: column; }
  .tj-filter-chips { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding-bottom: 6px; }
  .tj-chip { flex: 0 0 auto; }
  .tj360-share-row .tj-share-btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
