/* Caboodle – Copyright (C) 2026 the Caboodle authors */
/* Style from (shared/stylerefs.js): the reference pictures' cards and the buttons that add them – and the sheet picker
   (sprite/pick.js) it opens; the Sprite editor's and 3D Paintover's. */
.sai-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.sai-ref { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 6px 4px 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-2); font: inherit; cursor: pointer; }
.sai-ref:disabled { opacity: .45; cursor: default; }
.sai-ref.on { border-color: var(--prog); background: var(--prog-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--prog); }
.sai-ref-pic { display: block; max-width: 56px; max-height: 56px; image-rendering: pixelated; background: repeating-conic-gradient(var(--checker-b) 0 25%, var(--checker-a) 0 50%) 0 0 / 10px 10px; }
.sai-ref-name { font-size: var(--fs-xs); line-height: 1.2; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sai-ref-add { justify-content: center; min-height: 82px; border-style: dashed; }
.sai-ref-add .material-symbols-outlined { font-size: 24px; }
.sai-ref-x { position: absolute; top: 2px; right: 2px; display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--text-2); cursor: pointer; }
.sai-ref-x .material-symbols-outlined { font-size: 14px; }
.spk { display: flex; flex-direction: column; gap: 8px; }
.spk-filter { width: 100%; box-sizing: border-box; }
.spk-list { display: flex; flex-direction: column; gap: 2px; max-height: min(60vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.spk-file { border-radius: var(--radius-s); }
.spk-file-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius-s); }
.spk-file-head:hover { background: var(--sunk); }
.spk-exp { border: 0; background: none; padding: 0; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.spk-file-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.spk-file-meta { margin-left: auto; font-size: var(--fs-s); color: var(--text-2); white-space: nowrap; }
.spk-sheets { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 6px 36px; }
.spk-sheet { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--radius-s); cursor: pointer; }
.spk-sheet:hover { background: var(--sunk); }
/* a sheet's picture: its first frame as big as fits, on a chequer, in a box of one size (so the names line up) */
.spk-pic { display: grid; place-items: center; flex: none; overflow: hidden; background: repeating-conic-gradient(var(--checker-b) 0 25%, var(--checker-a) 0 50%) 0 0 / 10px 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); }
.spk-pic canvas { display: block; }
.spk-sheet-pic { width: 160px; height: 96px; }
.spk-file-pic { width: 56px; height: 36px; cursor: pointer; }
.spk-sheet-text { display: flex; flex-direction: column; min-width: 0; }
.spk-sheet-name { font-weight: 500; }
.spk-sheet-info { font-size: var(--fs-s); color: var(--text-2); }
.spk-empty { padding: 8px 10px; font-size: 13px; color: var(--text-2); }
.spk-status { margin-right: auto; }
/* (the picker's words and foot where the page has no Sprite editor's styles) */
.spk .sai-hint, .spk-foot .sai-hint { font-size: var(--fs-s); color: var(--muted); }
.spk-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.spk-foot .sai-cost { margin-right: auto; font-size: var(--fs-m); color: var(--text-2); }
