/*
 * AR: Design system fixes, v1.1.0 (Nov 12, 2026; v1.0.0 the same day)
 * Loaded by ar-design-system-fixes.php after the theme, Beaver Builder and AR styles.
 * Plan and decisions: ar-staging-fixes/2026-11-12-p0/design-batch-plan.md
 *
 * Type: three steps + Small.
 *   Heading  Archivo Black  display clamp(34px,4.2vw,56px) / section clamp(26px,2.6vw,32px)
 *   Title    Inter 20/700
 *   Body     Inter 16/400 (600 for buttons)
 *   Small    Inter 14/400 or 14/600 (labels, meta, captions, footer)
 * Radius: two values. Controls 6px, cards 12px (tokens updated to match what renders).
 * Focus: visible outline on four links that had none.
 *
 * Every rule starts with :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds). It matches <html>
 * but carries the weight of five IDs, so this one file outranks the older layers
 * (ar-brand-system, ar26p-layout, ar26-ux-refresh, the homepage's inline styles, and the
 * four-ID eyebrow rule) without editing them. Inline style="... !important" set by
 * scripts still wins; none of those set a value this file changes.
 *
 * To undo: delete this file and ar-design-system-fixes.php.
 */

/* ---------- Tokens ---------- */
/* Shared tokens are owned by WPCode 23101 (Nov 15, 2026). */

/* ---------- Radius ---------- */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(.ar-tk-ctl-r, button.ar-video-a11y-toggle) {
  border-radius: var(--ar-radius-control) !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) .ar-tk-card-r {
  border-radius: var(--ar-radius-card) !important;
}

/* ---------- Type: Title ---------- */
/* Card titles: 18px on phones -> 20px everywhere; token navy instead of #20243D.
   "Find your specialist." (Archivo 24px) is a card heading like "Start your job search",
   so it takes the same Title step instead of a fourth heading size. */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) form.ar-specialist-finder > h2[id^="ar-finder-title-"] {
  font-family: Inter, Arial, sans-serif !important;
  font-size: var(--ar-fs-h3) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(.ar-home-industry, .ar-home-job-search) h3 {
  font-size: var(--ar-fs-h3) !important;
  font-weight: 700 !important;
  color: var(--ar-brand-navy, #1F243D) !important;
}

/* ---------- Type: Body ---------- */
/* Hero intro 18px -> 16px; buttons 15px and 17px -> 16px */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.home .new_video_ar_video .ar-v3-hero-support,
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) .pp-dual-button .pp-button :is(.pp-button-1-text, .pp-button-2-text),
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(button.ar-ux-button, .ar-home-job-search button, a.ar-closing-directory, a.ar-closing-phone) {
  font-size: var(--ar-fs-body) !important;
}

/* ---------- Type: Small ---------- */
/* 12px and 13px -> 14px */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(
  .ar-nav-cta.ar-tk-ctl-r,
  header button.ar-tk-ctl-r,
  .fl-page-header button.ar-tk-ctl-r,
  .ar-video-a11y-toggle,
  .ar-review-location,
  .ar-review-count,
  #ar-office-map figcaption,
  #ar-office-map svg text,
  #ar-office-map .ar-map-state-list button,
  #ar-office-map .ar-map-state-list button span,
  .ar-profile-eyebrow,
  .pp-social-icons .pp-social-icon a span,
  .ar26-footer-credits p,
  .ar26-footer-credits a,
  footer .fl-module-html a
) {
  font-size: var(--ar-fs-small) !important;
}
/* Weight 700 -> 600 for Small text links and labels */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(.ar-home-section-head > a, .ar-home-section-head > a > span, .ar-profile-eyebrow, footer .fl-rich-text strong) {
  font-weight: 600 !important;
}

/* Footer column headings: Archivo Black 14-16px -> Inter 14/600 */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) footer h2.fl-module-heading {
  font-family: Inter, Arial, sans-serif !important;
  font-size: var(--ar-fs-small) !important;
  font-weight: 600 !important;
}

/* ---------- Focus ---------- */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) :is(
  a:has(> img[alt="American Recruiters Logo"]),
  .ar-home-section-head > a,
  a.ar-recruiter-mention
):focus-visible {
  outline: 2px solid var(--ar-brand-red, #9B1B24) !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) a.ar-review-all:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 4px !important;
}

/* ======================================================================
 * v1.1.0 (Nov 12, 2026): hero fixes
 * Everything here applies only under body.ar-dsf-hero, which the plugin adds on the
 * homepage when AR_DSF_HERO_TEST_GATE allows it.
 * ====================================================================== */

/* Hero buttons: "Search Jobs" repeats the header button at every width, so it goes.
   "Request Talent" stays below 1360px (the header only shows it from 1360px up)
   and the whole button row goes at 1360px+. */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.home.ar-dsf-hero .new_video_ar_video .pp-dual-button-1 {
  display: none !important;
}
@media (min-width: 1360px) {
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.home.ar-dsf-hero .new_video_ar_video .fl-module-pp-dual-button {
    display: none !important;
  }
}

/* Hero alignment: the desktop hero row used a 40px side gutter, every other section 48px.
   From 1025px the hero text and the finder card now line up with the sections below. */
@media (min-width: 1025px) {
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.home.ar-dsf-hero .fl-node-teq3ir4lb1gp > .fl-row-content-wrap {
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
}

/* "I'm looking to": two buttons instead of a dropdown (markup from ar-design-system-fixes.php).
   Same 48px height as the dropdown it replaces, so nothing below moves. */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder fieldset.ar-purpose {
  border: 0 !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  min-width: 0;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder fieldset.ar-purpose legend {
  display: block;
  width: 100%;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: var(--ar-fs-small) !important;
  font-weight: 600 !important;
  color: var(--ar-brand-navy, #1F243D) !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options label {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid #B7B5B2;
  border-radius: var(--ar-radius-control);
  background: #fff;
  color: var(--ar-brand-navy, #1F243D) !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: var(--ar-fs-small) !important;
  font-weight: 600 !important;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options label:hover {
  border-color: var(--ar-brand-navy, #1F243D);
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options label:has(input:checked) {
  background: var(--ar-brand-navy, #1F243D);
  border-color: var(--ar-brand-navy, #1F243D);
  color: #fff !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-hero form.ar-specialist-finder .ar-purpose-options label:has(input:focus-visible) {
  outline: 2px solid var(--ar-brand-navy, #1F243D);
  outline-offset: 3px;
}

/* ======================================================================
 * v1.2.0 (Nov 12, 2026): /careers/recruiters/ type (impeccable typeset)
 * Roles: page title Archivo 44 (--ar-fs-h1, kept) | Title 20/700 names |
 * Body 16 intro, specialties, finder context | Small 14 role, location,
 * contact, labels, status, buttons. 11 styles -> 5.
 * Applies only under body.ar-dsf-type (added by the plugin; gated by AR_DSF_HERO_TEST_GATE).
 * ====================================================================== */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index p.hmg-cp-archive-description {
  font-size: var(--ar-fs-body) !important;
  line-height: 1.55 !important;
  color: var(--ar-secondary-text, #494441) !important;
  max-width: 40rem !important;
  text-wrap: pretty;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-finder-context {
  font-size: var(--ar-fs-body) !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  color: var(--ar-brand-navy, #1F243D) !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card h2.ar-card-name,
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card h2.ar-card-name a {
  font-family: Inter, Arial, sans-serif !important;
  font-size: var(--ar-fs-h3) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-wrap: balance;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card p.ar-card-specialty {
  font-size: var(--ar-fs-body) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--ar-brand-navy, #1F243D) !important;
  text-wrap: pretty;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > p:not(.ar-card-specialty),
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card .ar-contact-links a {
  font-size: var(--ar-fs-small) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index :is(.ar-card-bottom a.ar-tk-btn-outline, button#ar-recruiter-reset) {
  font-size: var(--ar-fs-small) !important;
  font-weight: 600 !important;
}

/* ======================================================================
 * v1.3.0 (Nov 12, 2026): /careers/recruiters/ card layout (impeccable layout)
 * Three groups per card: identity (photo, name, role) tight; expertise
 * (specialties) with room; details (location, contacts, View Profile) pinned to
 * the card bottom so they line up across every row. Contact links drop from
 * 48px blocks to 32px rows, 44px on touch screens.
 * ====================================================================== */
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > .ar-card-photo { margin-bottom: 16px !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > h2.ar-card-name { margin: 0 0 4px !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > h2.ar-card-name + p { margin: 0 0 16px !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > p.ar-card-specialty { margin: 0 0 24px !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > p.ar-card-specialty + p { margin: auto 0 8px !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > .ar-contact-links { margin: 0 0 16px !important; gap: 0 !important; }
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card .ar-contact-links a {
  display: flex !important; align-items: center; min-height: 32px !important; height: auto !important; padding: 0 !important; width: fit-content;
}
@media (pointer: coarse) {
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card .ar-contact-links a { min-height: 44px !important; }
}
:is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-type .hmg-cp-recruiters-index .ar-team-card > .ar-card-bottom { margin-top: 0 !important; }

/* ======================================================================
 * v1.3.0 (Nov 12, 2026): /careers/recruiters/ card layout (impeccable layout)
 * From 641px (phones already use their own compact card):
 *  - identity block: 88px photo beside name + role instead of on its own row
 *  - contact group: email, phone, LinkedIn on one wrapping line, not three rows
 *  - rhythm: 4px inside a group, 16px between groups; the specialty row takes the
 *    spare height so "Based in", contacts and View Profile still line up per row.
 * Applies only under body.ar-dsf-layout (gated by AR_DSF_LAYOUT_TEST_GATE).
 * ====================================================================== */
@media (min-width: 641px) {
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    grid-template-rows: auto auto 1fr auto auto auto !important;
    column-gap: 16px !important;
    row-gap: 0 !important;
    align-content: stretch !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > * {
    grid-column: 1 / -1 !important;
    min-width: 0;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > .ar-card-photo {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 88px !important;
    height: 88px !important;
    margin: 0 !important;
    align-self: center !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > h2.ar-card-name {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: end !important;
    margin: 0 0 4px !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > h2.ar-card-name + p {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    margin: 0 !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > p.ar-card-specialty {
    align-self: start !important;
    margin: 16px 0 0 !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > p.ar-card-specialty + p {
    margin: 16px 0 0 !important;
  }
  :is(html, #ar-ds#ar-ds#ar-ds#ar-ds#ar-ds) body.ar-dsf-layout .hmg-cp-recruiters-index .ar-team-card > .ar-contact-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    align-content: flex-start !important;
    gap: 4px 20px !important;
    min-height: 68px !important; /* two lines of 32px links + 4px: keeps View Profile level across a row */
    margin: 4px 0 16px !important;
  }
}
