/* The collection is the workspace; DICOM identities remain inside the image model. */
.collection-workspace-page .app-main { max-width:1600px; }
.study-workspace-heading,.study-action-bar,.study-images-heading,.study-workspace-footer,.collection-measurement-header,.collection-measurement-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.study-workspace-heading { margin:0 0 16px; }
.study-workspace-heading h1 { font-size:clamp(22px,2vw,30px); margin:2px 0; }
.study-workspace-heading p { margin:4px 0; }
.study-workspace-panel { padding:16px; border:1px solid #41434a; border-radius:12px; background:#1b1d21; }
.study-protocol { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin:16px 0; padding:14px; border:1px solid #706439; border-radius:8px; background:#25251f; }
.study-protocol label { display:grid; gap:6px; min-width:min(240px,100%); }
.study-protocol select { max-width:100%; }
.study-protocol p { margin:6px 0; }
.study-action-bar { position:sticky; top:0; background:#24272d; padding:12px; border-radius:8px; z-index:2; }
.study-action-bar span { display:inline-block; margin-left:12px; color:#cbd0d8; }
.study-settings { margin:16px 0; border:1px solid #474a52; border-radius:8px; padding:12px; }
.study-settings summary { cursor:pointer; color:#f5d160; font-weight:600; }
.study-settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); gap:16px; margin:16px 0; }
.study-settings label { display:grid; gap:6px; }
.study-participants { margin:12px 0; border:0; padding:0; }
.study-participants label { display:inline-flex; align-items:center; margin:5px 20px 10px 0; }
.study-participants input,.study-image-card input { width:20px; height:20px; accent-color:#ffcf25; flex-shrink:0; }
.study-images-heading { margin:16px 0 12px; }
.study-images-heading h2 { font-size:18px; margin:0; }
.study-image-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(215px,1fr)); gap:10px; }
.study-image-card { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid #464952; border-radius:8px; min-width:0; cursor:pointer; background:#22252b; }
.study-image-card.is-selected { border-color:#b89c3e; background:#2c2c24; }
.study-image-card img { width:66px; height:76px; object-fit:contain; background:#08090b; border-radius:4px; }
.study-image-card span { min-width:0; }
.study-image-card strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.study-image-card small { display:block; color:#c4c9d0; margin-top:5px; }
.study-workspace-footer { margin:16px 0; }
.collection-viewer-page { height:100dvh; overflow:hidden; }
.body-collection-viewer-page .site-header { display:none; }
.body-collection-viewer-page .page { margin:0; padding:0; max-width:none; height:100%; width:100%; }
#collection-measurement-app { height:100dvh; width:100%; display:flex; flex-direction:column; background:#111317; color:#edf0f5; }
.collection-measurement-header { flex:0 0 auto; flex-wrap:wrap; padding:8px 12px; border-bottom:1px solid #3d4149; background:#1b1e24; }
.collection-measurement-header>div:first-of-type { min-width:140px; flex:1; }
.collection-measurement-header strong,.collection-measurement-header #collection-current-image { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#collection-current-image { font-size:12px; color:#cbd0da; margin-top:3px; }
.collection-measurement-header button,.collection-measurement-header .button { font-size:13px; min-height:36px; padding:7px 12px; white-space:nowrap; }
.blinded-measurement-notice { flex:none; margin:0; padding:6px 12px; font-size:12px; color:#d6dbe4; background:#24272e; }
.collection-measurement-body { display:flex; flex:1; min-height:0; min-width:0; }
.collection-image-strip { width:220px; flex-shrink:0; overflow:auto; border-right:1px solid #3f444e; padding:7px; scrollbar-gutter:stable; }
.collection-image-choice { display:flex; align-items:center; gap:8px; width:100%; text-align:left; margin:0 0 6px; padding:8px; border:1px solid #414650; background:#22262d; color:#e7eaf0; border-radius:7px; }
.collection-image-choice.is-active { border-color:#ffcf25; background:#3b3523; box-shadow:inset 3px 0 #ffcf25; }
.collection-image-choice img { width:52px; height:60px; object-fit:contain; background:#08090b; border-radius:4px; }
.collection-image-choice span { min-width:0; }
.collection-image-choice strong { display:block; overflow-wrap:anywhere; font-size:12px; }
.collection-image-choice small { display:block; margin-top:6px; font-size:11px; color:#c7ced8; }
.collection-viewport-shell { position:relative; flex:1; min-width:0; min-height:0; background:#000; }
#collection-viewer-frame { width:100%; height:100%; border:0; display:block; }
.collection-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:14px; background:#14171bec; padding:24px; text-align:center; }
.collection-loading[hidden] { display:none; }
.collection-measurement-footer { flex:0 0 auto; padding:8px 12px; background:#20242a; border-top:1px solid #41454d; }
.collection-measurement-footer p { font-size:12px; margin:0; flex:1; min-width:120px; }
.collection-measurement-footer button { min-height:38px; font-size:13px; padding:8px 12px; }
.collection-measurement-footer .is-error { color:#ffb6b6; }
.images-collapsed .collection-image-strip { display:none; }
@media(max-width:1100px) { .collection-image-strip { width:175px; } .collection-measurement-footer { gap:6px; } }
@media(max-height:650px) and (min-width:721px) { .collection-measurement-header { padding:5px 10px; } .collection-measurement-footer { padding:5px 10px; } }
/* Privacy controls stay readable at laptop scale; the image retains its aspect ratio. */
.body-pixel-review-page [data-review-command],.body-pixel-review-page .privacy-review-toolbar button { min-height:34px; font-size:12px; }

.body-collection-viewer-page { height:100dvh; overflow:hidden; margin:0; }

#collection-toggle-images span { margin-left:5px; }
.body-collection-viewer-page .page { border:0; min-height:0; }

/* Override the authenticated shell margin at every responsive breakpoint. */
.research-app.body-collection-viewer-page main.page.collection-viewer-page { margin:0; padding:0; width:100%; max-width:none; border:0; }

.results-preview { min-width: 0; }
.results-filters { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin:20px 0; }
.results-filters label { display:grid; gap:6px; flex:1 1 220px; }
.results-filters input, .results-filters select { width:100%; min-width:0; }
.results-table-scroll { overflow:auto; max-height:65vh; border:1px solid #414247; border-radius:8px; }
.results-table-scroll table { width:100%; border-collapse:collapse; }
.results-table-scroll th { position:sticky; top:0; background:#25262a; z-index:1; text-align:left; }
.results-table-scroll th, .results-table-scroll td { padding:12px; border-bottom:1px solid #3b3c40; }
.results-table-scroll td { overflow-wrap:anywhere; min-width:100px; }
.results-table-scroll tr[hidden] { display:none; }
.results-table-scroll tbody tr:hover { background:#ffffff08; }
.results-preview [hidden] { display:none; }

/* Compact sharing controls, separate from measurement settings. */
.collection-participants-dialog { box-sizing:border-box; width:min(600px,calc(100% - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:24px; border:1px solid #6e612c; border-radius:12px; color:#f1f1f3; background:#1b1d21; }
.collection-participants-dialog::backdrop { background:rgba(0,0,0,.7); }
.collection-participants-dialog h2 { margin:0; font-size:22px; }
.collection-participants-dialog p { line-height:1.5; }
.collection-participants-dialog .study-participants { display:grid; gap:4px; }
.collection-participants-dialog .study-participants label { display:flex; gap:12px; margin:0; padding:12px 0; border-bottom:1px solid #3b3e46; }
.collection-participants-dialog small { display:block; color:#bec2ca; margin-top:3px; }
.collection-participants-dialog footer { justify-content:flex-end; margin-top:20px; }
