/* More screen styles (T-014 Arena restyle; T4-007 / R-011 / R-012 focus pass).

   "My players, data health, export, about." Cards, top to bottom on a phone:
   Explore, Players, Health (admins only, 4.0), Export, About, Sign out.
   Everything here composes the
   web/css/components.css primitives (.card, .card-head/.card-title/.card-sub,
   .row, .field, .btn, .avatar, .eyebrow, .info-tip) - no component is redefined,
   only the More-specific layout around them. Fewer borders than 3.0.0: the only
   rules are the hairline dividers between list rows and above the events fold. */

/* ---------- layout: one column, two from 768px (the .grid-2 utility) ------- */

.more-grid { align-items: start; gap: 12px; }
@media (min-width: 768px) { .more-grid { gap: 16px; } }
/* `min-width: 0` overrides the grid item's default `min-width: auto` - without
   it, one long unbreakable run of text anywhere inside this column (the
   `baseUrl` in the About card is user/deploy-configured and has no natural
   break point) would force the whole grid track wider than the viewport
   (classic CSS grid "blowout"), pushing the page into horizontal scroll. */
.more-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 768px) { .more-col { gap: 16px; } }

/* The desktop sidebar (>=1024px, shell.css) already lists every screen this
   card links to, so the card is a phone/tablet door only. */
@media (min-width: 1024px) {
  .more-explore { display: none; }
}

/* ---------- explore ---------- */

.more-explore { padding-top: 12px; padding-bottom: 4px; }
.more-explore-label { margin: 0 0 2px; }
.more-menu { display: flex; flex-direction: column; }
.more-row { width: 100%; min-height: 44px; color: var(--ink); text-align: left; }
.more-row-label { flex: 1; min-width: 0; font-weight: 700; }
.more-row > .i:last-child { color: var(--ink-3); }
/* A row with a muted second line (the Account row's e-mail, 4.0): the label and
   the line stack in one flexible column; the e-mail is untrusted text, so it
   ellipsizes instead of widening the card. */
.more-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.more-row-main .more-row-label { flex: none; }
.more-row-sub { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- players ---------- */

.more-players { display: flex; flex-direction: column; }
.more-player-row { width: 100%; min-height: 48px; padding: 6px 0; text-align: left; cursor: pointer; }
.more-player-row.on { color: var(--gold); }
.more-player-row.on .avatar { box-shadow: 0 0 0 2px var(--gold); }
.more-player-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.more-player-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-add-form { display: flex; gap: 8px; margin-top: 10px; }
/* "Unfollow in Account ›" under the follow form's quota error (T5-030a SA8):
   a link on its own line with a real tap target (T5-030b). */
.more-unfollow-link { display: inline-block; margin-top: 6px; padding: 10px 0; font-size: 13px; font-weight: 700; }

/* ---------- health ---------- */

/* T-026: the kernel retains the last successful /api/status payload through an
   outage, so the rows below keep showing real (if aging) figures - this line is
   what stops them reading as current. `--warn`, not `--bad`: the data is the
   last known truth, not an error. */
.more-stale { color: var(--warn); font-size: 12px; margin-bottom: 8px; }

.more-health { display: flex; flex-direction: column; gap: 4px; }
.more-health-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* Recent events: a native <details>, closed by default. The summary is a full
   44px tap row under a hairline; the chevron turns when it opens. */
.more-events-details { margin-top: 10px; border-top: 1px solid var(--line); }
.more-events-summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  min-height: 44px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.more-events-summary::-webkit-details-marker { display: none; }
.more-events-summary::marker { content: ""; }
.more-events-summary:hover { color: var(--ink); }
.more-events-label { min-width: 0; }
/* The state beside the label ("loading…" / "couldn't load"). In the error state
   it also carries the app-wide `.error-text` red, whose top margin is dropped
   here - it sits on the summary's baseline, not under a paragraph. */
.more-events-note { font-weight: 600; font-size: 12px; color: var(--ink-3); margin: 0; }
.more-events-note.error-text { font-size: 12px; margin: 0; color: var(--bad); }
.more-events-summary > .i:last-child { margin-left: auto; color: var(--ink-3); transition: transform .15s ease; }
.more-events-details[open] > .more-events-summary > .i:last-child { transform: rotate(180deg); }

.more-events {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 340px; overflow-y: auto; padding: 2px 0 6px;
}
.more-event-row {
  display: flex; gap: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px; color: var(--ink-2);
}
.more-event-time { flex: none; width: 52px; color: var(--ink-3); }
.more-event-kind { flex: none; width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-event-detail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }

/* F2R2-03: a failed /api/events states the failure and offers the retry, in the
   app-wide `.error-text` red, where "no events recorded yet" used to sit. The
   button sizes to its label instead of stretching across the flex column. */
.more-events-error { margin-top: 0; }
.more-events-retry { margin-top: 8px; align-self: flex-start; }

/* ---------- export ---------- */

/* The row is the card's whole body; its hairline top border would sit right
   under the head, so it is dropped (the head's own spacing separates them). */
.more-export-card .more-row { padding: 2px 0 4px; border-top: 0; }

/* ---------- about ---------- */

/* `overflow-wrap: anywhere` because the polling line embeds `baseUrl`
   (CR_API_TOKEN / CR_API_BASE_URL config, e.g. a proxy hostname) - deploy
   config, not fixed copy, so it is not guaranteed to have a break opportunity
   at 390px width. */
.more-about { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
/* INV-5: the demo-mode note stays visible - tinted so it reads as a status, not
   as one more muted line. */
.more-demo { padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); margin-bottom: 4px; }

/* The fan-content notice (R-046) is a plain muted line of its own, a little
   apart from the version/append-only lines above it. */
.more-notice { margin-top: 6px; }

/* ---------- sign out ---------- */

/* The row is the card's whole body, like Export's: its hairline top border would
   sit against the card edge, so it is dropped. A <button>, so the label stays
   left-aligned like the link rows above it. */
.more-signout-card { padding-top: 8px; padding-bottom: 8px; }
.more-signout-card .more-row { padding: 2px 0; border-top: 0; }
.more-signout:disabled { opacity: .6; cursor: default; }

/* ---------- follow note (the Home partial, web/screens/follownote.js) ----------
   One dismissible line at the top of #home-live after a follow (R-043). Its
   styles live here because this task's scope has no stylesheet of its own for
   the partial and more.css is always loaded. It sits in the live stack
   (session.css gives that slot its own 10px gap), so it needs no margin. */
.follow-note {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; min-height: 44px;
  background: var(--s1); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 12px;
  font-size: 13px; line-height: 1.4; color: var(--ink-2);
}
.follow-note-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* A 44 x 44 hit area (the `.iconbtn` / `.btn` size; T5-030b SA21) whose -4px
   margin hands the extra back - the info tip's trick - so the glyph and the
   note's height stay exactly where the 36px button had them. */
.follow-note-close {
  flex: none; width: 44px; height: 44px; margin: -4px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
}
.follow-note-close:hover { color: var(--ink); background: var(--s2); }
