/* ───────────────────────────────────────────────────────────────────────────
 * Claims Admin tab — modernized toolbar + flex-viewport table.
 * Toolbar / drawer / active-chip classes are shared with Users, Subscriptions,
 * Projects (see admin-users.css). Only per-tab scoping + table chrome lives
 * here. Feed Health sub-panel styles are below and untouched.
 * ─────────────────────────────────────────────────────────────────────────── */

#mode-wrapper-claims-admin {
  /* Flex-fills body via `.mode-wrapper.selected { flex: 1 }` in style.css. */
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}
#mode-wrapper-claims-admin.selected { display: flex !important; }
/* .claims-admin-subtabs rule removed 2026-07-01 — the sub-tab strip was
 * dropped when Feed Health became its own top-level tab. */
#mode-wrapper-claims-admin > .claims-admin-subpanel { display: none; }
#mode-wrapper-claims-admin > .claims-admin-subpanel.selected {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Consistent horizontal insets (16px top / 24px sides) matching Users + Projects. */
#mode-wrapper-claims-admin .claims-admin-subpanel > #claims-admin-filters-wrapper {
  flex-shrink: 0;
  padding: 16px 24px 0 !important;
  margin: 0 !important;
}
#mode-wrapper-claims-admin .claims-admin-subpanel > #claims-admin-active-chips {
  flex-shrink: 0;
  margin: 8px 24px 0;
}
#mode-wrapper-claims-admin .claims-admin-subpanel > .claims-admin-table-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
  margin: 8px 24px 0;
  border: 1px solid var(--sl-color-neutral-200);
  border-radius: var(--sl-border-radius-medium);
}
#mode-wrapper-claims-admin .claims-admin-subpanel > .claims-admin-pagination-wrapper {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px !important;
  margin: 0 !important;
  border-top: none;
  background: #fff;
}

/* ───────────────────────────────────────────────────────────────────────────
 * Table chrome — canonical thead (gray/13px/600), sticky Claim ID column
 * (leftmost after the checkbox) + sticky Reviewed column (rightmost). Mirrors
 * .users-table th + Projects thead styles.
 * ─────────────────────────────────────────────────────────────────────────── */
#mode-wrapper-claims-admin table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}
#mode-wrapper-claims-admin thead {
  position: sticky;
  top: 0;
  z-index: 3;
}
#mode-wrapper-claims-admin th {
  background: var(--sl-color-neutral-100);
  text-align: left;
  padding: 8px 12px;
  border-bottom: none;
  box-shadow: inset 0 -2px 0 var(--sl-color-neutral-300);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
#mode-wrapper-claims-admin td {
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  background: #fff;
}
#mode-wrapper-claims-admin tbody tr:hover td {
  background-color: #f8f9fa;
}

/* Sticky checkbox column (leftmost) — anchors row selection at all widths. */
#mode-wrapper-claims-admin th[data-prop="checkbox"],
#mode-wrapper-claims-admin td[data-prop="checkbox"] {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 var(--sl-color-neutral-200);
}
#mode-wrapper-claims-admin thead th[data-prop="checkbox"] {
  z-index: 4;
  box-shadow: 1px 0 0 var(--sl-color-neutral-200), inset 0 -2px 0 var(--sl-color-neutral-300);
}

/* Sticky Reviewed column (rightmost) — the inline action lives here. */
#mode-wrapper-claims-admin th[data-prop="reviewed"],
#mode-wrapper-claims-admin td[data-prop="reviewed"] {
  position: sticky;
  right: 0;
  z-index: 2;
  box-shadow: -1px 0 0 var(--sl-color-neutral-200);
}
#mode-wrapper-claims-admin thead th[data-prop="reviewed"] {
  z-index: 4;
  box-shadow: -1px 0 0 var(--sl-color-neutral-200), inset 0 -2px 0 var(--sl-color-neutral-300);
}

.claims-admin-owners-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claims-admin-projects-cell {
  max-width: 200px;
}

.claims-admin-projects-cell sl-tag {
  margin: 1px;
}

/* ───────────────────────────────────────────────────────────────────────────
 * Claims Feed Health tab (extracted from the Claims sub-tab strip
 * 2026-07-01). Lives at #mode-wrapper-claims-feed-health under Tools.
 * Sub-tab strip CSS (.claims-admin-subtab / -selected / -badge) was removed
 * in the same pass — no longer used anywhere.
 * ─────────────────────────────────────────────────────────────────────────── */

#mode-wrapper-claims-feed-health {
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}
#mode-wrapper-claims-feed-health.selected { display: flex !important; }

#mode-wrapper-claims-feed-health .claims-feed-health-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px 0;
}
#mode-wrapper-claims-feed-health .claims-feed-health-blurb {
  font-size: 13px;
  color: #666;
  max-width: 640px;
}
#mode-wrapper-claims-feed-health .feed-health-table-wrapper {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
  margin: 12px 24px 24px;
  border: 1px solid var(--sl-color-neutral-200);
  border-radius: var(--sl-border-radius-medium);
}

/* Feed Health table — same canonical thead as everywhere else. */
#feed-health-table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}
#feed-health-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}
#feed-health-table th {
  background: var(--sl-color-neutral-100);
  text-align: left;
  padding: 8px 12px;
  border-bottom: none;
  box-shadow: inset 0 -2px 0 var(--sl-color-neutral-300);
  font-weight: 600;
  white-space: nowrap;
}
#feed-health-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  background: #fff;
}
#feed-health-table tbody tr:hover td {
  background-color: #f8f9fa;
}

.feed-health-muted       { color: #999; }
.feed-health-delta-up    { color: #2e7d32; }
.feed-health-delta-down  { color: #c62828; }

.feed-health-sparkline {
  width: 100px;
  height: 24px;
  color: #555;
  display: block;
}

/* Status pills. */
.feed-health-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.feed-health-pill-success { background: #e6f4ea; color: #1e7c3a; }
.feed-health-pill-warning { background: #fef3c7; color: #92400e; }
.feed-health-pill-danger  { background: #fee2e2; color: #991b1b; }
.feed-health-pill-neutral { background: #f1f3f4; color: #5f6368; }
