/* Big preview mode of the right panel (js/features/bigpreview.js; owner: preview). The photo fills the panel,
   the details fold into a strip, the docked panel is as wide as --ins-big-w (set on <html>; up to about half
   the screen, its own drag handle). Tokens from style.css only. */

/* the toggle: a sticky pill at the panel's top left (zero height, so nothing moves) */
.ins-bigrow { position: sticky; top: 0; z-index: 4; flex: none; height: 0; overflow: visible; }
.ins-bigbtn { position: absolute; left: 12px; top: 12px; height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px;
  border: 1px solid var(--line-3); border-radius: 999px; background: rgba(23, 24, 27, .82); color: var(--text-2); font: 600 12px/1 var(--font); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ins-bigbtn:hover { background: var(--raised); color: var(--text); }
.ins-bigbtn[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.inspector:not([data-kind="file"]):not([data-kind="match"]) .ins-bigrow { display: none; }
.ins-bigbtn .ic { flex: none; }
body.ins-float .ins-bigbtn { left: 12px; }

/* wider docked panel */
body.ins-big.ins-docked .app { grid-template-columns: var(--sb-w) minmax(0, 1fr) var(--ins-big-w); }
body.ins-big.ins-docked .ins-resize { display: none; }
body.ins-big.ins-float .inspector { width: min(var(--ins-big-w, 460px), calc(100vw - 40px)); }
.ins-big-resize { position: fixed; top: 0; bottom: 0; right: calc(var(--ins-big-w, 0px) - 3px); z-index: 30; width: 7px; cursor: col-resize; touch-action: none; outline: none; display: none; }
body.ins-big.ins-docked .ins-big-resize { display: block; }
.ins-big-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .12s; }
.ins-big-resize:hover::after, .ins-big-resize.drag::after, .ins-big-resize:focus-visible::after { background: var(--accent); width: 2px; left: 2.5px; }
.ins-big-resize:focus-visible { box-shadow: 0 0 0 2px var(--accent-soft); }

/* the panel's body in big mode */
.inspector.is-big { overflow: hidden; }
.ins-body.bp { flex: 1 1 0; min-height: 0; padding: 0; gap: 0; overflow: hidden; }
.bp-stage { position: relative; flex: 1 1 0; min-height: 140px; display: grid; place-items: center; background: var(--sunk); overflow: hidden; }
.bp-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.bp-lo:not([src]), .bp-hi:not([src]) { visibility: hidden; }
.bp-hi { opacity: 0; transition: opacity .18s; }
.bp-hi.ld { opacity: 1; }
.bp-msg { position: relative; color: var(--faint); font-size: 12.5px; }
.bp-details { flex: 0 1 auto; max-height: 52%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px; padding: 16px 18px;
  border-top: 1px solid var(--line); background: var(--pane); scrollbar-width: thin; }
.bp-details[hidden] { display: none; }
.bp-strip { flex: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); background: var(--pane); }
.bp-id { flex: 1; min-width: 0; }
.bp-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-meta { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-more { flex: none; height: 32px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px 0 12px; flex-direction: row-reverse; border: 1px solid var(--line-2); border-radius: 9px;
  background: transparent; color: var(--text-2); font: 600 12px/1 var(--font); cursor: pointer; }
.bp-more:hover { background: var(--raised); color: var(--text); }
.bp-more .ic { transition: transform .15s; }
.bp-more[aria-expanded="true"] .ic { transform: rotate(180deg); }

@media (max-width: 767px) {
  .inspector.is-big { height: min(88vh, 860px); max-height: none; }
  .ins-bigbtn { height: 44px; padding: 0 16px 0 14px; left: 14px; top: 14px; font-size: 13px; }
  .bp-strip { min-height: 56px; padding-right: 12px; }
  .bp-more { height: 44px; padding: 0 14px; }
  .bp-details { padding: 14px 16px; max-height: 50%; }
}
@media (prefers-reduced-motion: reduce) { .bp-hi, .bp-more .ic { transition: none; } }
