/* Copyright (c) 2024-2026 Kilotronic LLC. All rights reserved. */

/* /info page — device & accessibility diagnostics */

/* shared.css provides color tokens, the reset, and the app typefaces. */

#info-root {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

#info-root header {
  margin-bottom: 2rem;
}

/* Back-to-console nav: top of the header, set apart from the body copy. */
#info-root #info-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
}
#info-root #info-back:hover,
#info-root #info-back:focus-visible {
  color: var(--text);
  outline: none;
}
#info-root #info-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

#info-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

#info-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Analytics-status chip — a neutral, factual "are de-identified analytics
   being collected right now?" signal. Deliberately not color-coded good/bad:
   logging isn't a warning, it's just current state. */
#info-root .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin: 0 0 1.5rem;
  padding: 0.3em 0.75em;
  border: 1px solid var(--surface);
  border-radius: 1em;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
}
#info-root .status-chip::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
/* The active state gets a filled dot, idle a hollow one — shape, not alarm color. */
#info-root .status-chip.off::before {
  background: transparent;
  border: 1px solid currentColor;
}

#info-root section {
  margin-bottom: 1.5rem;
}

/* Extra breathing room above the first (Controllers) panel. */
#panel-gamepads {
  margin-top: 2rem;
}

#panel-gamepads > h2,
#panel-log > h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

#info-root dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0.5rem 0 0;
}

#info-root dt {
  font-weight: 600;
  color: var(--text-dim);
  word-break: break-all;
}

#info-root dd {
  margin: 0;
  word-break: break-all;
}

.gamepad-card {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--surface);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

/* Stacked cell: button index over its resolved intent. Width fits the longest
   intent name (e.g. "negative"/"positive"); unmapped buttons show the index
   only. */
.btn-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 4em;
  text-align: center;
  padding: 0.2em 0.3em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.8em;
  background: var(--bg-1);
}

.btn-idx {
  font-weight: 600;
}

.btn-intent {
  font-size: 0.85em;
  color: var(--text-dim);
  margin-top: 0.1em;
}

.btn-cell.pressed {
  background: var(--c-proceed);
  border-color: var(--c-proceed);
  color: #000;
}

.btn-cell.pressed .btn-intent {
  color: rgba(0, 0, 0, 0.8);
}

#info-root .data-section {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-card);
  background: var(--surface);
}
#info-root .data-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem;
}
#info-root .sec-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 0 0.4rem;
}
#info-root #data-statement,
#info-root #data-disclaimer {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}
