/* Role-share candidate table — sortable / resizable / wide-mode aware.
   Loaded by page.recruitment.liquid via asset_url to keep the template
   under Shopify's 256 KB per-template limit. */

/* Click-toggle help icon. Only attached to columns with a `tip` (currently
   just AIC rating). Click to open, click outside / click again to close. */
.rs-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  background: #e5e7eb; color: #6b7280;
  font-size: 9px; font-weight: 700;
  cursor: pointer; vertical-align: middle; position: relative;
  margin-left: 4px;
  border: none; padding: 0; line-height: 1;
  transition: background .12s, color .12s;
}
.rs-help:hover { background: #d1d5db; color: #111; }
.rs-help.is-open { background: #ae1f19; color: #fff; }
.rs-help::after {
  content: attr(data-tip);
  position: absolute; bottom: 135%; left: 50%;
  transform: translateX(-50%);
  background: #1f2937; color: #fff;
  font-size: 11px; font-weight: 500; line-height: 1.45; letter-spacing: 0;
  text-transform: none; padding: 8px 10px; border-radius: 6px;
  width: 240px; text-align: left;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .15s, visibility .15s;
  z-index: 1000; white-space: normal;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.rs-help::before {
  content: ""; position: absolute; bottom: 135%; left: 50%;
  transform: translateX(-50%) translateY(100%);
  border: 5px solid transparent; border-top-color: #1f2937;
  opacity: 0; visibility: hidden;
  transition: opacity .15s, visibility .15s;
}
.rs-help.is-open::after, .rs-help.is-open::before { opacity: 1; visibility: visible; }

/* "+N" overflow trigger — same click-to-show popover as .rs-help, but the
   button itself looks like a small inline pill instead of a circular dot. */
.rs-help--more {
  width: auto; height: auto; min-width: 0;
  border-radius: 9999px;
  padding: 0 6px; line-height: 16px; font-size: 0.72rem; font-weight: 600;
  background: #f3f4f6; color: #6b7280;
  margin-left: 4px;
}
.rs-help--more:hover { background: #e5e7eb; color: #111; }
.rs-help--more::after {
  width: 280px;
  white-space: pre-wrap;          /* preserve \n line breaks from data-tip */
  font-size: 11.5px; line-height: 1.5;
}

.rs-table {
  /* Table width = sum of <col> widths, but at least the parent width so the
     card looks normal in default state. The wrapper has overflow-x:auto so
     when the user drags a column wider than parent, only the wrapper
     scrolls — the white card itself never overflows. */
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  table-layout: fixed;
}
.rs-table-wrap { /* container with internal horizontal scrollbar */
  overflow-x: auto;
  max-width: 100%;
}
.rs-table th {
  position: relative; background: #f9fafb; color: #6b7280;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 10px 12px; cursor: pointer; user-select: none;
}
.rs-table th:hover { background: #f3f4f6; color: #111; }
.rs-table th .rs-sort-arrow { margin-left: 5px; font-size: 11px; color: #9ca3af; }
.rs-table th.rs-sorted .rs-sort-arrow { color: #ae1f19; }
.rs-table th .rs-resize {
  position: absolute; top: 0; right: 0;
  width: 6px; height: 100%; cursor: col-resize; background: transparent;
}
.rs-table th .rs-resize:hover, .rs-table th .rs-resize.dragging { background: #ae1f19; opacity: 0.4; }
.rs-table td { vertical-align: top; padding: 10px 12px; font-size: 0.85rem; }

.rs-notes-cell {
  padding: 10px 12px; font-size: 0.85rem; color: #6b7280;
  font-style: italic; white-space: normal; line-height: 1.45; word-break: break-word;
}
.rs-notes-cell.empty { color: #d1d5db; font-style: normal; }

.rs-skills-cell { padding: 10px 12px; }

.rs-card-toolbar {
  display: flex; align-items: center; gap: 0.55rem;
  margin-top: 0.6rem; font-size: 0.78rem; color: #6b7280;
}
.rs-card-toolbar button {
  background: none; border: 1px solid #e5e7eb; color: #6b7280;
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3px;
}
.rs-card-toolbar button:hover { border-color: #ae1f19; color: #ae1f19; }
.rs-card-toolbar button.active { background: #ae1f19; border-color: #ae1f19; color: #fff; }

/* Wide mode removed — wrapper auto-scrolls when columns exceed parent width. */

/* ─── Frozen First Name + Last Name columns ────────────────────────────── */
.rs-table thead th:nth-child(1),
.rs-table thead th:nth-child(2) {
  position: sticky; z-index: 3;
  background: #f9fafb;
}
.rs-table tbody td:nth-child(1),
.rs-table tbody td:nth-child(2) {
  position: sticky; z-index: 1;
  background: #fff;
}
.rs-table thead th:nth-child(1),
.rs-table tbody td:nth-child(1) { left: 0; }
.rs-table thead th:nth-child(2),
.rs-table tbody td:nth-child(2) { left: var(--rs-col1-w, 130px); }
/* Subtle separator after the second frozen column so users see where the
   horizontal scroll boundary is. */
.rs-table tbody td:nth-child(2) {
  box-shadow: 4px 0 6px -4px rgba(0,0,0,0.10);
}
.rs-table thead th:nth-child(2) {
  box-shadow: 4px 0 6px -4px rgba(0,0,0,0.10);
}

/* ─── Adjust-columns popover menu ──────────────────────────────────────── */
.rs-layout-trigger {
  background: none; border: 1px solid #e5e7eb; color: #6b7280;
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3px;
}
.rs-layout-trigger:hover { border-color: #ae1f19; color: #ae1f19; }
.rs-layout-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 8px 0;
  display: none;
  z-index: 200;
}
.rs-layout-menu.is-open { display: block; }
.rs-layout-menu-head {
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  color: #9ca3af; text-transform: uppercase;
  padding: 4px 14px 8px;
}
.rs-layout-menu-pinned {
  font-size: 11px; color: #6b7280; font-style: italic;
  padding: 0 14px 8px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 6px;
}
.rs-layout-menu-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 6px 14px;
  font-size: 0.85rem; color: #333;
  cursor: pointer; user-select: none;
}
.rs-layout-menu-item:hover { background: #f9fafb; }
.rs-layout-menu-item input[type="checkbox"] { accent-color: #ae1f19; cursor: pointer; }
