/* Activities list page (B-051): toolbar, type and period chips, the grid. Colours only via tokens.css. */

.actlist-page { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: var(--sp-6) var(--sp-6) 0; }
.actlist-toolbar { display: flex; flex-direction: column; gap: var(--sp-4); flex: none; margin-bottom: var(--sp-4); }
.actlist-page .view-btn { border-top: 0; border-right: 0; border-bottom: 0; padding: 0; cursor: pointer; }
.actlist-page .view-btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.actlist-add { gap: var(--sp-3); padding: 0 var(--sp-5) 0 var(--sp-4); }
.actlist-total { color: var(--text); font-weight: var(--fw-semibold); white-space: nowrap; }
.actlist-owner.select-trigger { width: auto; min-width: 180px; max-width: 240px; }

/* Chips: type on the left, period on the right */
.actlist-filters { flex-wrap: wrap; row-gap: var(--sp-3); }
.actlist-types, .actlist-periods { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.actlist-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2); height: 28px; padding: 0 var(--sp-4);
  border: 0; border-radius: var(--r-sm); background: none; color: var(--text); cursor: pointer;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.actlist-chip:hover { background: var(--bg-hover); }
.actlist-chip:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.actlist-chip.is-active { background: var(--chip-active-bg); color: var(--chip-active-text); }
.actlist-type .ic { color: var(--blue); }
.actlist-chip-sep { width: 1px; height: 18px; margin: 0 var(--sp-2); background: var(--border); }
.actlist-chip-count { color: var(--text-muted); font-weight: var(--fw-regular); }
.actlist-chip-count:empty { display: none; }
.actlist-chip.is-active .actlist-chip-count { color: var(--chip-active-text); }
.actlist-range { display: inline-flex; align-items: center; gap: var(--sp-3); margin-left: var(--sp-2); }
.actlist-range[hidden] { display: none; }
.actlist-date { width: 140px; height: 28px; }
.actlist-range-dash { color: var(--text-2); }
@media (max-width: 1100px) {
  .actlist-type .actlist-chip-label { display: none; }
  .actlist-type[data-testid="actlist-type-all"] .actlist-chip-label { display: inline; }
}

/* Grid: sticky header, light grid lines, ~36px rows */
.actlist-grid {
  flex: 1; min-height: 0; overflow: auto; margin: 0 calc(-1 * var(--sp-6)); border-top: 1px solid var(--grid-line);
  background: var(--bg-surface);
}
.actlist-grid[hidden] { display: none; }
.actlist-table { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; }
.actlist-th {
  position: sticky; top: 0; z-index: 1; height: 32px; padding: 0 var(--sp-4); text-align: left; white-space: nowrap;
  background: var(--grid-head-bg); border-bottom: 1px solid var(--grid-line); border-right: 1px solid var(--grid-line);
  font-weight: var(--fw-semibold);
}
.actlist-sort {
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.actlist-sort-ic { visibility: hidden; color: var(--text-2); }
.actlist-sort:hover .actlist-sort-ic, .is-sorted .actlist-sort-ic { visibility: visible; }
.is-sorted .actlist-sort-ic { color: var(--blue); }
.actlist-sort-ic, .actlist-sort-ic svg { width: 12px; height: 12px; }
.actlist-row td {
  height: 36px; padding: 0 var(--sp-4); border-bottom: 1px solid var(--grid-line); border-right: 1px solid var(--grid-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.actlist-row { cursor: pointer; transition: background var(--t-fast) var(--ease), opacity var(--t-med) var(--ease); }
.actlist-row:hover { background: var(--grid-row-hover); }
.actlist-row:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.actlist-row.is-leaving { opacity: 0; }
.actlist-row.is-done .actlist-subject-text { text-decoration: line-through; color: var(--text-2); }
.actlist-loading td { padding: var(--sp-4) var(--sp-6); }
.col-done { width: 64px; text-align: center; }
.actlist-th.col-done { text-align: center; }
.col-subject { min-width: 220px; }
.col-prio { width: 96px; }
.col-due { width: 150px; }
.actlist-row td.col-due.overdue { color: var(--red); }
.actlist-check {
  width: 20px; height: 20px; padding: 0; border: 1.5px solid var(--actpop-check); border-radius: 50%;
  background: var(--bg-surface); color: transparent; display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.actlist-check .ic, .actlist-check svg { width: 12px; height: 12px; }
.actlist-check:hover { border-color: var(--actpop-check-hover); color: var(--actpop-check-hover); }
.actlist-check.is-done, .actlist-row.is-leaving .actlist-check {
  background: var(--actpop-check-hover); border-color: var(--actpop-check-hover); color: var(--text-inverse);
}
.actlist-check:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.actlist-subject { display: inline-flex; align-items: center; gap: var(--sp-3); max-width: 100%; }
.actlist-type-ic { color: var(--text-2); }
.actlist-subject-text { overflow: hidden; text-overflow: ellipsis; }
.actlist-link { color: var(--text); }
.actlist-link:hover { color: var(--link); }
.actlist-person {
  display: inline-block; max-width: 100%; height: 22px; padding: 0 var(--sp-3); border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--chip-bg); color: var(--text); font-size: var(--fs-sm); line-height: 20px;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle; text-decoration: none;
}
.actlist-person:hover { border-color: var(--border-strong); text-decoration: none; }
.actlist-prio {
  display: inline-block; height: 20px; padding: 0 var(--sp-3); border-radius: var(--r-pill); color: var(--text-inverse);
  font-size: var(--fs-xs); line-height: 20px; font-weight: var(--fw-semibold); letter-spacing: 0.3px;
}
.prio-pill-high { background: var(--prio-high); }
.prio-pill-medium { background: var(--prio-medium); color: var(--prio-medium-text); }
.prio-pill-low { background: var(--prio-low); }
.actlist-empty { padding: var(--sp-9) var(--sp-6); text-align: center; color: var(--text-2); }
.actlist-empty[hidden] { display: none; }
.actlist-more { display: flex; margin: var(--sp-5) auto; }
.actlist-more[hidden] { display: none; }
