/* OBSCURA OS - Sheets: Version History, and the status bar's figures.
 *
 * Kept out of the page's own style block, which is held to its size
 * (design-lint.mjs), and loaded after it. */

/* The status bar's Average, Count, Min, Max and Sum: each a button that
   copies its figure (sheets-shell.js). */
#selectionMathSummary { gap: 2px; }
.sh-stat { min-height: 20px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.sh-stat:hover { background: var(--sh-hover); color: var(--ink); }
.sh-stat:focus-visible { outline: 2px solid var(--sheet-green); outline-offset: -2px; }
@media (max-width: 760px) {
  #selectionMathSummary { gap: 0; }
  #selectionMathSummary .sh-avg, #selectionMathSummary .sh-min, #selectionMathSummary .sh-max { display: none; }
}

/* Version History (sheets-versions.js): the list, newest first, and a
   version's cells, read only. */
.sh-ver-save { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0; }
.sh-ver-save .sh-f { flex: 1 1 auto; margin: 0; }
.sh-ver-list { max-height: 46vh; overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.sh-ver-list > .sh-note { margin: 10px 12px; }
.sh-ver-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.sh-ver-row:last-child { border-bottom: 0; }
.sh-ver-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sh-ver-when { font-weight: 600; color: var(--ink); }
.sh-ver-kind, .sh-ver-sum { font-size: var(--text-2xs); color: var(--ink-soft); }
.sh-ver-kind.named { color: var(--sheet-green); font-weight: 600; }
.sh-ver-sum { font-variant-numeric: tabular-nums; }
.sh-ver-acts { display: flex; gap: 6px; flex: none; }
.sh-ver-acts .sh-b { min-width: 0; }
.sh-ver-prevbox { max-height: 50vh; overflow: auto; border: 1px solid var(--rule); }
.sh-ver-grid { border-collapse: collapse; font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.sh-ver-grid th { position: sticky; top: 0; background: var(--sh-ribbon); color: var(--ink-soft); font-weight: 400; padding: 2px 6px; border: 1px solid var(--rule); }
.sh-ver-grid tbody th { position: static; text-align: right; }
.sh-ver-grid td { min-width: 64px; max-width: 180px; padding: 2px 6px; border: 1px solid var(--rule); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-ver-grid td.num { text-align: right; }
@media (max-width: 560px) {
  .sh-ver-row { flex-wrap: wrap; }
  .sh-ver-acts { width: 100%; }
  .sh-ver-acts .sh-b { flex: 1 1 0; }
  .sh-ver-save { flex-direction: column; align-items: stretch; }
}
@media (pointer: coarse) {
  .sh-ver-acts .sh-b, .sh-ver-save .sh-b, .sh-ver-save input, #shVerSheet { min-height: 44px; }
  .sh-stat { min-height: 44px; min-width: 44px; }
}
