/*
 * static/css/admin-people.css — the /opensesame dashboard's People views (plan R-120, lane dash-people; spec
 * dashboard-2.md §3.2–§3.4): Users, a person's page (account and guest), Guests. The tables are ui.js's responsive
 * tables (admin.css); this file holds only these views' own parts. Same rules as admin.css: `.adm-` selectors only,
 * tokens only, each selector defined once.
 */

/* ============================================================
   USERS
   ============================================================ */
/* the name cell: the online dot (only while online), the name and its `username · email` line */
.adm-person { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.adm-person > .adm-online { margin-top: 7px; }
.adm-person > .adm-cell-lines { flex: 1 1 auto; }
.adm-person .adm-user-link { display: inline; }
/* "Shared address" in the filter bar: a toggle (outlined while off; on, it is a removable chip) */
.adm-users-toggle {
    display: inline-flex; align-items: center; height: var(--adm-ctl-sm); padding: 0 12px; border: 0; border-radius: var(--radius-pill);
    background: transparent; box-shadow: inset 0 0 0 1px var(--c-outline); color: var(--c-on-2); font: var(--t-label-m); cursor: pointer;
}
.adm-users-toggle:hover { background: var(--c-hover); color: var(--c-on); }

/* ============================================================
   A PERSON'S PAGE
   ============================================================ */
.adm-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
/* the Account section's save bar panel: a little room under the facts above it */
.adm-account-panel { margin-top: 12px; }
/* the linked email: a text area of one line that grows for a long address (nothing cut on a phone) */
.adm-email-field { resize: none; overflow-y: auto; }
/* "Shared address" in the header: the pill is a button to the Addresses section */
.adm-pill-btn { display: inline-flex; padding: 0; border: 0; border-radius: var(--radius-pill); background: none; font: inherit; cursor: pointer; }
.adm-pill-btn:hover > .adm-pill { text-decoration: underline; text-underline-offset: 2px; }
/* a guest's subtitle: the session name and the network label stay whole (the line wraps between facts only) */
.adm-nowrap { white-space: nowrap; }
/* the Arjav Pro section: the Access line, the history newest first */
.adm-pro-access { display: inline; overflow-wrap: break-word; }
.adm-pro-history { list-style: none; display: flex; flex-direction: column; }
.adm-pro-history > li { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--c-outline-variant); }
.adm-pro-history > li:first-child { border-top: 0; }
.adm-pro-history-head { display: flex; align-items: center; gap: 10px; color: var(--c-on-3); font: var(--t-body-s); }
.adm-pro-history-text { margin: 0; color: var(--c-on); font: var(--t-body-m); line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word; }
/* a limit used against its amount: a meter, "$11.20 of $15.00", Full (also the Guests view's pools) */
.adm-limit-used { display: inline-flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.adm-usage-total { margin-top: 10px; color: var(--c-on-2); font: var(--t-body-s); font-variant-numeric: tabular-nums; }
.adm-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--c-outline-variant); }
.adm-section-head + .adm-danger-row { border-top: 0; padding-top: 2px; }
.adm-danger-row:last-child { padding-bottom: 2px; }
.adm-danger-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

/* ============================================================
   GUESTS
   ============================================================ */
.adm-net-label { font: var(--t-mono); font-size: 0.8125rem; white-space: nowrap; }
/* the all-guests tile: its meter across the tile, the amounts under it */
.adm-stat-sub > .adm-meter { display: block; width: 100%; margin: 4px 0 6px; }

/* ============================================================
   NARROW SCREENS
   ============================================================ */
@media (max-width: 1100px) {
    .adm-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
/* touch: the toggle and the header's pill button are 40 px targets (rule 9) */
@media (pointer: coarse) {
    .adm-users-toggle, .adm-pill-btn { min-height: 40px; align-items: center; }
}
