.collaboration-cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.collaboration-cursor {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 45ms linear;
  will-change: transform;
}

.collaboration-cursor-pointer {
  width: 0;
  height: 0;
  border-top: 16px solid var(--cursor-color, #0066cc);
  border-right: 11px solid transparent;
  transform: rotate(-12deg);
}

.collaboration-cursor-label {
  position: absolute;
  top: 14px;
  left: 10px;
  max-width: 130px;
  padding: 3px 7px;
  border-radius: 6px;
  background-color: var(--cursor-color, #0066cc);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-users-bar {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 120px;
  overflow: visible;
}

.active-users-bar.has-users {
  display: flex;
}

.active-avatar-stack {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 2px 6px;
  outline: none;
}

.active-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background-color: var(--user-color, var(--primary-color));
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.active-avatar:first-child {
  margin-left: 0;
}

.active-avatar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background-color: #17c964;
}

.active-avatar-extra {
  background-color: #edf2f7;
  color: #64748b;
}

.active-avatar-extra::after {
  display: none;
}

.active-users-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 1200;
}

.active-avatar-stack:hover .active-users-popover,
.active-avatar-stack:focus-within .active-users-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.active-user-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px 4px;
}

.active-user-status-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 999px;
  background-color: #17c964;
}

.active-user-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.active-user-name {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-user-state {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
}
