/* ══════════════════════════════════════════════════════════════
   WARD — ACTIVE STUDENTS RAIL
   Mobile-first: a thin vertical tab pinned to the left edge that
   expands into a drawer. From 1280px up the drawer is always open
   and sits in the left gutter beside the timer.
   ══════════════════════════════════════════════════════════════ */

/* Absolute, not fixed: the rail is anchored inside .ward-timer-hero so it sits
   level with the timer and scrolls away with the page instead of following the
   viewport. The hero is already position:relative. */
.wau-rail {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.wau-rail > * { pointer-events: auto; }

/* ── Edge tab (mobile) ─────────────────────────────────────── */
.wau-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  /* ≥44px touch target on the long axis; the short axis is an edge grab
     handle, deliberately slim so it never covers page content. */
  width: 30px;
  min-height: 104px;
  padding: 0.6rem 0.1rem;
  border: 1px solid rgba(var(--ims-brand-rgb), 0.32);
  border-left: none;
  border-radius: 0 12px 12px 0;
  background: rgba(8, 18, 34, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(180, 200, 240, 0.75);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, color 0.18s ease;
}
.wau-tab:hover { background: rgba(16, 32, 58, 0.96); color: #c8dff8; }
.wau-tab:focus-visible { outline: 2px solid #6ea0eb; outline-offset: 2px; }

.wau-tab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #57f287;
  line-height: 1;
}
.wau-tab-label {
  writing-mode: vertical-rl;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

/* ── Panel ─────────────────────────────────────────────────── */
.wau-panel {
  position: absolute;
  left: 0;
  top: 50%;
  width: min(78vw, 290px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(var(--ims-brand-rgb), 0.28);
  border-left: none;
  border-radius: 0 16px 16px 0;
  background: rgba(6, 14, 28, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  transform: translate(-101%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.26s cubic-bezier(0.34, 1.1, 0.64, 1), opacity 0.2s ease, visibility 0.26s;
}
.wau-rail.is-open .wau-panel {
  transform: translate(0, -50%);
  opacity: 1;
  visibility: visible;
}
.wau-panel:focus { outline: none; }

.wau-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.6rem;
  border-bottom: 1px solid rgba(var(--ims-brand-rgb), 0.16);
}
.wau-title {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c8dff8;
}
.wau-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  color: #57f287;
  background: rgba(87, 242, 135, 0.12);
  border: 1px solid rgba(87, 242, 135, 0.28);
  border-radius: 99px;
  padding: 0.1rem 0.5rem;
}
.wau-close {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(180, 200, 240, 0.55);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.wau-close:hover { background: rgba(var(--ims-brand-rgb), 0.14); color: #c8dff8; }
.wau-close:focus-visible { outline: 2px solid #6ea0eb; outline-offset: 1px; }

.wau-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.6rem 0.7rem;
}

.wau-group {
  margin: 0.55rem 0 0.35rem 0.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(160, 195, 240, 0.45);
}
.wau-group:first-child { margin-top: 0.15rem; }

.wau-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }

.wau-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  /* Grid items default to min-width:auto, which lets a long display name push
     the row past the panel edge and clip the status dot. */
  min-width: 0;
}
.wau-row.is-me {
  background: rgba(var(--ims-brand-rgb), 0.12);
  border-color: rgba(var(--ims-brand-rgb), 0.28);
}

.wau-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}
.wau-avatar-fb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(180, 200, 240, 0.75);
  border: 1px solid rgba(var(--ims-brand-rgb), 0.28);
}

.wau-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.08rem; }
.wau-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2eaf7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wau-name em { font-style: normal; font-size: 0.6rem; color: rgba(140, 170, 220, 0.5); }
.wau-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: rgba(140, 170, 220, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status is carried by the label text too — never colour alone. */
.wau-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; }
.wau-dot-focus  { background: #57f287; box-shadow: 0 0 7px rgba(87, 242, 135, 0.6); }
.wau-dot-break  { background: #ffc000; box-shadow: 0 0 7px rgba(255, 192, 0, 0.5); }
.wau-dot-paused { background: rgba(160, 195, 240, 0.4); }

.wau-empty {
  margin: 0;
  padding: 1.1rem 0.6rem;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(160, 195, 240, 0.45);
}

/* ── Desktop: always-open rail in the left gutter ──────────── */
@media (min-width: 1280px) {
  .wau-tab { display: none; }
  .wau-close { display: none; }
  .wau-panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    width: 232px;
    max-height: min(66vh, 560px);
    margin-left: 16px;
    border-left: 1px solid rgba(var(--ims-brand-rgb), 0.28);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wau-panel { transition: none; }
}
