/* Screenshot prototype pages (admin only): /admin/proto/search, /admin/proto/browse/<topic>,
   /admin/proto/shots. webhive/web/views/shots_proto.py. Uses the tokens of tokens.css,
   so light and dark themes both work. */

.pv-banner { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r);
  border: 1px dashed var(--warn); background: var(--warn-wash); color: var(--ink-2); font-size: var(--fs-1); }
.pv-hero { font: 500 var(--fs-4)/1.25 var(--serif); margin: 0 0 var(--s2); color: var(--ink); }
.pv-switch { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }

/* the preview image: fixed 16:10, the letter tile when there is no shot */
.pv-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface-2); }
.pv-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pv-img--none { display: grid; place-items: center; background: var(--accent-wash); }
.pv-img--none span { font: 600 40px var(--serif); color: var(--accent); }
.pv-img__tag { position: absolute; left: 6px; bottom: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px;
  background: var(--surface); color: var(--ink-3); border: 1px solid var(--line); }

/* search: a preview column beside the result */
.pv-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; }
.pv-row__img { display: block; margin-top: var(--s4); }
/* the layout class sits on a parent (/admin/proto/search) or on the row itself (preview mode
   on the real results page, 2026-10-10: the screenshot fell back to full width) */
.pv-layout-top .pv-row--shot, .pv-layout-top.pv-row--shot { grid-template-columns: minmax(0, 1fr) 200px; }
.pv-layout-top .pv-row--shot .pv-row__img, .pv-layout-top.pv-row--shot .pv-row__img { order: 2; }
.pv-layout-all .pv-row--shot, .pv-layout-all.pv-row--shot { grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); }
.pv-layout-all .pv-row__img .pv-img__tag { display: none; }
.pv-layout-hover .pv-row--shot, .pv-layout-hover.pv-row--shot { grid-template-columns: 56px minmax(0, 1fr); gap: var(--s3); }

/* hover layout: a small chip; the big preview shows on hover or focus (a tap on touch) */
.pv-pop { position: relative; display: block; margin-top: var(--s4); cursor: zoom-in; border-radius: var(--r); }
.pv-pop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-img--chip .pv-img__tag { display: none; }
.pv-pop__body { display: none; position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: min(420px, 80vw);
  padding: 4px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 28px rgb(0 0 0 / .18); }
.pv-pop:hover .pv-pop__body, .pv-pop:focus .pv-pop__body, .pv-pop:focus-within .pv-pop__body { display: block; }

@media (max-width: 720px) {
  .pv-layout-top .pv-row--shot, .pv-layout-top.pv-row--shot { grid-template-columns: minmax(0, 1fr); }
  .pv-layout-top .pv-row--shot .pv-row__img, .pv-layout-top.pv-row--shot .pv-row__img { order: 0; max-width: 320px; }
  .pv-layout-all .pv-row--shot, .pv-layout-all.pv-row--shot { grid-template-columns: 84px minmax(0, 1fr); }
}

/* directory cards */
.pv-cards { list-style: none; margin: var(--s3) 0 var(--s6); padding: 0; display: grid; gap: var(--s5) var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pv-cards--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.pv-card { min-width: 0; }
.pv-card__link { display: block; text-decoration: none; }
.pv-card__link:hover .pv-img { border-color: var(--accent); }
.pv-card__name { display: block; margin-top: var(--s2); font: 500 var(--fs-3)/1.3 var(--serif); color: var(--title);
  overflow-wrap: anywhere; }
.pv-card__link:hover .pv-card__name { text-decoration: underline; }
.pv-card__domain { display: block; font-size: var(--fs-1); color: var(--ink-3); overflow-wrap: anywhere; }
.pv-card__desc { margin: var(--s1) 0 0; font-size: var(--fs-2); color: var(--ink-2); display: -webkit-box;
  -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-card__meta { margin: var(--s1) 0 0; font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: var(--s2); }

/* admin grid of every shot */
.shot-grid { list-style: none; margin: 0; padding: var(--s3) var(--s4); display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.shot-grid__item { min-width: 0; }
.shot-grid__item img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border: 1px solid var(--line); border-radius: 6px; }
.shot-grid__none { aspect-ratio: 16 / 10; display: grid; place-items: center; border: 1px dashed var(--line);
  border-radius: 6px; color: var(--ink-3); font-size: 12px; }
.shot-grid__title { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.shot-grid__meta { margin: 2px 0 0; color: var(--ink-3); overflow-wrap: anywhere; }
