/* CodePen-inspired client actions bar (scoped override) */

#posts-table .client-actions-group,
.client-card .client-actions-group,
.clients-card .client-actions-group {
    --tp-pointer-x: 8px;
    --tp-pointer-w: 42px;
    --tp-pointer-h: 52px;
    --tp-pointer-y: 5px;

    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: min(100%, 1000px);
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

#posts-table .client-actions-group::-webkit-scrollbar,
.client-card .client-actions-group::-webkit-scrollbar,
.clients-card .client-actions-group::-webkit-scrollbar {
    height: 6px;
}

#posts-table .client-actions-group::-webkit-scrollbar-thumb,
.client-card .client-actions-group::-webkit-scrollbar-thumb,
.clients-card .client-actions-group::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

#posts-table .client-actions-group::before,
.client-card .client-actions-group::before,
.clients-card .client-actions-group::before {
    content: '';
    position: absolute;
    top: var(--tp-pointer-y);
    left: var(--tp-pointer-x);
    width: var(--tp-pointer-w);
    height: var(--tp-pointer-h);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: radial-gradient(70% 60% at 50% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.8) 55%, rgba(241, 245, 249, 0.64) 100%);
    box-shadow: 0 8px 16px rgba(100, 116, 139, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1), width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

#posts-table .client-actions-group.has-pointer::before,
.client-card .client-actions-group.has-pointer::before,
.clients-card .client-actions-group.has-pointer::before {
    opacity: 1;
}

#posts-table .client-actions-group .action-btn,
.client-card .client-actions-group .action-btn,
.clients-card .client-actions-group .action-btn {
    position: relative;
    z-index: 1;
    width: 42px;
    min-width: 42px;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 6px 4px;
    box-shadow: none;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

#posts-table .client-actions-group .action-btn::before,
.client-card .client-actions-group .action-btn::before,
.clients-card .client-actions-group .action-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
}

#posts-table .client-actions-group .action-btn i,
.client-card .client-actions-group .action-btn i,
.clients-card .client-actions-group .action-btn i {
    font-size: 15px;
    line-height: 1;
    color: #64748b;
    transition: color 0.18s ease, transform 0.18s ease;
    text-shadow: none;
}

#posts-table .client-actions-group .action-btn .action-label,
.client-card .client-actions-group .action-btn .action-label,
.clients-card .client-actions-group .action-btn .action-label {
    display: block;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

#posts-table .client-actions-group .action-btn:hover,
#posts-table .client-actions-group .action-btn:focus-visible,
.client-card .client-actions-group .action-btn:hover,
.client-card .client-actions-group .action-btn:focus-visible,
.clients-card .client-actions-group .action-btn:hover,
.clients-card .client-actions-group .action-btn:focus-visible {
    transform: translateY(-1px);
    background: transparent;
}

#posts-table .client-actions-group .action-btn:hover i,
#posts-table .client-actions-group .action-btn:focus-visible i,
#posts-table .client-actions-group .action-btn.is-selected i,
.client-card .client-actions-group .action-btn:hover i,
.client-card .client-actions-group .action-btn:focus-visible i,
.client-card .client-actions-group .action-btn.is-selected i,
.clients-card .client-actions-group .action-btn:hover i,
.clients-card .client-actions-group .action-btn:focus-visible i,
.clients-card .client-actions-group .action-btn.is-selected i {
    color: #0f172a;
    transform: scale(1.03);
}

#posts-table .client-actions-group .action-btn:hover .action-label,
#posts-table .client-actions-group .action-btn:focus-visible .action-label,
#posts-table .client-actions-group .action-btn.is-selected .action-label,
.client-card .client-actions-group .action-btn:hover .action-label,
.client-card .client-actions-group .action-btn:focus-visible .action-label,
.client-card .client-actions-group .action-btn.is-selected .action-label,
.clients-card .client-actions-group .action-btn:hover .action-label,
.clients-card .client-actions-group .action-btn:focus-visible .action-label,
.clients-card .client-actions-group .action-btn.is-selected .action-label {
    color: #0f172a;
}

#posts-table .client-actions-group .notification-badge,
.client-card .client-actions-group .notification-badge,
.clients-card .client-actions-group .notification-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28);
}

#posts-table .client-actions-group .action-btn:focus-visible,
.client-card .client-actions-group .action-btn:focus-visible,
.clients-card .client-actions-group .action-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 1px;
}

@media (max-width: 1100px) {
    #posts-table .client-actions-group,
    .client-card .client-actions-group,
    .clients-card .client-actions-group {
        padding: 5px;
        gap: 5px;
    }

    #posts-table .client-actions-group .action-btn,
    .client-card .client-actions-group .action-btn,
    .clients-card .client-actions-group .action-btn {
        width: 40px;
        min-width: 40px;
        height: 50px;
    }

    #posts-table .client-actions-group .action-btn .action-label,
    .client-card .client-actions-group .action-btn .action-label,
    .clients-card .client-actions-group .action-btn .action-label {
        font-size: 9px;
    }
}
