/* Role-assignment dropdown component (paired with /static/js/role-dropdown.js).
   Loaded globally in the admin base layout so every page that uses the component
   (access matrix, user/admin invite modals) gets it. role-dropdown.js computes the
   left/top/width inline at open time; the visual styling lives here (no utility soup
   in the templates). */

/* Trigger that opens an invite-form role dropdown — matches the admin .form-input field
   so it sits flush with the email input above it. */
.role-dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  line-height: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.role-dd-trigger:hover { border-color: rgba(34, 197, 94, 0.4); }
.role-dd-trigger .role-dd-placeholder { color: #6b7280; }

/* Compact trigger for in-table per-row role selectors. */
.role-dd-trigger--compact {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.25rem 0.625rem;
  color: #e5e7eb;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.role-dd-trigger--compact:hover { border-color: rgba(34, 197, 94, 0.4); }
.role-dd-trigger--compact > span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating menu — position/width set inline by role-dropdown.js; visuals here. */
.role-dd-menu {
  position: fixed;
  z-index: 90;
  min-width: 10rem;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  padding: 0.25rem;
  overflow: hidden;
}
.role-dd-menu--wide { min-width: 12rem; }

/* Menu rows — full-width block rows (never inline), themed to the admin palette. */
.role-dd-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #e5e7eb;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.role-dd-item:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
