/* Shared picklist/menu system. */
.rs-picklist,
.rs-toolbar-picklist,
.rs-actions-menu { position: relative; display: block; min-width: 0; }
.rs-picklist { width: 100%; }
.rs-picklist-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }

.rs-picklist-trigger {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: var(--rs-picklist-trigger-height,24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rst-ui-text);
  font: inherit;
  font-size: var(--rs-field-control-size,12.5px);
  font-weight: var(--rs-field-control-weight,var(--rst-fw-medium));
  text-align: left;
  cursor: pointer;
}
.rs-picklist-trigger:disabled { cursor: not-allowed; opacity: .62; }
.rs-picklist-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-picklist-caret { width: 0; height: 0; flex: 0 0 auto; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--rst-state-info-text); }
.rs-picklist.is-open .rs-picklist-caret { transform: rotate(180deg); }

.rs-picklist-menu {
  z-index: var(--rst-z-overlay);
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--rst-ui-divider);
  border-radius: var(--rst-ui-radius-md);
  background: var(--rst-ui-workspace-header);
  color: var(--rst-ui-text);
  overflow-y: auto;
}
.rs-picklist-menu--floating { position: fixed; max-height: min(320px,calc(100vh - 32px)); }
.rs-picklist-menu--anchored { position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px; max-height: min(440px,calc(100vh - 150px)); gap: 12px; padding: 12px; }
.rs-picklist-menu--inline { position: absolute; left: -7px; top: calc(100% + 6px); z-index: var(--rst-z-popover); width: max(150px,calc(100% + 14px)); max-height: 220px; }

.rs-picklist-group,
.rs-picklist-options { display: grid; gap: 4px; }
.rs-picklist-label { color: var(--rst-ui-muted); font-size: 10px; font-weight: var(--rst-fw-bold); text-transform: uppercase; letter-spacing: .09em; }
.rs-picklist-option {
  appearance: none;
  width: 100%;
  min-height: var(--rs-picklist-option-height,30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--rst-ui-radius-xs);
  background: transparent;
  color: var(--rst-ui-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--rst-fw-bold);
  text-align: left;
  cursor: pointer;
}
.rs-picklist-option:is(:hover,:focus-visible,.is-selected) { background: var(--rst-ui-section-row-hover); outline: 0; }
.rs-picklist-option:disabled,
.rs-picklist-option.is-disabled { cursor: not-allowed; opacity: .52; }
.rs-picklist-option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-picklist-check { width: 17px; height: 17px; display: grid; place-items: center; border-radius: var(--rst-ui-radius-round); color: var(--rst-state-success-text); font-size: 11px; font-weight: var(--rst-fw-display); }

.rs-toolbar-picklist > summary,
.rs-actions-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.rs-toolbar-picklist > summary::-webkit-details-marker,
.rs-actions-menu > summary::-webkit-details-marker { display: none; }
.rs-toolbar-picklist .rs-control-button { width: 136px; min-width: 136px; font-size: 14px; font-weight: var(--rst-fw-bold); }
.rs-toolbar-picklist[open] .rs-control-button,
.rs-actions-menu[open] .rs-control-button { border-color: var(--rst-ui-divider); background: var(--rst-ui-section-row-hover); }
