/* Job postings tables — Workforce Index embed.
   Styled to match the WWA port of the Workforce Index
   (seakingwdc/workforce-index, wwa-port/blocks/00-styles.html), which follows
   the WWA Brand Standard Guide: Montserrat headings and controls, Lato body,
   Dark Blue header row, Steady Blue tinted zebra rows, white pill controls
   with a lime focus ring. The host page supplies the card (.wi-dw--card), so
   the page stays transparent. */

:root {
  /* Type (WWA Brand Standard Guide) */
  --font-headline: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --font-body: Lato, "Helvetica Neue", Arial, sans-serif;

  /* WWA brand */
  --wwa-green: #8fc440;     /* Renewal Green */
  --wwa-blue: #3675ba;      /* Steady Blue   */
  --wwa-charcoal: #404042;  /* Charcoal Gray */
  --wwa-navy: #1c3a64;      /* Dark Blue     */
  --wwa-lime: #c8e563;      /* Accent Lime   */

  /* Surfaces & text (light) */
  --text: #1f1f21;
  --heading: var(--wwa-navy);
  --muted: rgba(64, 64, 66, 0.82);
  --faint: rgba(64, 64, 66, 0.66);
  --border: rgba(64, 64, 66, 0.12);
  --border-row: rgba(64, 64, 66, 0.08);
  --head-bg: var(--wwa-navy);
  --row-alt: rgba(54, 117, 186, 0.05);
  --row-hover: rgba(54, 117, 186, 0.12);
  --foot-bg: rgba(54, 117, 186, 0.10);
  --foot-border: rgba(54, 117, 186, 0.30);
  --field-bg: #ffffff;
  --field-border: rgba(64, 64, 66, 0.22);
  --field-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  --link: var(--wwa-blue);
  --page-bg: transparent;
  --radius-sm: 12px;
  color-scheme: light;
}

/* Dark only when asked for (?theme=dark, ?theme=auto on a dark OS, or the
   Workforce Index page's { warnTheme: "dark" } message). */
:root[data-theme="dark"] {
  --text: #eceff2;
  --heading: #ffffff;
  --muted: #b4bcc6;
  --faint: rgba(236, 239, 242, 0.6);
  --border: rgba(255, 255, 255, 0.14);
  --border-row: rgba(255, 255, 255, 0.09);
  --head-bg: var(--wwa-blue);
  --row-alt: rgba(54, 117, 186, 0.10);
  --row-hover: rgba(54, 117, 186, 0.22);
  --foot-bg: rgba(54, 117, 186, 0.24);
  --foot-border: rgba(54, 117, 186, 0.50);
  --field-bg: rgba(255, 255, 255, 0.07);
  --field-border: rgba(255, 255, 255, 0.22);
  --field-shadow: none;
  --link: #8fbde8;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dt { padding: 4px 2px 8px; }

.dt-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}
.dt-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin: 8px 0 0;
  border-radius: 4px;
  background: var(--wwa-green);
}
.dt-intro { margin: 10px 0; color: var(--muted); font-size: 0.95rem; }

.dt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 12px;
}

.dt-search {
  flex: 1 1 220px;
  max-width: 320px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 999px;
  box-shadow: var(--field-shadow);
}
.dt-search::placeholder { color: var(--faint); }
.dt-search:focus { outline: none; border-color: var(--wwa-blue); }
.dt-search:focus-visible { outline: 3px solid var(--wwa-lime); outline-offset: 2px; }

.dt-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-headline);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dt-pager button {
  min-width: 38px;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: var(--heading);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 999px;
  box-shadow: var(--field-shadow);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.dt-pager button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12); }
.dt-pager button:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.dt-pager button:focus-visible { outline: 3px solid var(--wwa-lime); outline-offset: 2px; }

.dt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table.dt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.dt-table th {
  padding: 0;
  background: var(--head-bg);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: left;
  vertical-align: bottom;
}
.dt-table th.num { text-align: right; }
.dt-table th button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.dt-table th button:hover { background: rgba(255, 255, 255, 0.1); }
.dt-table th button:focus-visible { outline: 3px solid var(--wwa-lime); outline-offset: -3px; }
.dt-table th .arrow { display: inline-block; width: 1em; color: rgba(255, 255, 255, 0.55); font-size: 0.9em; }
.dt-table th[aria-sort] .arrow { color: var(--wwa-lime); }

.dt-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-row);
  vertical-align: baseline;
  color: var(--text);
}
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-table td:not(.num):not(.rank) { font-weight: 700; }
.dt-table td.num {
  text-align: right;
  white-space: nowrap;
}
.dt-table td.rank, .dt-table th.rank {
  width: 1%;
  padding-right: 4px;
  text-align: right;
  white-space: nowrap;
}
.dt-table td.rank { font-family: var(--font-headline); font-size: 0.75rem; font-weight: 600; color: var(--faint); }
.dt-table td.heat { font-weight: 700; }
.dt-table td.nowrap { white-space: nowrap; }

.dt.striped tbody tr:nth-child(even) td { background: var(--row-alt); }
.dt-table tbody tr:not(.dt-empty):hover td:not(.heat) { background: var(--row-hover); }

.dt-table tfoot td {
  background: var(--foot-bg);
  font-weight: 700;
  border-bottom: 1px solid var(--border-row);
}
.dt-table tfoot tr:first-child td { border-top: 2px solid var(--foot-border); }
.dt-table tfoot tr:last-child td { border-bottom: 0; }

.dt-empty td { color: var(--muted); text-align: center; padding: 18px 8px; }
.dt-table .dt-empty td { font-weight: 400; }

.dt-foot { margin-top: 12px; font-size: 0.85rem; color: var(--faint); }
.dt-foot p { margin: 0 0 3px; }
.dt-foot a { color: var(--link); font-weight: 700; text-decoration: none; }
.dt-foot a:hover { text-decoration: underline; }
.dt-foot a:focus-visible { outline: 3px solid var(--wwa-lime); outline-offset: 2px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 520px) {
  html, body { font-size: 15px; }
  .dt-title { font-size: 1.1rem; }
  .dt-search { max-width: none; }
  .dt-table th button { padding: 10px 8px; }
  .dt-table td { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
