/* The job page's applicant table, copied from SmartSearch.RecruitOS
   ClientApp/src/components/JobApplicants/jobApplicants.css (commit 36f31e17, 2026-10-14): the palette, tabs, card and
   toolbar (lines 9-261) and the table and person cell (373-522). The ss-ui-toolkit tokens those rules
   read are declared below with the toolkit's values. */
.rc-applicants {
  --color-primary: #5a29a9;
  --color-success: #16a34a;
  --color-warning: #ea580c;
  --color-critical: #dc2626;
  --color-text-tertiary: #6b7280;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-700: #5c5c5c;
  --color-gray-800: #3c3c3c;
  --radius-control: 12px;
  --shadow-card-subtle: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.rc-applicants {
  /* ── Palette ─────────────────────────────────────────────────────────── */
  --rc-ink: #203b40;
  --rc-muted: #718084;
  --rc-primary: #5a29a9;
  --rc-primary-hover: #ef118e;
  /* Hover and pressed tint. Neutral gray, not lavender: the extension keeps color for meaning. */
  --rc-primary-soft: var(--color-gray-100);
  --rc-success: #2e7d32;
  --rc-danger: #dc2626;
  --rc-line: var(--color-gray-200);
  --rc-paper: #fff;
  --rc-canvas: var(--color-gray-50);
  --rc-tab: #e6edeb;
  --rc-warm: #fff3d9;
  --rc-amber: #906723;
  /* The extension's --color-brand-pink: the add-link accent. Distinct from the
     hover purple it happens to match today. */
  --rc-pink: #ef118e;
  /* The host page's own a.txtLink purple, for links that sit beside its markup
     and have to read as the same kind of link. */
  --rc-link: #793187;
  --rc-title-ink: #000;

  /* ── Surfaces ────────────────────────────────────────────────────────── */
  --rc-card-bg: var(--rc-paper);
  --rc-card-edge: var(--rc-line);
  --rc-expanded-bg: var(--color-gray-50);
  --rc-radius-card: var(--radius-control);
  --rc-radius-panel: 10px;
  --rc-star-off: #b9b4ab;
  --rc-star-on: var(--rc-primary);

  /* Snapshot card, kept in step with RecruitOS.Extension's approved component. */
  --rc-snap-line: #e5e7eb;
  --rc-snap-shade: #f3f4f6;
  --rc-snap-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);

  /* Menus and modals inherited from the Razor markup this island replaced. */
  --rc-menu-line: #ccc;
  --rc-menu-ink: #333;
  --rc-menu-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --rc-panel-bg: #efefef;

  /* Avatar tints, one per neighbouring row; the second row's fill is --rc-warm. Inks are dark enough for AA on their fill. */
  --rc-avatar-bg: #f1ebf8;
  --rc-avatar-1-bg: #eee9f6;
  --rc-avatar-1-ink: #66527f;
  --rc-avatar-2-ink: #7f5a1c;
  --rc-avatar-3-bg: #e6eff8;
  --rc-avatar-3-ink: #3d5f7d;

  --rc-shadow: #203b4009;
  --rc-hover-shadow: 0 10px 30px rgba(32, 59, 64, 0.18);

  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--rc-ink);
}

/* :not(.btn) excludes the UI Toolkit Button: without it this blanket reset
   would fight the toolkit's own font-size and disabled styling on every
   converted button in the toolbar, pagination and snapshot editor. */
.rc-applicants button:not(.btn),
.rc-applicants input {
  font: inherit;
}

.rc-applicants button:not(.btn) {
  cursor: pointer;
}

.rc-applicants button:not(.btn):disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rc-applicants :focus-visible {
  outline: 2px solid var(--rc-primary);
  outline-offset: 3px;
}

/* ── Workflow tabs ────────────────────────────────────────────────────────
   Flat underline tabs sitting on the card they label, after the extension's icon tabs. Everything
   is gray until selected. A selected tab then takes its bucket's accent: the icon and underline in
   the pure accent, the label and the count's number in a darkened shade of it (the plain orange
   and green fall short of WCAG AA on small text), and the badge on a pastel tint of the accent. */

.rc-applicants__tabs {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin: 0;
  border-bottom: 1px solid var(--color-gray-200);
}

.rc-applicants__tab {
  --rc-tab-accent: var(--color-gray-700);
  --rc-tab-ink: color-mix(in srgb, var(--rc-tab-accent) 75%, black);
  margin: 0 0 -1px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--color-text-tertiary);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.rc-applicants__tab--neutral {
  --rc-tab-accent: var(--color-gray-700);
}

.rc-applicants__tab--primary {
  --rc-tab-accent: var(--color-primary);
}

.rc-applicants__tab--warning {
  --rc-tab-accent: var(--color-warning);
}

.rc-applicants__tab--critical {
  --rc-tab-accent: var(--color-critical);
}

.rc-applicants__tab--success {
  --rc-tab-accent: var(--color-success);
}

.rc-applicants__tab-face {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 6px;
}

.rc-applicants__tab-face > i {
  font-size: 12px;
}

.rc-applicants__tab-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.rc-applicants__tab:not(.rc-applicants__tab--active):hover {
  background: var(--color-gray-100);
  color: var(--color-gray-800);
}

.rc-applicants__tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.rc-applicants__tab--active {
  border-bottom-color: var(--rc-tab-accent);
}

.rc-applicants__tab--active .rc-applicants__tab-label {
  color: var(--rc-tab-ink);
}

.rc-applicants__tab--active .rc-applicants__tab-face > i {
  color: var(--rc-tab-accent);
}

.rc-applicants__tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--color-gray-200);
  color: var(--color-gray-800);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rc-applicants__tab--active .rc-applicants__tab-count {
  background: color-mix(in srgb, var(--rc-tab-accent) 14%, white);
  color: var(--rc-tab-ink);
}

@media (prefers-reduced-motion: reduce) {
  .rc-applicants__tab {
    transition: none;
  }
}

/* ── Card and toolbar ─────────────────────────────────────────────────────── */

.rc-applicants__card {
  position: relative;
  background: var(--rc-card-bg);
  margin-top: 10px;
  border: 1px solid var(--rc-card-edge);
  border-radius: var(--rc-radius-card);
  box-shadow: var(--shadow-card-subtle);
}

.rc-applicants__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.rc-applicants__search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 310px;
  max-width: 100%;
  /* Matches the UI Toolkit small Button's rendered height, so the search box,
     Columns trigger and the toolbar's toolkit buttons share one baseline. */
  height: 32px;
  padding: 6px 10px;
  background: var(--rc-paper);
  border-radius: 8px;
}

.rc-applicants__search:focus-within {
  border-color: var(--rc-primary);
}

.rc-applicants__search > i {
  color: var(--rc-muted);
  font-size: 13px;
}

.rc-applicants__search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
}

/* The wrapper's :focus-within border already shows focus; an inner ring too
   would double it up. */
.rc-applicants__search input:focus-visible {
  outline: none;
}

.rc-applicants__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.rc-applicants__table th {
  position: relative;
  height: 30px;
  padding: 4px 8px;
  background: var(--rc-canvas);
  border-block: 1px solid var(--rc-line);
  color: var(--rc-muted);
  text-align: left;
  font-size: 10px;
  font-weight: 600;
}

.rc-applicants__table th button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.rc-applicants__table th button span {
  margin-left: 6px;
}

.rc-applicants__table td {
  height: 38px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--rc-line);
  color: var(--rc-ink);
  overflow-wrap: anywhere;
}

.rc-applicants__table td:first-child,
.rc-applicants__table th:first-child {
  padding-left: 12px;
}

.rc-applicants__table tbody tr[data-person] {
  cursor: pointer;
}

.rc-applicants__table tbody tr[data-person]:hover,
.rc-applicants__table tr[data-person]:focus-visible {
  background: var(--rc-primary-soft);
}

.rc-applicants__table tr[data-person]:focus-visible {
  outline-offset: -2px;
}

.rc-applicants__resizer {
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 6px;
  border-right: 1px solid var(--rc-line);
  cursor: col-resize;
  touch-action: none;
}

.rc-applicants__resizer:hover {
  border-right: 2px solid var(--rc-primary);
}

/* Star slide-out: a move to Shortlist (right of To Review) slides right and the
   reverse slides left. 'entering' renders one frame with no transform so the
   switch to 'active' has something to transition from. */
.rc-applicants__row--leaving {
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
}

.rc-applicants__row--leaving.rc-applicants__row--leaving-active[data-leaving-direction='toShortlist'] {
  transform: translateX(28px);
  opacity: 0;
}

.rc-applicants__row--leaving.rc-applicants__row--leaving-active[data-leaving-direction='toReview'] {
  transform: translateX(-28px);
  opacity: 0;
}

/* ── Person cell ──────────────────────────────────────────────────────────── */

.rc-applicants__person {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-applicants__person > div {
  min-width: 0;
}

.rc-applicants__person small {
  display: block;
  color: var(--rc-muted);
  font-size: 10px;
}

.rc-applicants__avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--rc-avatar-bg);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 600;
}

/* Four tints so neighbouring rows are easy to tell apart. Inks are dark enough for AA on their fill. */
.rc-applicants__avatar--1 {
  background: var(--rc-avatar-1-bg);
  color: var(--rc-avatar-1-ink);
}

.rc-applicants__avatar--2 {
  background: var(--rc-warm);
  color: var(--rc-avatar-2-ink);
}

.rc-applicants__avatar--3 {
  background: var(--rc-avatar-3-bg);
  color: var(--rc-avatar-3-ink);
}

.rc-applicants__name {
  color: var(--rc-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.rc-applicants__name:hover {
  color: var(--rc-primary-hover);
  text-decoration: underline;
}

