/* P2353: shared picker, using the host page's settled theme and spacing scale. */
.bws-material-picker {
  box-sizing: border-box;
  width: 100%; min-width: 0;
  padding: var(--space-1, 8px) var(--space-2, 12px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs, 8px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--type-fine-size, .875rem);
  text-overflow: ellipsis;
  cursor: pointer;
}
.bws-material-picker[aria-expanded="true"] { cursor: text; }
.bws-material-picker:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.bws-material-picker::placeholder { color: var(--text-muted); opacity: 1; }
.bws-material-picker:disabled { cursor: default; }
.bws-material-popup {
  position: fixed; z-index: 10000;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  max-width: 560px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs, 8px);
  background: var(--surface); color: var(--text);
  font-size: var(--type-fine-size, .875rem);
  overflow: hidden;
}
.bws-material-popup[hidden] { display: none; }
.bws-material-list { max-height: 22rem; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.bws-material-list[hidden] { display: none; }
.bws-material-heading {
  margin: 0;
  padding: var(--space-1, 8px) var(--space-2, 12px) 4px;
  border-top: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--surface);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: default;
  pointer-events: none;
  user-select: none;
}
.bws-material-list > [role="group"]:first-child > .bws-material-heading { border-top: 0; }
.bws-material-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2, 12px);
  padding: var(--space-1, 8px) var(--space-2, 12px);
  line-height: 1.25;
  cursor: pointer;
}
.bws-material-option-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.bws-material-option-trail {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1, 8px);
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: .75rem;
  white-space: nowrap;
}
.bws-material-option-thk { color: var(--text-muted); }
.bws-material-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-weight: 600;
}
.bws-material-option[aria-selected="true"] .bws-material-option-name { font-weight: 700; }
.bws-material-option.is-active, .bws-material-option:hover {
  color: var(--surface); background: var(--text);
}
.bws-material-option.is-active .bws-material-option-trail,
.bws-material-option:hover .bws-material-option-trail,
.bws-material-option.is-active .bws-material-current,
.bws-material-option:hover .bws-material-current,
.bws-material-option.is-active .bws-material-option-thk,
.bws-material-option:hover .bws-material-option-thk {
  color: var(--surface);
}
.bws-material-empty {
  padding: var(--space-2, 12px);
  color: var(--text-muted);
}
.bws-material-empty[hidden] { display: none; }
.bws-material-empty-text { margin: 0 0 var(--space-1, 8px); color: var(--text); }
.bws-material-library-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.bws-material-library-link:hover { color: var(--text-muted); }
@media (forced-colors: active) {
  .bws-material-option.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}
