/* ─── Presence Bar (Top Navigation) ───────────────────────────────────────── */

.presence-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: 12px;
}

.presence-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease;
  border: 2px solid var(--bg-primary, #fff);
  margin-left: -8px;
  flex-shrink: 0;
}

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

.presence-avatar:hover {
  transform: scale(1.12);
  z-index: 10;
}

.presence-avatar-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary, #fff);
}

.presence-avatar-status.active {
  background: #22C55E;
}

.presence-avatar-status.idle {
  background: #F59E0B;
}

.presence-overflow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary, #64748B);
  background: var(--bg-secondary, #F1F5F9);
  border: 2px solid var(--bg-primary, #fff);
  margin-left: -8px;
  cursor: default;
}

/* Presence Tooltip */
.presence-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary, #1E293B);
  color: var(--text-primary, #fff);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.presence-avatar:hover .presence-tooltip {
  opacity: 1;
}

.presence-tooltip-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.presence-tooltip-status {
  opacity: 0.7;
  font-size: 0.7rem;
}

/* ─── Entity Presence (on cards/rows) ─────────────────────────────────────── */

.entity-presence {
  display: flex;
  align-items: center;
  gap: 0;
}

.entity-presence-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  margin-left: -6px;
  border: 2px solid var(--bg-primary, #fff);
  flex-shrink: 0;
}

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

/* ─── Soft-Lock Banner ────────────────────────────────────────────────────── */

.lock-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 10px;
  margin-bottom: 16px;
  animation: lockBannerSlideIn 0.3s ease;
}

[data-theme="dark"] .lock-banner {
  background: #422006;
  border-color: #92400E;
}

.lock-banner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.lock-banner-text {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: #92400E;
}

[data-theme="dark"] .lock-banner-text {
  color: #FCD34D;
}

.lock-banner-btn {
  padding: 6px 14px;
  background: #F59E0B;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.lock-banner-btn:hover {
  background: #D97706;
}

@keyframes lockBannerSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Locked fields */
.field-locked {
  opacity: 0.6;
  pointer-events: none;
}

/* ─── Live Cursor ─────────────────────────────────────────────────────────── */

.cursor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.live-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 51;
}

.live-cursor-arrow {
  width: 16px;
  height: 20px;
}

.live-cursor-label {
  position: absolute;
  top: 18px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.live-cursor.fading {
  opacity: 0;
  transition: opacity 0.5s ease;
}
