/* Varial — flat list workspace (Spot / Positions / DIYvar home lists)
   Shared toolbar, favourite star, row action icons, and archived-row muting.
   Loaded by the three product home templates. */

/* ── Section heading (sits on the page above the card, not inside it) ── */
.list-section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--varial-gray-900, #131210);
}

/* ── Column-header filter funnel (Status, Created by) ──────── */
.ws-col-head {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.ws-col-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  background: transparent;
  color: var(--varial-gray-500, #6B6763);
  font-size: 0.7rem;
  line-height: 1;
  border-radius: var(--varial-radius-sm, 0.375rem);
  cursor: pointer;
}

.ws-col-filter-btn:hover {
  color: var(--varial-primary, #1B3AA0);
  background: color-mix(in srgb, var(--varial-primary, #1B3AA0) 10%, transparent);
}

/* Active = the filter is narrowing the list; make the funnel stand out. */
.ws-col-filter-btn.is-active {
  color: var(--varial-primary, #1B3AA0);
  background: color-mix(in srgb, var(--varial-primary, #1B3AA0) 16%, transparent);
}

/* The menu lives inside a thead <th>; undo the header's uppercase/condensed type. */
.list-workspace-filter-menu {
  min-width: 12rem;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}

.list-workspace-filter-menu .form-check {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--varial-gray-800, #292524);
}

.list-workspace-filter-menu .form-check:last-child {
  margin-bottom: 0;
}

.list-workspace-filter-menu .dropdown-divider {
  display: block;
  height: 0;
  margin: 0.4rem 0;
  border-top: 1px solid var(--varial-gray-200, #E7E5E1);
}

/* ── Inline name-column search ─────────────────────────────── */
/* The search box sits in the Name <th>; keep the heading on one line and the
   font weight normal so it reads as an input, not a sortable label. */
.col-name-header .col-name-label {
  font-weight: 600;
}

.list-workspace-search {
  width: 11rem;
  font-weight: 400;
}

.list-workspace-search .form-control {
  padding-left: 1.9rem;
  height: 1.85rem;
}

.list-workspace-search-icon {
  position: absolute;
  top: 50%;
  left: 0.6rem;
  transform: translateY(-50%);
  color: var(--varial-gray-400, #A8A29E);
  font-size: var(--text-xs, 0.75rem);
  pointer-events: none;
}

/* ── Favourite star ───────────────────────────────────────── */
.ws-star {
  color: var(--varial-gray-300, #CCC9C3);
  line-height: 1;
}

.ws-star:hover {
  color: var(--varial-amber, #F59E0B);
}

.ws-star.is-favourite {
  color: var(--varial-amber, #F59E0B);
}

.list-workspace .ws-star-cell {
  width: 2.25rem;
  text-align: center;
}

/* ── Row action icons (right-aligned in the Actions column) ── */
.ws-row-actions .ws-action {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--varial-gray-500, #6B6763);
  border: 1px solid transparent;
  border-radius: var(--varial-radius-sm, 0.375rem);
}

.ws-row-actions .ws-action:hover {
  color: var(--varial-primary, #1B3AA0);
  background: var(--varial-gray-100, #F3F2EF);
}

/* Drop Bootstrap's button focus ring so the icons don't render a stray box. */
.ws-row-actions .ws-action:focus,
.ws-row-actions .ws-action:focus-visible {
  box-shadow: none;
  outline: none;
}

/* A real disabled <button> (e.g. mid-duplicate) blocks all interaction. The
   greyed Outputs <span> keeps pointer events so its "Not available" tip can show. */
.ws-row-actions .ws-action:disabled {
  pointer-events: none;
}

.ws-row-actions .ws-action.disabled {
  cursor: default;
}

/* ── Fast hover tooltips for row action icons ───────────────── */
/* Native title tooltips have a ~1s browser delay; this CSS tip shows instantly. */
.ws-action[data-ws-tip] {
  position: relative;
}

/* display:none (not visibility/opacity) so the hidden tooltip box takes no layout
   space — otherwise the rightmost icons' boxes extend the page's scroll width and
   spawn a horizontal scrollbar (the actions column sits in an unclipped wrapper). */
.ws-action[data-ws-tip]::after {
  content: attr(data-ws-tip);
  display: none;
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.45rem;
  border-radius: var(--varial-radius-sm, 0.375rem);
  background: var(--chart-tech-black-coal, #1C1917);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
}

.ws-action[data-ws-tip]:hover::after,
.ws-action[data-ws-tip]:focus-visible::after {
  display: block;
}

/* ── Archived rows ────────────────────────────────────────── */
.list-workspace tr.ws-row.is-archived td {
  color: var(--varial-gray-500, #6B6763);
}

.list-workspace tr.ws-row.is-archived .ws-action,
.list-workspace tr.ws-row.is-archived a {
  color: var(--varial-gray-500, #6B6763);
}
