/* Sessions hub: filters, session cards and lifecycle actions (PC). */

/* ---- Navigation: Live Session sits last and shows a pulsing record dot. */
.nav button[hidden] {
  display: none;
}
.nav-live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--brand-ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-ink) 22%, transparent);
  animation: hub-live-pulse 1.6s ease-in-out infinite;
}
@keyframes hub-live-pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---- Filters. */
.hub-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-5);
}
.hub-filters .seg {
  flex: none;
}
.hub-filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}
.hub-filters .hub-manage {
  margin-left: auto;
}

/* ---- Card grid: three columns on PC. */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 1100px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.hub-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-highlight);
}
.hub-card.is-live {
  border-color: color-mix(in srgb, var(--brand-ink) 55%, var(--line));
}
.hub-card.is-archived {
  opacity: 0.8;
}
.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.hub-eyebrow {
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hub-live-pill::before {
  animation: hub-live-pulse 1.6s ease-in-out infinite;
}
.hub-card-title {
  margin: var(--space-2) 0 2px;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.hub-card-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}
.hub-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-1);
}
.hub-score > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hub-score > span:last-child {
  text-align: right;
}
.hub-score small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-score b {
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}
.hub-score > span:last-child b {
  color: var(--defense);
}
.hub-score i {
  color: var(--ink-subtle);
  font-style: normal;
}
.hub-stats {
  display: flex;
  gap: var(--space-6);
  margin: var(--space-3) 0 var(--space-1);
}
.hub-stats span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hub-stats b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}
.hub-stats small {
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hub-card-summary {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--ink-muted);
  font-size: 13px;
}
.hub-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.hub-card-actions .btn:last-child:not(.primary) {
  margin-left: auto;
}
.hub-card-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.hub-empty {
  grid-column: 1 / -1;
}

@media (prefers-reduced-motion: reduce) {
  .nav-live-dot,
  .hub-live-pill::before {
    animation: none;
  }
}
.hub-filters .seg button {
  flex: none;
}
.hub-card-actions {
  gap: 6px;
}
.hub-card-actions .btn.small {
  padding-inline: 10px;
}
.hub-card-actions .btn.small.has-icon {
  gap: 6px;
}

/* ---- Manage (bulk delete) mode. */
.hub-select-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: calc(var(--space-2) * -1) 0 var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.hub-select-count {
  margin-right: auto;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
}
.hub-select {
  display: grid;
  place-items: center;
}
.hub-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.hub-card-top .hub-eyebrow {
  margin-right: auto;
}
#continueTracking:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
