/*
 * AJ Jobs — public styles.
 *
 * Built on the same tokens as aj-events and aj-comp so the board reads as part
 * of the site: ink on white, brand blue for the actions and the "this one's
 * for you" signals, gold only ever for Featured, red only for the button.
 * Cards borrow the aj-events card (14px radius, hairline border, lift on
 * hover); boxes borrow aj-comp's blue top rule.
 */

:root {
  --aj-ink: var(--wp--preset--color--ink, #14202e);
  --aj-paper: var(--wp--preset--color--paper, #faf6ee);
  --aj-blue: var(--wp--preset--color--brand-blue, #0592ce);
  --aj-red: var(--wp--preset--color--brand-red, #ff1d27);
  --aj-gold: var(--wp--preset--color--brand-gold, #e8a33e);
  --aj-gold-deep: var(--wp--preset--color--brand-gold-deep, #9a6512);
  --aj-line: rgba(20, 32, 46, 0.12);
  --aj-radius: 14px;
  --aj-jobs-tint: rgba(5, 146, 206, 0.08);
}

.aj-jobs-template { padding: 2rem 0 4rem; }

.aj-jobs-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.aj-jobs { color: var(--aj-ink); }
.aj-jobs *, .aj-jobs *::before, .aj-jobs *::after { box-sizing: border-box; }

.aj-jobs-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Board header ------------------------------------------------------ */
.aj-jobs-board__head { margin: 0 0 1.25rem; }
.aj-jobs-board__title { margin: 0 0 0.4rem; line-height: 1.1; }
.aj-jobs-board__intro { margin: 0; max-width: 62ch; font-size: 1.05rem; opacity: 0.8; }

/* ---- Filters ----------------------------------------------------------- */
.aj-jobs-filters { margin: 0 0 1rem; }

/* The visa question leads, on its own tinted band. */
.aj-jobs-filters__visa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: var(--aj-jobs-tint);
  border: 1px solid rgba(5, 146, 206, 0.22);
}

.aj-jobs-filters__visa label { font-weight: 800; font-size: 1rem; white-space: nowrap; }
/* min-width:0 + width:100% — a select's minimum width is its longest option,
   and the spouse options are long enough to push it out of the band on a phone. */
.aj-jobs-filters__visa select { flex: 1 1 280px; min-width: 0; width: 100%; max-width: 520px; font-size: 1rem; font-weight: 600; }

/* Phone: search on its own line, the four filters two by two, then the button.
   Wider: search + button on one line, filters under. Widest: one line. */
.aj-jobs-filters__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.aj-jobs-filters__row input[type="search"] { grid-column: 1 / -1; }
.aj-jobs-filters__row select { min-width: 0; width: 100%; }
/* Stretch, not centre: the button then fills the row exactly, so it lines up
   with the search box and selects whatever height the theme gives them. */
.aj-jobs-filters__go { grid-column: 1 / -1; align-self: stretch; display: flex; align-items: stretch; gap: 0.75rem; }
.aj-jobs-filters__go .aj-jobs-clear { align-self: center; }

@media (min-width: 720px) {
  .aj-jobs-filters__row { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .aj-jobs-filters__row input[type="search"] { grid-column: 1 / 5; grid-row: 1; }
  .aj-jobs-filters__go { grid-column: 5; grid-row: 1; }
}

@media (min-width: 1040px) {
  .aj-jobs-filters__row { grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) auto; }
  .aj-jobs-filters__row input[type="search"],
  .aj-jobs-filters__go { grid-column: auto; grid-row: auto; }
}

.aj-jobs-filters select,
.aj-jobs-filters input[type="search"] {
  min-height: 42px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--aj-line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--aj-ink);
  font: inherit;
  font-size: 0.92rem;
  margin: 0;
}

.aj-jobs-filters select:focus,
.aj-jobs-filters input:focus {
  outline: none;
  border-color: var(--aj-blue);
  box-shadow: 0 0 0 3px rgba(5, 146, 206, 0.18);
}

.aj-jobs-clear { font-size: 0.88rem; color: var(--aj-blue); text-decoration: none; padding: 0 0.25rem; }
.aj-jobs-clear:hover { text-decoration: underline; }

/* ---- Callout + count ---------------------------------------------------- */
.aj-jobs-callout {
  margin: 0 0 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  background: var(--aj-paper);
  border: 1px solid var(--aj-line);
  font-size: 0.92rem;
}

.aj-jobs-callout--spouse {
  background: var(--aj-jobs-tint);
  border-color: transparent;
  border-left: 4px solid var(--aj-blue);
  font-weight: 600;
}

.aj-jobs-count { margin: 0 0 0.6rem; font-size: 0.85rem; font-weight: 700; opacity: 0.6; }

/* ---- The list ----------------------------------------------------------
   Theme content styles (Neve's .entry-content ul li, ::before bullets) reach
   this list when the board sits on a page, so the reset is emphatic. */
.aj-jobs-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  gap: 0.75rem;
}

.aj-jobs-list > li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.aj-jobs-list > li::marker { content: ""; }
.aj-jobs-list > li::before { content: none !important; display: none !important; }

.aj-jobs-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  background: #fff;
  color: inherit;
  text-decoration: none !important;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.aj-jobs-card:hover,
.aj-jobs-card:focus-visible {
  box-shadow: 0 10px 26px rgba(20, 32, 46, 0.12);
  transform: translateY(-2px);
  border-color: transparent;
  color: inherit;
}

.aj-jobs-card.is-featured { border-color: rgba(232, 163, 62, 0.6); box-shadow: inset 4px 0 0 var(--aj-gold); }
.aj-jobs-card.is-featured:hover { box-shadow: inset 4px 0 0 var(--aj-gold), 0 10px 26px rgba(20, 32, 46, 0.12); }

/* The logo plate: landscape, so wordmarks read and square icons sit in the
   middle. Padding keeps a logo off the edge; contain never crops it. */
.aj-jobs-card__logo,
.aj-jobs-single__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 56px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--aj-line);
  background: #fff;
  overflow: hidden;
}

.aj-jobs-card__logo img,
.aj-jobs-single__logo img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}

/* No logo: initials in one of the brand colours, picked by company name so a
   company is always the same colour. */
.aj-jobs-card__logo.is-initials,
.aj-jobs-single__logo.is-initials {
  border-color: transparent;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.is-initials.is-tone-0 { background: rgba(5, 146, 206, 0.12); color: #04608a; }
.is-initials.is-tone-1 { background: rgba(255, 29, 39, 0.1); color: #b3121b; }
.is-initials.is-tone-2 { background: rgba(232, 163, 62, 0.2); color: #8a5a10; }
.is-initials.is-tone-3 { background: rgba(20, 32, 46, 0.08); color: #14202e; }

.aj-jobs-card__main { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.aj-jobs-card__top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.aj-jobs-card__company { font-size: 0.85rem; font-weight: 700; opacity: 0.75; }
.aj-jobs-card__title { font-size: 1.1rem; font-weight: 800; line-height: 1.25; transition: color 0.12s; }
.aj-jobs-card:hover .aj-jobs-card__title { color: var(--aj-blue); }
.aj-jobs-card__meta { font-size: 0.86rem; opacity: 0.7; }
.aj-jobs-card__when { font-size: 0.78rem; opacity: 0.55; white-space: nowrap; padding-top: 0.15rem; }

@media (max-width: 560px) {
  .aj-jobs-card { grid-template-columns: 64px minmax(0, 1fr); padding: 0.9rem; gap: 0.75rem; }
  .aj-jobs-card__logo { width: 64px; height: 44px; padding: 4px 6px; border-radius: 10px; }
  .aj-jobs-card__logo.is-initials { font-size: 0.95rem; }
  .aj-jobs-card__when { grid-column: 2; padding: 0; }
}

/* Flags — gold is Featured (ink on gold, as on the events cards). */
.aj-jobs-flag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aj-ink);
  background: var(--aj-gold);
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
}

.aj-jobs-flag--new { background: var(--aj-jobs-tint); color: var(--aj-blue); }

/* Chips — who can be hired. */
.aj-jobs-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }

.aj-jobs-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.22em 0.65em;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(20, 32, 46, 0.07);
  color: var(--aj-ink);
  line-height: 1.4;
}

.aj-jobs-chip--sponsor { background: var(--aj-blue); color: #fff; }
.aj-jobs-chip--spouse { background: #fff; border-color: var(--aj-blue); color: var(--aj-blue); }

/* ---- Pagination + empty ------------------------------------------------- */
.aj-jobs-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}

.aj-jobs-pages a { color: var(--aj-blue); font-weight: 700; text-decoration: none; }
.aj-jobs-pages span { opacity: 0.6; }

.aj-jobs-empty {
  padding: 2rem 1.25rem;
  border: 1px dashed var(--aj-line);
  border-radius: var(--aj-radius);
  text-align: center;
}

.aj-jobs-empty p { margin: 0 0 0.5rem; }
.aj-jobs-empty a { color: var(--aj-blue); font-weight: 700; }

/* ---- One job ------------------------------------------------------------ */
.aj-jobs-back {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--aj-blue);
  text-decoration: none;
}

.aj-jobs-back:hover { text-decoration: underline; }

.aj-jobs-single__head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.aj-jobs-single__head .aj-jobs-single__logo { width: 120px; height: 76px; padding: 8px 10px; border-radius: 14px; }
.aj-jobs-single__head .aj-jobs-single__logo.is-initials { font-size: 1.5rem; }
.aj-jobs-single__company { margin: 0 0 0.2rem; font-weight: 700; opacity: 0.8; }
.aj-jobs-single__company a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--aj-line); }
.aj-jobs-single__company a:hover { color: var(--aj-blue); border-color: var(--aj-blue); }
.aj-jobs-single__title { margin: 0 0 0.35rem; line-height: 1.15; font-size: clamp(1.6rem, 4.5vw, 2.4rem); }

@media (max-width: 560px) {
  .aj-jobs-single__head { grid-template-columns: 76px minmax(0, 1fr); gap: 0.8rem; }
  .aj-jobs-single__head .aj-jobs-single__logo { width: 76px; height: 52px; padding: 5px 6px; border-radius: 12px; }
  .aj-jobs-single__head .aj-jobs-single__logo.is-initials { font-size: 1.05rem; }
}

.aj-jobs-state {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: var(--aj-paper);
  border: 1px solid var(--aj-line);
  font-weight: 600;
}

.aj-jobs-state a { color: var(--aj-blue); margin-left: 0.35rem; }

.aj-jobs-single__layout { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }

@media (min-width: 880px) {
  .aj-jobs-single__layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .aj-jobs-single__side { position: sticky; top: 1.5rem; }
  /* The side card repeats the facts; on a phone they sit above the description instead. */
}

@media (max-width: 879px) {
  .aj-jobs-single__side { order: -1; }
}

.aj-jobs-glance {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--aj-line);
  border-radius: var(--aj-radius);
  background: #fff;
}

.aj-jobs-glance dl { margin: 0 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 0.9rem; }
.aj-jobs-glance dt { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.55; padding-top: 0.15rem; }
.aj-jobs-glance dd { margin: 0; font-weight: 600; font-size: 0.95rem; }

/* Who can be hired — the community's box. */
.aj-jobs-who {
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  background: var(--aj-paper);
  border-left: 4px solid var(--aj-blue);
}

.aj-jobs-who h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.aj-jobs-who p { margin: 0 0 0.5rem; }
.aj-jobs-who p:last-child { margin-bottom: 0; }
.aj-jobs-who__spouse { font-weight: 600; }
.aj-jobs-who__record a { color: var(--aj-blue); font-weight: 700; }

.aj-jobs-fit {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
  background: rgba(20, 32, 46, 0.05);
}

.aj-jobs-fit[hidden] { display: none; }
.aj-jobs-fit.is-yes { background: var(--aj-jobs-tint); color: #04608a; font-weight: 600; }
.aj-jobs-fit.is-no { background: rgba(255, 29, 39, 0.08); color: #a3121a; font-weight: 600; }

.aj-jobs-desc { margin: 0 0 2rem; line-height: 1.65; }
.aj-jobs-desc > :first-child { margin-top: 0; }
/* Job ads are mostly headings and bullet lists; give them a consistent rhythm
   whatever the theme does to h3 and ul. */
.aj-jobs-desc h2, .aj-jobs-desc h3, .aj-jobs-desc h4 { margin: 1.6em 0 0.5em; font-size: 1.15rem; line-height: 1.3; }
.aj-jobs-desc p { margin: 0 0 1em; }
.aj-jobs-desc ul, .aj-jobs-desc ol { margin: 0 0 1em; padding-left: 1.3em; }
.aj-jobs-desc ul { list-style: disc; }
.aj-jobs-desc ol { list-style: decimal; }
.aj-jobs-desc li { margin: 0 0 0.35em; }

/* ---- Boxes and forms (aj-comp's card: blue rule on top) ------------------ */
.aj-jobs-card-box {
  border: 1px solid var(--aj-line);
  border-top: 4px solid var(--aj-blue);
  border-radius: var(--aj-radius);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 6px 24px rgba(20, 32, 46, 0.06);
  scroll-margin-top: 1.5rem;
}

.aj-jobs-card-box > h2 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.aj-jobs-apply__lede { margin: 0 0 1.1rem; opacity: 0.75; }

.aj-jobs-form { margin: 0; }
.aj-jobs-form fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
.aj-jobs-form legend { font-weight: 800; font-size: 1.05rem; margin: 0 0 0.75rem; padding: 0; }

.aj-jobs-row { display: grid; gap: 0 0.9rem; grid-template-columns: 1fr; }

@media (min-width: 520px) {
  .aj-jobs-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 680px) {
  .aj-jobs-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}

.aj-jobs-field { margin: 0 0 0.95rem; min-width: 0; }

.aj-jobs-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.aj-jobs-req { color: var(--aj-red); }
.aj-jobs-optional { font-weight: 400; opacity: 0.6; }

.aj-jobs-form input[type="text"],
.aj-jobs-form input[type="email"],
.aj-jobs-form input[type="tel"],
.aj-jobs-form input[type="url"],
.aj-jobs-form input[type="date"],
.aj-jobs-form select,
.aj-jobs-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--aj-line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--aj-ink);
  font-size: 1rem;
  font-family: inherit;
  margin: 0;
}

.aj-jobs-form input:focus,
.aj-jobs-form select:focus,
.aj-jobs-form textarea:focus {
  outline: none;
  border-color: var(--aj-blue);
  box-shadow: 0 0 0 3px rgba(5, 146, 206, 0.18);
}

.aj-jobs-form .is-invalid { border-color: var(--aj-red) !important; }

/* The visa select is the one that matters, so it gets the weight. */
.aj-jobs-field--visa select { font-weight: 600; border-color: rgba(5, 146, 206, 0.45); }

.aj-jobs-field--file input[type="file"] {
  width: 100%;
  padding: 0.85rem;
  border: 1px dashed rgba(5, 146, 206, 0.5);
  border-radius: 10px;
  background: var(--aj-jobs-tint);
  font: inherit;
  font-size: 0.92rem;
}

.aj-jobs-hint { display: block; margin-top: 0.3rem; font-size: 0.8rem; opacity: 0.7; font-weight: 400; }

.aj-jobs-choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  margin: 0 0 0.5rem;
  border: 1px solid var(--aj-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.aj-jobs-choice input { margin-top: 0.25rem; flex: 0 0 auto; }
.aj-jobs-choice:has(input:checked) { border-color: var(--aj-blue); background: var(--aj-jobs-tint); }
.aj-jobs-choice--spouse { margin-top: 0.9rem; }

/* Post a job: the apply link only matters for "on our own site", and the
   spouse promise means nothing on a citizens-only job (the server drops it
   too). :has() is progressive — without it both simply stay visible. */
.aj-jobs-form fieldset:has(input[name="apply_mode"][value="form"]:checked) .aj-jobs-apply-url { display: none; }
.aj-jobs-form fieldset:has(input[name="rights"][value="citizen"]:checked) .aj-jobs-choice--spouse { display: none; }

/* Off-screen rather than display:none, which some bots skip. */
.aj-jobs-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aj-jobs-privacy { margin: 0.9rem 0 0; font-size: 0.8rem; opacity: 0.7; }

.aj-jobs-flash {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--aj-jobs-tint);
  border: 1px solid var(--aj-blue);
  font-weight: 600;
}

.aj-jobs-flash[hidden] { display: none; }

.aj-jobs-flash.is-error {
  background: rgba(255, 29, 39, 0.08);
  border-color: var(--aj-red);
}

.aj-jobs-form.is-done > *:not([data-aj-jobs-result]) { display: none !important; }

/* ---- Buttons -------------------------------------------------------------
   Doubled class to outrank the theme's button / [type=submit] rules, which
   otherwise repaint the hover — same trick and same dark red as aj-comp. */
.aj-jobs-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition: transform 0.12s ease, background-color 0.12s ease, opacity 0.12s ease;
}

.aj-jobs-btn.aj-jobs-btn,
.aj-jobs-btn.aj-jobs-btn:link,
.aj-jobs-btn.aj-jobs-btn:visited { background-color: var(--aj-red); color: #fff; }

.aj-jobs-btn.aj-jobs-btn:hover,
.aj-jobs-btn.aj-jobs-btn:focus { background-color: #d6121b; color: #fff; }

.aj-jobs-btn.aj-jobs-btn:hover { transform: translateY(-1px); }
.aj-jobs-btn.aj-jobs-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.aj-jobs-btn--small.aj-jobs-btn--small {
  width: auto;
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  font-size: 0.92rem;
  background-color: var(--aj-ink);
}

.aj-jobs-btn--small.aj-jobs-btn--small:hover,
.aj-jobs-btn--small.aj-jobs-btn--small:focus { background-color: var(--aj-blue); }

/* ---- Read the full description ------------------------------------------
   The script folds long descriptions (it adds .is-folded) and shows the
   button; without it, everything is shown. The fade says "there's more". */
.aj-jobs-desc.is-folded {
  max-height: 22rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
  margin-bottom: 0.5rem;
}

.aj-jobs .aj-jobs-reveal {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin: 0 0 2rem !important;
  padding: 0.75rem 1rem;
  border: 1px solid var(--aj-blue);
  border-radius: 10px;
  background: #fff;
  color: var(--aj-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.aj-jobs .aj-jobs-reveal:hover,
.aj-jobs .aj-jobs-reveal:focus { background: var(--aj-jobs-tint); color: var(--aj-blue); }
.aj-jobs .aj-jobs-reveal[hidden] { display: none; }

/* ---- "Hear more about life in the US?" -------------------------------- */
.aj-jobs-optin { margin: 0 0 0.85rem; font-size: 0.88rem; }
.aj-jobs-optin[hidden] { display: none; }
.aj-jobs-optin__ask { display: flex; gap: 0.5rem; align-items: flex-start; cursor: pointer; line-height: 1.4; }
.aj-jobs-optin__ask input { margin-top: 0.2rem; flex: 0 0 auto; }
.aj-jobs-optin__fields { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.aj-jobs-optin__fields[hidden] { display: none; }

.aj-jobs-optin__fields input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--aj-line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  margin: 0;
}

.aj-jobs-optin__fields input:focus { outline: none; border-color: var(--aj-blue); box-shadow: 0 0 0 3px rgba(5, 146, 206, 0.18); }
.aj-jobs-optin__fields .is-invalid { border-color: var(--aj-red); }
.aj-jobs-optin__result { margin: 0.5rem 0 0 !important; padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--aj-jobs-tint); font-weight: 600; }
.aj-jobs-optin__result[hidden] { display: none; }
.aj-jobs-optin__result.is-error { background: rgba(255, 29, 39, 0.08); color: #a3121a; }
.aj-jobs-choice--newsletter { margin: 0.25rem 0 1rem; }

/* ---- Jobs by visa (crawlable links to every visa page) ----------------- */
.aj-jobs-visas { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--aj-line); }
.aj-jobs-visas__label { display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.55; margin-bottom: 0.5rem; }
.aj-jobs .aj-jobs-visas ul { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.aj-jobs .aj-jobs-visas li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.aj-jobs .aj-jobs-visas li::before { content: none !important; }
.aj-jobs-visas a { display: inline-block; padding: 0.3rem 0.75rem; border: 1px solid var(--aj-line); border-radius: 999px; font-size: 0.85rem; color: var(--aj-ink); text-decoration: none; }
.aj-jobs-visas a:hover, .aj-jobs-visas a:focus { border-color: var(--aj-blue); color: var(--aj-blue); }
.aj-jobs-visas a[aria-current="page"] { background: var(--aj-blue); border-color: var(--aj-blue); color: #fff; }

/* ---- Inside a page's content ----------------------------------------------
   On a page ([aj_jobs], or the old [jobs] shortcode on /job/), the child
   theme's custom CSS gives every p, heading, list and button in
   .entry-content `margin-bottom: 20px !important`. That pushed the Search
   button 9px above the row it sits in and loosened everything else. Only
   !important beats !important, so these put the board's own spacing back,
   scoped to .aj-jobs so nothing outside the board is touched. */
.aj-jobs .aj-jobs-btn { margin: 0 !important; }
.aj-jobs .aj-jobs-list { margin: 0 !important; }
.aj-jobs .aj-jobs-count { margin-bottom: 0.6rem !important; }
.aj-jobs .aj-jobs-callout { margin-bottom: 1rem !important; }
.aj-jobs .aj-jobs-fit,
.aj-jobs .aj-jobs-privacy,
.aj-jobs .aj-jobs-flash { margin-bottom: 0 !important; }
.aj-jobs .aj-jobs-who h2 { margin-bottom: 0.5rem !important; }
.aj-jobs .aj-jobs-who p { margin-bottom: 0.5rem !important; }
.aj-jobs .aj-jobs-who p:last-child { margin-bottom: 0 !important; }
.aj-jobs .aj-jobs-card-box > h2 { margin-bottom: 0.25rem !important; }
.aj-jobs .aj-jobs-apply__lede { margin-bottom: 1.1rem !important; }
.aj-jobs .aj-jobs-empty p { margin-bottom: 0.5rem !important; }
.aj-jobs .aj-jobs-empty p:last-child { margin-bottom: 0 !important; }
.aj-jobs .aj-jobs-board__intro { margin-bottom: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .aj-jobs-card, .aj-jobs-btn { transition: none; }
  .aj-jobs-card:hover, .aj-jobs-btn.aj-jobs-btn:hover { transform: none; }
}
