/* =========================================================================
   Live call — RTA alert density + per-card collapse

   Pairs with rta-density.js. One class (`.alert-collapsed`) drives both the
   manual header-click collapse and the "focused" auto-collapse. The density
   segmented pill lives in `.rta-card-head` and mirrors the pre-call
   `.mode-toggle` styling (mode-toggles.css) so the app reads as one system.
   ========================================================================= */

/* ---- Collapsed card: keep header row + title, hide everything else ------ */
.alert-panel.alert-collapsed .alert-content > :not(.alert-row):not(.alert-summary) {
  display: none;
}
/* Trim the tall bottom reserve (normally kept for the absolute thumbs row)
   when collapsed — a one-line card shouldn't carry an empty gap. */
.alert-panel.alert-collapsed { padding-bottom: 11px; }
.alert-panel.alert-collapsed .alert-summary { margin-bottom: 0; }
/* Thumbs feedback is a direct .alert-panel child (outside .alert-content), so
   the content hide-rule above doesn't reach it — suppress explicitly so
   like/dislike shows only on an expanded card. */
.alert-panel.alert-collapsed .alert-feedback { display: none; }

/* ---- Header disclosure chevron ----------------------------------------- */
.alert-collapse-toggle {
  margin-left: -2px;                 /* optical align to the card's left edge */
  padding: 3px;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--rta-radius-xs);
  color: var(--rta-fg3);
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--dur-micro) var(--ease);
}
.alert-collapse-toggle:hover { color: var(--rta-fg); }
.alert-collapse-toggle svg { transition: transform var(--dur-micro) var(--ease); }
.alert-panel.alert-collapsed .alert-collapse-toggle svg { transform: rotate(-90deg); }
.alert-collapse-toggle:focus-visible {
  outline: 2px solid var(--teal, var(--rta-tug-red));
  outline-offset: 2px;
}

/* ---- Density segmented pill (RTA column head + PiP footer) ------------- */
.rta-density-seg {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;                 /* push to the right of the head label */
  flex-shrink: 0;
  background: var(--surface-raised, color-mix(in srgb, var(--rta-fg) 6%, transparent));
  border: 1px solid var(--border, color-mix(in srgb, var(--rta-fg) 14%, transparent));
  border-radius: var(--radius-pill, 999px);
  padding: 2px;
}
.rta-density-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: var(--text-muted, var(--rta-fg3));
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease),
              color var(--dur-micro) var(--ease);
}
.rta-density-btn svg { display: block; }
.rta-density-btn:hover { color: var(--text, var(--rta-fg)); }
.rta-density-btn.active,
.rta-density-btn[aria-pressed="true"] { background: var(--teal); color: #fff; }
.rta-density-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Keep the RTA column head on ONE line: the compact toggle sits between the
   presence label and the pop-out pill, and neither of those primary controls
   is allowed to shrink or wrap its text. */
.rta-card-head { flex-wrap: nowrap; }
.rta-card-head-label,
.rta-popout-pill { white-space: nowrap; flex-shrink: 0; }
