.overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
}

.menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  min-width: 260px;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  padding: 4px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.menuItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.menuItem:hover {
  background: var(--hover-bg);
}

.menuItem:disabled {
  opacity: 0.4;
  cursor: default;
}

.menuIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.divider {
  height: 1px;
  background: var(--divider);
  margin: 4px 0;
}

/* -- Server rows with toggle switches -- */

.serverRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 7px;
  transition: background var(--transition-fast);
}

.serverRow:hover {
  background: var(--hover-bg);
}

.serverInfo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  cursor: default;
  color: inherit;
  font: inherit;
}

button.serverInfo {
  cursor: pointer;
}

button.serverInfo:hover .serverName {
  text-decoration: underline;
}

.serverDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.serverName {
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serverNameDisabled {
  color: var(--text-dim);
}

.reconnectHint {
  font-size: 10px;
  color: var(--status-stopped);
  padding-left: 4px;
  cursor: pointer;
}

/* -- iOS-style toggle switch -- */

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--text-faint);
  transition: background 0.2s ease;
}

.toggleOn {
  background: var(--accent-primary);
}

.toggleKnob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
}

.toggleOn .toggleKnob {
  transform: translateX(16px);
}

/* -- Manage connectors link -- */

.manageItem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.manageItem:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
