/* rohin.me - what the two shelf pages share (js/shelves.js): Scarecrow (.sc-*) and DVD / VHS (.sf-*).
   The filter panel: wider than a phone it stands open beside the shelf, every group as small chips (Format and Decade
   carry the spine's shape and colour, so the panel is also the key); on a phone the same chips sit in a sheet. Small to
   look at; on a touch screen each chip still takes a 44 px touch (the pill is drawn inside it). Tokens only. */
.shp { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); padding: .6rem .7rem .7rem; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); overflow: hidden; }
.shp[hidden] { display: none; }
/* Clear: beside the count while something is chosen (the panel itself has no head: every pixel goes to the chips) */
.shp-clear[hidden] { display: none; }
/* the groups: a small label over its chips; the box scrolls inside itself only if a short screen needs it */
.shp > :last-child { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: .45rem; align-content: start; padding: 1px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.shp .sc-group, .shp .chip-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; align-items: start; min-width: 0; }
.shp .sc-label, .shp .chip-label { padding-top: 0; font-size: .6875rem; font-weight: 500; line-height: 1.2; letter-spacing: .02em; color: var(--ink-3); }
.shp .sc-chips, .shp .chip-row { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.shp .sc-chip, .shp .chip-btn { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.625rem; padding: 0 .5rem; font-size: var(--t-tiny); line-height: 1; }
.shp .sc-chip-n, .shp .sf-k { font-size: .6875rem; font-weight: 400; color: var(--ink-3); }
.shp [aria-pressed="true"] .sc-chip-n, .shp [aria-pressed="true"] .sf-k { color: var(--ink-2); }
.shp .sc-chip .sc-spine, .shp .chip-btn .sc-spine { width: calc(var(--w, 1) * 6px); height: calc(var(--h, 1) * 16px); border-radius: 1.5px; }
.shp .sc-select, .shp .sf-more { width: 100%; max-width: none; min-height: 0; height: 1.875rem; padding: 0 1.6rem 0 .6rem; border-radius: var(--r-1); font-size: var(--t-tiny); }
/* two menus side by side (they name themselves: "All sections"); groups that share a row (Sort, Verified) */
.shp-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; min-width: 0; }
.shp .shp-pair .sc-label, .shp .shp-pair .chip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shp-row { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem .9rem; min-width: 0; }
.shp-row > * { min-width: 0; }
.shp-row > [data-filter="country"] { flex: 1 1 8rem; }
.sc-sheet-body .shp-pair, .sheet-body .shp-pair, .sc-sheet-body .shp-row, .sheet-body .shp-row { display: contents; }      /* in the sheet: one group under the other, as before */

/* a touch screen (a tablet with the panel open): the chip is 44 px to the finger, the pill inside it stays small */
@media (pointer: coarse) {
  .shp .sc-chips, .shp .chip-row { gap: 0 .25rem; }
  .shp .sc-chip, .shp .chip-btn { position: relative; z-index: 0; min-height: var(--tap); min-width: var(--tap); justify-content: center; border-color: transparent; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .shp .sc-chip::before, .shp .chip-btn::before { content: ''; position: absolute; inset: .45rem 0; z-index: -1; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass); transition: border-color var(--fast), background var(--fast); }
  .shp .sc-chip[aria-pressed="true"], .shp .chip-btn[aria-pressed="true"] { border-color: transparent; background: none; }
  .shp .sc-chip[aria-pressed="true"]::before, .shp .chip-btn[aria-pressed="true"]::before { border-color: color-mix(in srgb, var(--accent) 65%, transparent); background: var(--accent-soft); }
  .shp .sc-select, .shp .sf-more { min-height: var(--tap); height: var(--tap); }
  .shp .sc-group, .shp .chip-group { gap: 0; }
  .shp > :last-child { gap: .35rem; }
}
@media (prefers-reduced-motion: reduce) { .shp .sc-chip::before, .shp .chip-btn::before { transition: none; } }
