#plugin-presence {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-left: .75rem;
    vertical-align: middle;
}

.plugin-presence-avatar {
    width: 26px;
    height: 26px;
    border: 2px solid var(--tblr-body-bg, #fff);
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.plugin-presence-avatar:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.plugin-presence-more {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--tblr-body-bg, #fff);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    user-select: none;
    transition: transform 0.15s ease;
}

.plugin-presence-more:hover {
    transform: scale(1.15);
    z-index: 10;
}

@keyframes presencePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(32, 107, 196, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(32, 107, 196, 0.25);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(32, 107, 196, 0);
    }
}

.plugin-presence-changed {
    border-color: var(--main-primary-color, #206bc4) !important;
    outline: 2px solid var(--main-primary-color, #206bc4) !important;
    outline-offset: 2px !important;
    animation: presencePulse 1.5s ease 3 !important;
    background-color: rgba(32, 107, 196, 0.12) !important;
}

.plugin-presence-conflict {
    border-color: var(--tblr-warning, #f59f00) !important;
    outline: 2px solid var(--tblr-warning, #f59f00) !important;
    outline-offset: 2px !important;
    background-color: rgba(245, 159, 0, 0.12) !important;
}

.plugin-presence-tooltip-inner {
    font-size: 0.8125rem;
    line-height: 1.35;
    padding: 2px 4px;
}

.plugin-presence-field-container,
.select2-selection.plugin-presence-field-container {
    position: relative !important;
}

.plugin-presence-field-badge {
    position: absolute;
    bottom: -15px;
    right: -10px;
    width: 20px;
    height: 20px;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--tblr-body-bg, #1a2234);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    user-select: none;
    animation: presenceBadgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: transform 0.15s ease;
}

.plugin-presence-field-badge:hover {
    transform: scale(1.25);
    z-index: 2;
}

.plugin-presence-conflict-badge {
    border-color: var(--tblr-warning, #f59f00) !important;
    box-shadow: 0 0 0 2px var(--tblr-warning, #f59f00), 0 2px 5px rgba(0, 0, 0, 0.4) !important;
}

@keyframes presenceBadgePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
