/* ============================================
   ORG SWITCHER — Sidebar workspace selector
   ============================================ */

.org-switcher-container {
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  position: relative;
}

/* Main button */
.org-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-main);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--color-text-primary);
  transition: background 0.15s;
}

.org-switcher-btn:hover {
  background: var(--color-bg-hover);
}

.org-switcher-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.org-switcher-chevron {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.org-switcher-avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1;
}

/* Dropdown */
.org-switcher-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0.75rem;
  right: 0.75rem;
  background: var(--color-bg-main);
  border: 1px solid var(--color-border-main);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 0.25rem;
  max-height: 240px;
  overflow-y: auto;
}

.org-switcher-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--color-text-primary);
  transition: background 0.1s;
}

.org-switcher-option:hover {
  background: var(--color-bg-hover);
}

.org-switcher-option.active {
  background: var(--color-bg-selected);
  font-weight: 500;
}

.org-switcher-role {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

/* Collapsed sidebar: hide label, show only avatar */
.chat-sidebar.collapsed .org-switcher-label,
.chat-sidebar.collapsed .org-switcher-chevron,
.chat-sidebar.collapsed .org-switcher-role {
  display: none;
}

.chat-sidebar.collapsed .org-switcher-btn {
  justify-content: center;
  padding: 0.5rem;
}

.chat-sidebar.collapsed .org-switcher-dropdown {
  left: 0;
  right: auto;
  width: 200px;
}
