/* The "Open one" tab of the crate pages (components/CratePeek.astro).
 *
 * ⚠️ A FILE, NOT A <style> IN THE COMPONENT. Astro bundles the styles of every
 * component a page imports, rendered or not: in the component, these rules
 * would have landed in the inline stylesheet of every production crate page
 * with the flag off. Linked from the tab itself, they exist only where it does.
 * Versioned like the scripts: a fix ships as haul-peek-v4.css. v2 (02/11/2026):
 * the item picture fills its tile, every word at 14 px at least. v3 (same day):
 * the line under a crate that gave Honeycomb (what Extract turns it into), and
 * the heap keeps a row of room while the first crate opens by itself.
 *
 * ⚠️ lid-*, NOT peek-*: the CCTV camera viewer owns .peek-* in signpainter.css,
 * and its global .peek-name set every item name of this tab in capitals. */
.crate-peek .lid-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 4px 0 16px;
}
.crate-peek .lid-roll {
  min-width: 180px;
  min-height: 48px;
  height: auto;
  font-size: 14px;
}
/* No script, no button: the sentence of the noscript says why. */
@media (scripting: none) {
  .crate-peek .lid-roll {
    display: none;
  }
}
.crate-peek .lid-more {
  font-weight: 700;
  font-size: 15px;
}
.crate-peek .lid-heap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* --lid-min is set by haul-peek-v2.js: the widest tile that keeps the whole
     crate on the screen. 112 px is the size before the script measures. */
  grid-template-columns: repeat(auto-fill, minmax(var(--lid-min, 112px), 1fr));
  align-content: start;
  gap: 6px;
}
/* Twenty stacks on a small screen: the last row scrolls inside the heap. */
.crate-peek .lid-heap.is-deep {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
}
/* The pane above sets its labels in capitals; an item name reads as the game
   writes it. */
.crate-peek .lid-tile {
  text-transform: none;
  letter-spacing: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: 2px solid var(--rp-rule);
  background: var(--rp-plank);
  color: var(--rp-ink);
  text-align: center;
  text-decoration: none;
}
.crate-peek a.lid-tile:hover .lid-name {
  text-decoration: underline;
}
.crate-peek .lid-ic {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--rp-icon-bed);
  border: 2px solid var(--rp-icon-ink);
  box-shadow: inset -3px -3px 0 rgba(36, 30, 20, 0.09);
}
.crate-peek .lid-n {
  font: 700 17px/1 var(--rp-mono);
}
.crate-peek .lid-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.crate-peek .lid-worn {
  font: 600 14px/1.2 var(--rp-mono);
  color: var(--rp-red-text);
}
.crate-peek .lid-none {
  grid-column: 1 / -1;
  font-size: 15px;
  color: var(--rp-text-2);
}
/* The tab opens a crate by itself (v2 of the script): until it lands, the heap
   holds the height of one row of tiles, so the pane does not jump twice. */
.crate-peek[aria-busy='true'] .lid-heap:empty {
  min-height: 170px;
}
/* Honeycomb came out: what Extract turns it into. The nucleus wears its icon,
   the same bed as the tiles above it. */
.crate-peek .comb-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--rp-text-2);
}
.crate-peek .comb-hint img {
  flex: none;
  width: 44px;
  height: 44px;
  background: var(--rp-icon-bed);
  border: 2px solid var(--rp-icon-ink);
}
/* display:flex above beats the hidden attribute: no combs, no line. */
.crate-peek .comb-hint[hidden] {
  display: none;
}
