/* /buttons.css — the button wall: one white window on the green, the buttons in a grid,
   shown at 1x or 2x (pixelated, never smoothed: they're pixel art) */

.bt-page > main { padding-top: 2.6em; }
.bt { max-width: 980px; margin: 0.6em auto 4em; padding: 0 0.8em; }
.bt__win { background: #fff; border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
.bt__intro { font-size: 0.85em; margin: 0.6em 1em 0.2em; text-align: center; }

.bt__pager {
  margin: 0.4em 1em; text-align: center; font-size: 0.9em; letter-spacing: 0.04em;
}
.bt__pager:empty { display: none; }
.bt__pager s { text-decoration: none; opacity: 0.35; }
.bt__pager a { padding: 0 0.2em; }

.bt__wall {
  list-style: none; margin: 0; padding: 0.8em 1em 1em;
  display: grid; gap: 1em 0.8em; justify-content: center;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--tw) * 1px * var(--z) + 8px), 1fr));
  --tw: 88;
}
.bt__wall[data-kind="bl"] { --tw: 150; }
.bt__wall[data-kind="ti"] { --tw: 80; }
.bt__wall[data-kind="aw"] { --tw: 100; }
.bt__wall[data-kind="dv"] { grid-template-columns: 1fr; gap: 1.2em; }
/* a tile shown repeating (scaled with the zoom), the tile itself in the corner: that's the one to save */
.bt__tilebox, .bt__tilebig { position: relative; background-repeat: repeat; image-rendering: pixelated; }
.bt__tilebox { width: calc(80px * var(--z)); height: calc(56px * var(--z)); background-size: calc(var(--w) * 1px * var(--z)); border: 1px solid #000; }
.bt__tilebox img { position: absolute; right: 3px; bottom: 3px; outline: 1px solid #000; width: calc(var(--w) * 1px) !important; height: calc(var(--w) * 1px) !important; }
.bt__tilebig { width: min(640px, 80vw); height: 240px; background-size: calc(var(--w) * 2px); border: 2px solid #000; }
/* dividers at their own size, whatever the zoom: they're meant to span a page */
.bt__wall[data-kind="dv"] img { width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); max-width: 100%; }
.bt__one[data-kind="dv"] .bt__big img { width: calc(var(--w) * 2px); }
.bt__wall[hidden] { display: none; }
body { --z: 2; }
body[data-zoom="1"] { --z: 1; }
.bt__wall > li { min-width: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 0.25em; }
.bt__wall > li::before { content: none; }
.bt__img, .bt__img:visited { display: block; line-height: 0; padding: 3px; text-decoration: none; }
.bt__img:hover, .bt__img:focus-visible { background: #000; }
/* each img carries its own size in --w/--h (buttons.js), so buttons and blinkies share the rules */
.bt__wall img, .bt__one img {
  display: block; image-rendering: pixelated; image-rendering: crisp-edges;
  width: calc(var(--w) * 1px * var(--z)); height: calc(var(--h) * 1px * var(--z));
}
.bt__cap {
  display: flex; gap: 0.5em; justify-content: center; max-width: 100%;
  font-size: 0.65em; white-space: nowrap;
}
.bt__cap a { overflow: hidden; text-overflow: ellipsis; }
.bt__cap i { font-style: normal; opacity: 0.6; }

/* one button: big, then as it really is */
.bt__one { padding: 1em; display: flex; flex-direction: column; align-items: center; gap: 0.6em; }
.bt__one[hidden] { display: none; }
.bt__big img { width: calc(var(--w) * 4px); max-width: 80vw; height: auto; }
.bt__small img { width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); }
.bt__meta, .bt__acts { margin: 0; text-align: center; font-size: 0.85em; }

.bt__tabs { text-align: center; margin: 0.5em 1em 0; letter-spacing: 0.06em; }
.bt__tabs b { background: #000; color: #fff; padding: 0 0.4em; font-weight: normal; }
.bt__tabs a { padding: 0 0.4em; }
.bt__foot { text-align: center; margin: 0.2em 1em 0.8em; }
.bt__hits { text-align: center; font-size: 0.75em; margin: 0 1em 0.8em; display: flex; justify-content: center; align-items: center; gap: 0.5em; }
.bt__hits img, .hits img { display: block; image-rendering: pixelated; }
/* one button already shows itself big and at 1x: the zoom has nothing to do */
.bt__one:not([hidden]) ~ .bt__foot { display: none; }
.bt__zoom {
  font: inherit; font-size: 0.85em; background: #000; color: #fff; border: 0; padding: 0 0.4em; cursor: pointer;
}
.bt__zoom:hover, .bt__zoom:focus-visible { background: #00c800; color: #000; outline: none; }
