/* Expandable category → role picker (profile + onboarding) */

.role-picker {
  position: relative;
  width: 100%;
}

.role-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 36, 0.12);
  border-radius: 10px;
  background: #fff;
  font: 400 14px/1.4 'Inter', -apple-system, sans-serif;
  color: #0f1724;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.role-picker-trigger:hover {
  border-color: rgba(15, 23, 36, 0.22);
}

.role-picker-trigger:focus {
  outline: none;
  border-color: rgba(15, 23, 36, 0.35);
  box-shadow: 0 0 0 3px rgba(214, 253, 97, 0.35);
}

.role-picker-trigger.is-open {
  border-color: rgba(15, 23, 36, 0.35);
}

.role-picker-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(15, 23, 36, 0.45);
}

.role-picker-trigger.has-value .role-picker-label {
  color: #0f1724;
}

.role-picker-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #6b7280;
  transition: transform 160ms ease;
}

.role-picker-trigger.is-open > .role-picker-chevron {
  transform: rotate(180deg);
}

.role-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 36, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  padding: 4px 0 6px;
}

.role-picker-search-input-inline {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #0f1724;
  outline: none;
}

.role-picker-search-input-inline::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.role-picker-search-input-inline:focus,
.role-picker-search-input-inline:focus-visible {
  outline: none;
  box-shadow: none;
}

.role-picker-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font: 600 14px/1.3 'Inter', -apple-system, sans-serif;
  color: #0f1724;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}

.role-picker-category:hover {
  background: rgba(15, 23, 36, 0.04);
}

.role-picker-category.is-expanded {
  background: rgba(15, 23, 36, 0.05);
}

.role-picker-category.is-expanded > .role-picker-chevron {
  transform: rotate(180deg);
}

.role-picker-roles {
  padding: 2px 0 6px;
}

.role-picker-role {
  display: block;
  width: 100%;
  padding: 8px 14px 8px 28px;
  border: none;
  background: transparent;
  font: 400 13px/1.35 'Inter', -apple-system, sans-serif;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.role-picker-role:hover {
  background: rgba(214, 253, 97, 0.25);
  color: #0f1724;
}

.role-picker-role.is-selected {
  background: rgba(214, 253, 97, 0.4);
  color: #0f1724;
  font-weight: 500;
}

.role-picker-role.is-selected::before {
  content: '✓ ';
  font-size: 12px;
}

/* Profile page: match slightly larger select sizing */
.dashboard-profile .role-picker-trigger,
main .role-picker-trigger {
  padding: 12px 16px;
  border-radius: 8px;
  border-color: #e5e7eb;
  font-size: 14px;
}

.dashboard-profile .role-picker-trigger:focus,
main .role-picker-trigger:focus {
  border-color: #9ca3af;
  box-shadow: none;
}
