/* Presentation for the return scope and matched-parts header. Matching,
   selection and staged shipments retain their existing workflow owners. */
#panel-returns .return-workspace-header {
  gap:18px;
  padding:var(--workspace-heading-inset) 18px 16px;
}
#panel-returns .return-workspace-header .workspace-heading { width:66%; max-width:440px; }
#panel-returns .workspace-heading > p { max-width:230px; font-size:14px; }
/* The approved image supplies its own clear space for the heading. */
[data-theme="agilent-web-light"] #panel-returns > .workspace-photo-header::after { background:linear-gradient(0deg,var(--bg),transparent 10%); }
[data-theme="agilent-web-light"] #panel-returns .workspace-heading > p { position:relative; isolation:isolate; }
[data-theme="agilent-web-light"] #panel-returns .workspace-heading > p::before { content:''; position:absolute; z-index:-1; inset:-8px -10px; background:radial-gradient(ellipse,rgba(231,243,250,.96),rgba(231,243,250,.8) 60%,transparent 100%); pointer-events:none; }
#panel-returns .return-space-selector {
  min-width:0;
  margin:0 0 16px;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:var(--surface-card-radius);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
}
.return-space-selector legend { float:left; width:100%; padding:0; margin:0 0 8px; color:var(--ink); font-size:19px; font-weight:750; }
.return-space-choices { clear:both; display:grid; gap:4px; }
.return-space-choice {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  min-width:0;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:9px;
  color:var(--ink);
  font-size:15px;
  line-height:1.3;
  cursor:pointer;
}
.return-space-choice:has(:checked) { border-color:var(--primary); background:var(--primary-soft); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 12%,transparent); }
.return-space-choice:has(:focus-visible) { outline:2px solid var(--primary); outline-offset:3px; }
.return-space-choice input {
  appearance:none;
  display:grid;
  place-content:center;
  flex:none;
  width:20px;
  height:20px;
  margin:0;
  padding:0;
  border:1.5px solid var(--line-strong);
  border-radius:50%;
  background:var(--surface);
  cursor:pointer;
}
.return-space-choice input:checked { background:var(--surface); border:2px solid var(--primary-dark); }
.return-space-choice input:checked::before { content:""; width:10px; height:10px; border-radius:50%; background:var(--primary-dark); }
.return-space-name { flex:1; min-width:0; overflow-wrap:anywhere; }
.return-space-count { flex:none; color:var(--ink-2); font-size:13px; white-space:nowrap; }
#returnsSpaceNotice { margin:12px 0 0; font-size:13px; line-height:1.45; color:var(--ink-2); }
#returnsSpaceNotice:empty { display:none; }
.return-mixed-selection { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.return-mixed-selection button { min-height:44px; padding:8px 10px; }
.return-card-lock-note { display:block; color:var(--muted); font-size:12px; line-height:1.35; }
#returnsOpportunitiesPanel > .return-matches-heading {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  background:var(--surface-2);
  color:var(--ink);
  border-bottom:1px solid var(--line);
}
.return-matches-heading h2 { margin:0; color:var(--ink); font-size:17px; }
.return-matches-heading .badge { color:var(--ink-2); border-color:var(--line); background:var(--surface); }
.return-matches-heading .returns-select-all {
  width:auto;
  min-height:44px;
  padding:6px 10px;
  border:1px solid var(--line-strong);
  border-radius:9px;
  background:var(--surface);
  color:var(--primary-dark);
  font-size:13px;
  font-weight:750;
  box-shadow:none;
}
@media (hover:hover) and (pointer:fine) { .return-matches-heading .returns-select-all:hover { background:var(--primary-soft); } }
.return-matches-heading .returns-select-all:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.return-source-note { display:grid; gap:2px; margin:2px 0; color:var(--ink); font-size:13px; font-weight:650; line-height:1.3; }
.return-source-line { display:flex; align-items:flex-start; gap:6px; min-width:0; }
.return-source-line span { min-width:0; overflow-wrap:anywhere; }
.return-source-line svg { width:17px; height:17px; flex:none; color:var(--primary-dark); fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#returnsGuidance { color:var(--ink-2); font-size:14px; line-height:1.45; }
@media (max-width:767px) {
  #panel-returns .return-workspace-header { padding:var(--workspace-heading-inset) 12px 12px; gap:16px; }
  #panel-returns .return-workspace-header .workspace-heading { width:75%; }
  #panel-returns .workspace-heading h1 { font-size:24px; }
  #panel-returns .return-space-selector { padding:15px; }
  .return-space-choice { gap:8px; padding:8px; font-size:14px; }
  #returnsOpportunitiesPanel > .return-matches-heading { padding:14px 15px; }
  #returnsOpportunitiesPanel > .panel-body { padding:12px 15px 15px; }
}
