/**
 * Collaboration Styles - Presence & Ghost Cursors
 * Extracted from cloud.css for maintainability
 */

/* ============================================================================
   PRESENCE BAR (Collaborator avatars)
   ============================================================================ */

.presence-bar {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.presence-bar .presence-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--header-bg);
    background: var(--accent-color);
    margin-left: -8px;
    /* Overlap */
    cursor: pointer;
    transition: transform 0.2s, z-index 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--on-accent-color);
}

.presence-bar .presence-avatar:first-child {
    margin-left: 0;
}

.presence-bar .presence-avatar:hover {
    transform: scale(1.15);
    z-index: 10;
}

.presence-bar .presence-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.presence-bar .presence-avatar .presence-tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--header-bg);
    border: 1px solid var(--grid-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: var(--shadow-sm);
}

.presence-bar .presence-avatar:hover .presence-tooltip {
    opacity: 1;
}

.presence-bar .presence-more {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grid-color);
    border: 2px solid var(--header-bg);
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ============================================================================
   GHOST CURSORS (Collaborator cursors on canvas)
   ============================================================================ */

.ghost-cursors-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: visible;
}

.ghost-cursor {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
}

.ghost-cursor svg {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}

.ghost-cursor-name {
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    margin-top: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

/* ============================================================================
   COLLABORATION LOCK INDICATORS
   ============================================================================ */

.note.collab-locked,
.drawn-line.collab-locked {
    outline: 2px dashed var(--warning-color, #f5a623) !important;
    outline-offset: 2px;
    pointer-events: none;
    opacity: 0.8;
}

.note.collab-locked::after {
    content: attr(data-locked-by);
    position: absolute;
    top: -22px;
    left: 0;
    background: var(--warning-color, #f5a623);
    color: #000;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10000;
}