/* ============================================================
   JobAi — Job advertisement (node bundle: jobs, full view)
   Targets Drupal node markup as-emitted:
     <article class="node jobs node--jobs--full"> … fields … </article>
   No markup changes needed. Self-contained: reuses styles.css
   tokens when present, with standalone fallbacks; icons are inline SVG.
   ============================================================ */

:root {
  --nj-bg: var(--bg, oklch(0.991 0.004 290));
  --nj-surface: var(--surface, #fff);
  --nj-tint: var(--bg-tint, oklch(0.972 0.009 290));
  --nj-ink: var(--ink, oklch(0.205 0.021 285));
  --nj-soft: var(--ink-soft, oklch(0.38 0.018 285));
  --nj-muted: var(--muted, oklch(0.53 0.016 285));
  --nj-line: var(--line, oklch(0.905 0.009 285));
  --nj-line-soft: var(--line-soft, oklch(0.94 0.007 285));
  --nj-violet: var(--violet, oklch(0.515 0.205 285));
  --nj-violet-700: var(--violet-700, oklch(0.445 0.198 285));
  --nj-violet-50: var(--violet-50, oklch(0.968 0.022 285));
  --nj-violet-100: var(--violet-100, oklch(0.93 0.045 285));
  --nj-serif: "Newsreader", Georgia, serif;
  --nj-sans: "Schibsted Grotesk", system-ui, sans-serif;
}

/* ---------- Container ---------- */
.node--jobs--full {
  /* max-width: 880px; */
  margin-inline: auto;
  padding: 1.6rem 1.4rem 4rem;
  font-family: var(--nj-sans);
  color: var(--nj-soft);
  font-size: 1.06rem;
  line-height: 1.75;
}

/* ---------- Hide redundant / admin-only fields ---------- */
.node--jobs--full .field--name-field-description,   /* duplicate of body */
.node--jobs--full .field--name-field-status,        /* scraper status */
.node--jobs--full .field--name-field-fetch-job {
  /* internal flag */
  display: none !important;
}

/* ---------- Layout: fact bar on top, article below ---------- */
.node--jobs--full .node__content {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: stretch;
}
.node--jobs--full .node__content > * {
  flex: 1 1 100%;
  margin: 0;
}

/* ---------- Generic field label ---------- */
.node--jobs--full .field__label {
  font-family: var(--nj-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nj-muted);
  margin-bottom: 0.35rem;
}

/* ---------- Fact bar (City / Country / Extent / Working Mode / Duration) ---------- */
.node--jobs--full .field--name-field-city,
.node--jobs--full .field--name-field-country,
.node--jobs--full .field--name-field-extent,
.node--jobs--full .field--name-field-working-mode,
.node--jobs--full .field--name-field-duration {
  order: 1;
  flex: 1 1 150px;
  background: var(--nj-surface);
  border: 1px solid var(--nj-line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px oklch(0.3 0.05 285 / 0.04);
}
.node--jobs--full .field--name-field-city .field__item,
.node--jobs--full .field--name-field-country .field__item,
.node--jobs--full .field--name-field-extent .field__item,
.node--jobs--full .field--name-field-duration .field__item {
  font-weight: 600;
  color: var(--nj-ink);
  font-size: 0.98rem;
}

/* City gets a location pin (inline SVG, no icon font) */
.node--jobs--full .field--name-field-city .field__item::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 0.4rem;
  vertical-align: -1px;
  background: no-repeat center / 11px 11px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%236E40E0'%3E%3Cpath d='M8 0a5 5 0 0 0-5 5c0 3.6 4.4 10.2 4.6 10.5a.5.5 0 0 0 .8 0C8.6 15.2 13 8.6 13 5a5 5 0 0 0-5-5zm0 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4z'/%3E%3C/svg%3E");
}

/* Working Mode value as a violet pill */
.node--jobs--full .field--name-field-working-mode .field__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--nj-violet-50);
  color: var(--nj-violet-700);
  border: 1px solid var(--nj-violet-100);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.node--jobs--full .field--name-field-working-mode .field__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nj-violet);
}

/* ---------- Body / article ---------- */
.node--jobs--full .field--name-body {
  order: 2;
  margin-top: 1.5rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--nj-line);
}
.node--jobs--full .field--name-body p {
  margin: 0 0 1.05rem;
}

/* lead intro = first paragraph */
.node--jobs--full .field--name-body > p:first-child {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--nj-ink);
}
.node--jobs--full .field--name-body > p:first-child strong {
  font-weight: 600;
}

/* standalone bold lines (not the intro) become serif subheadings */
.node--jobs--full
  .field--name-body
  p:not(:first-child):has(> strong:only-child) {
  font-family: var(--nj-serif);
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--nj-ink);
  margin: 2rem 0 0.7rem;
}
.node--jobs--full
  .field--name-body
  p:not(:first-child):has(> strong:only-child)
  strong {
  font-weight: 600;
}

.node--jobs--full .field--name-body strong {
  color: var(--nj-ink);
  font-weight: 700;
}
.node--jobs--full .field--name-body em {
  color: var(--nj-soft);
}

/* bullet lists with violet dots */
.node--jobs--full .field--name-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.3rem;
}
.node--jobs--full .field--name-body li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0.45rem 0;
}
.node--jobs--full .field--name-body li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.66em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nj-violet);
}

.node--jobs--full .field--name-body a {
  color: var(--nj-violet-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

/* ---------- Application = call-to-action card ---------- */
.node--jobs--full .field--name-field-application {
  order: 3;
  margin-top: 1.6rem;
  background: var(--nj-violet-50);
  border: 1px solid var(--nj-violet-100);
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
}
.node--jobs--full .field--name-field-application .field__label {
  font-family: var(--nj-serif);
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--nj-ink);
  margin-bottom: 0.7rem;
}
.node--jobs--full .field--name-field-application .field__item p {
  margin: 0 0 0.5rem;
  font-size: 0.97rem;
  color: var(--nj-soft);
}
.node--jobs--full .field--name-field-application .field__item p:last-child {
  margin-bottom: 0;
}
.node--jobs--full .field--name-field-application a {
  color: var(--nj-violet-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

/* ---------- Source URL = subtle footnote ---------- */
.node--jobs--full .field--name-field-source-url {
  order: 4;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nj-line-soft);
  font-size: 0.85rem;
}
.node--jobs--full .field--name-field-source-url .field__label {
  display: inline;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  color: var(--nj-muted);
}
.node--jobs--full .field--name-field-source-url .field__label::after {
  content: ":\00a0";
}
.node--jobs--full .field--name-field-source-url .field__item {
  display: inline;
}
.node--jobs--full .field--name-field-source-url a {
  color: var(--nj-muted);
  word-break: break-all;
}

/* ---------- Optional hero/header (used by demo; safe if absent) ---------- */
.job-ad-hero {
  /* max-width: 880px; */
  margin-inline: auto;
  padding: 2.6rem 1.4rem 0;
}
.job-ad-hero .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--nj-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.job-ad-hero .back:hover {
  color: var(--nj-violet-700);
}
.job-ad-hero h1 {
  font-family: var(--nj-serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--nj-ink);
  margin: 0.3rem 0 0.8rem;
}
.job-ad-hero .sub {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--nj-muted);
  font-size: 1rem;
}
.job-ad-hero .apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--nj-violet);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  margin-top: 1.5rem;
  box-shadow: 0 6px 18px oklch(0.515 0.205 285 / 0.28);
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}
.job-ad-hero .apply-btn:hover {
  background: var(--nj-violet-700);
  transform: translateY(-1px);
  color: #fff;
}
