/* PD Job Board — filter dropdowns, Job Row extras (tags, meta, arrow), empty state and single-job shortcode output.
 * Colours map to the existing Kit globals (approved 2026-11-04, no new globals). Kit vars are used
 * rather than the child-theme ones because the linked style.css on WP Engine is stale.
 * The hex after each var() is only a fallback for when the token is not printed on the page.
 * Job Row layout, spacing and hover live in Elementor (PD Job Row loop item); only what native can't do is here.
 *
 * Selectors are prefixed with .pd-job-filters / .e-loop-item on purpose: the Elementor Kit styles every
 * <button> and heading title site-wide (green fill, 15/600, 12px 20px padding, Outfit 800), and those
 * rules out-rank a single class. */

/* Elementor prints the Kit colour vars on body.elementor-kit-N, not :root — resolve them there. */
body {
  --pdjb-bg:      var(--e-global-color-primary, #043264);    /* section bg (design #19324B) */
  --pdjb-surface: var(--e-global-color-pd_navy900, #02203F); /* card, select box, menu (design #0D3257) */
  --pdjb-hover:   var(--e-global-color-pd_navy800, #0A2A52); /* option / chip hover (design #213E5C) */
  --pdjb-accent:  var(--e-global-color-secondary, #53DD90);  /* green accent */
  --pdjb-white:   var(--e-global-color-pd_white, #FFFFFF);
  --pdjb-text:    var(--e-global-color-pd_border, #DDE4EC);  /* body text (design #C9D3DE) */
  --pdjb-muted:   var(--e-global-color-pd_soft, #D3E4F4);    /* labels, count (design #A3B1C2) */
  --pdjb-divider: rgba(255, 255, 255, .18);
  --pdjb-font:    "Urbanist", "Inter", sans-serif;
  --pdjb-display: "Outfit", sans-serif;
}

/* ---- Filter -------------------------------------------------------------- */
.pd-job-filters { display: flex; flex-direction: column; gap: 16px; font-family: var(--pdjb-font); }
.pd-job-filters .pd-jobs__selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pd-job-filters .pd-jobs__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pd-job-filters .pd-jobs__count { margin: 0; font-size: 14px; line-height: 1.2; color: var(--pdjb-muted); }
.pd-job-filters .pd-jobs__filter-label { margin: 0 0 10px; font-size: 13px; line-height: 1.2; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pdjb-muted); }

/* Reset the Kit's global button look on every control in the filter. */
.pd-job-filters button,
.pd-job-filters button:hover,
.pd-job-filters button:focus,
.pd-job-filters button:active { margin: 0; min-height: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; color: inherit; font: inherit; line-height: inherit; letter-spacing: normal; text-transform: none; text-decoration: none; }

.pd-job-filters .pd-jobs__clear,
.pd-job-filters .pd-jobs__clear:hover,
.pd-job-filters .pd-jobs__clear:focus { font: 600 14px/1.2 var(--pdjb-font); color: var(--pdjb-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pd-job-filters .pd-jobs__clear[hidden] { display: none; }

.pd-job-filters .pd-sel { position: relative; }
.pd-job-filters .pd-sel__box,
.pd-job-filters .pd-sel__box:focus,
.pd-job-filters .pd-sel__box:active { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--pdjb-surface); border: 1px solid var(--pdjb-divider); border-radius: 6px; color: var(--pdjb-white); font: 500 16px/1.2 var(--pdjb-font); text-align: left; cursor: pointer; }
.pd-job-filters .pd-sel__box:hover { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--pdjb-surface); border: 1px solid rgba(255, 255, 255, .4); border-radius: 6px; color: var(--pdjb-white); font: 500 16px/1.2 var(--pdjb-font); }
.pd-job-filters .pd-sel.is-open .pd-sel__box,
.pd-job-filters .pd-sel__box:focus-visible { border-color: var(--pdjb-accent); outline: none; }
.pd-job-filters .pd-sel__values { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pd-job-filters .pd-sel__ph { color: var(--pdjb-muted); }
.pd-job-filters .pd-sel__chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: var(--pdjb-hover); border: 1px solid color-mix(in srgb, var(--pdjb-accent) 50%, transparent); border-radius: 4px; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--pdjb-white); }
.pd-job-filters .pd-sel__x { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; color: var(--pdjb-accent); font-size: 16px; line-height: 1; }
.pd-job-filters .pd-sel__x:hover { background: var(--pdjb-accent); color: var(--pdjb-bg); }
.pd-job-filters .pd-sel__chev { flex: none; color: var(--pdjb-accent); transition: transform .2s; }
.pd-job-filters .pd-sel.is-open .pd-sel__chev { transform: rotate(180deg); }

.pd-job-filters .pd-sel__menu { display: none; position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow: auto; background: var(--pdjb-surface); border: 1px solid color-mix(in srgb, var(--pdjb-accent) 40%, transparent); border-radius: 6px; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
.pd-job-filters .pd-sel.is-open .pd-sel__menu { display: block; }
.pd-job-filters .pd-sel__menu li { margin: 0; padding: 0; list-style: none; }
.pd-job-filters .pd-sel__opt,
.pd-job-filters .pd-sel__opt:hover,
.pd-job-filters .pd-sel__opt:focus,
.pd-job-filters .pd-sel__opt:active { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: transparent; border-radius: 4px; color: var(--pdjb-white); font: 500 16px/1.2 var(--pdjb-font); text-align: left; cursor: pointer; }
/* The Kit animates every button property (transition: all) — limit it to the colours. */
.pd-job-filters .pd-jobs__selects button,
.pd-job-filters .pd-jobs__bar button { transition: background-color .15s, border-color .15s, color .15s; }
.pd-job-filters .pd-sel__menu .pd-sel__opt:hover,
.pd-job-filters .pd-sel__menu .pd-sel__opt:focus-visible { background: var(--pdjb-hover); color: var(--pdjb-white); outline: none; }
.pd-job-filters .pd-sel__menu .pd-sel__opt[aria-selected="true"],
.pd-job-filters .pd-sel__menu .pd-sel__opt[aria-selected="true"]:hover,
.pd-job-filters .pd-sel__menu .pd-sel__opt[aria-selected="true"]:focus { color: var(--pdjb-accent); }
.pd-job-filters .pd-sel__check { flex: none; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px; color: transparent; font-size: 12px; }
.pd-job-filters .pd-sel__opt[aria-selected="true"] .pd-sel__check { background: var(--pdjb-accent); border-color: var(--pdjb-accent); color: var(--pdjb-bg); }

/* While the filtered page is being fetched. */
.pd-is-loading > .elementor-widget-container { opacity: .45; pointer-events: none; transition: opacity .15s; }
.pd-jobs-total[hidden] { display: none; }

/* ---- Job Row loop item (PD Job Row) -------------------------------------- */
/* Pill tags: the Heading widget can only style its full-width wrapper, not the inline term text. */
.e-loop-item .pd-jobs__tag .elementor-heading-title { display: inline-block; padding: 4px 12px; border: 0; border-radius: 999px; background: var(--pdjb-accent); color: var(--pdjb-bg); font: 700 12px/1.15 var(--pdjb-font); letter-spacing: .1em; text-transform: uppercase; }
.e-loop-item .pd-jobs__tag.pd-jobs__tag--alt .elementor-heading-title { padding: 3px 11px; background: transparent; color: var(--pdjb-accent); border: 1px solid color-mix(in srgb, var(--pdjb-accent) 60%, transparent); }
/* Meta line: shortcode output has no typography controls. */
.e-loop-item .pd-jobs__meta { font: 600 16px/1.2 var(--pdjb-font); color: var(--pdjb-text); }
/* Arrow circle border at 60%: the Icon widget's frame colour can't take an alpha global, and its
   per-element rule (5 classes) needs an ID to out-rank it. */
:is(#pd-jobs-loop, #pd-jobs-more) .pd-jobs__arrow .elementor-icon { border-color: color-mix(in srgb, var(--pdjb-accent) 60%, transparent); }

/* ---- Empty state (appended inside the Loop Grid by the script) ------------ */
.pd-jobs__empty { padding: 56px 12px; border-bottom: 1px solid var(--pdjb-divider); display: flex; flex-direction: column; gap: 12px; font-family: var(--pdjb-font); }
.pd-jobs__empty[hidden] { display: none; }
.pd-jobs__empty h3 { margin: 0; font-family: var(--pdjb-display); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--pdjb-white); }
.pd-jobs__empty p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--pdjb-text); max-width: 520px; }

/* ---- Single job ----------------------------------------------------------- */
.pd-job-back { font: 600 14px var(--pdjb-font); color: var(--pdjb-accent); text-decoration: none; }
.pd-job-back:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--pdjb-accent); }

.pd-jobs__apply { display: inline-block; padding: 14px 24px; border: 1px solid var(--pdjb-accent); border-radius: 6px; font: 700 15px var(--pdjb-font); color: var(--pdjb-accent); text-decoration: none; transition: background .2s, color .2s; }
.pd-jobs__apply:hover, .pd-jobs__apply:focus { background: var(--pdjb-accent); color: var(--pdjb-bg); }

.pd-job-status { margin: 0; padding: 16px 20px; border: 1px solid color-mix(in srgb, var(--pdjb-accent) 40%, transparent); border-radius: 6px; background: var(--pdjb-surface); font: 600 16px var(--pdjb-font); color: var(--pdjb-white); }

.pd-job-details { margin: 0; display: flex; flex-direction: column; font-family: var(--pdjb-font); }
.pd-job-details__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--pdjb-divider); }
.pd-job-details dt { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--pdjb-muted); }
.pd-job-details dd { margin: 0; font-size: 16px; font-weight: 600; color: var(--pdjb-white); text-align: right; }

.pd-job-section, .pd-job-apply { display: flex; flex-direction: column; gap: 16px; font-family: var(--pdjb-font); }
.pd-job-section h2, .pd-job-apply h2 { margin: 0; font-family: var(--pdjb-display); font-weight: 400; font-size: 28px; color: var(--pdjb-white); }
.pd-job-section p, .pd-job-section li { font-size: 17px; line-height: 1.7; color: var(--pdjb-text); }
.pd-job-section p { margin: 0; }
.pd-job-section ul, .pd-job-section ol { margin: 0; padding-left: 1.25em; }
.pd-job-section li::marker { color: var(--pdjb-accent); }
.pd-job-section a { color: var(--pdjb-accent); }
