/* Thread Action Buttons */
.chat-item-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 64px;
}

.chat-item-wrapper:hover .chat-actions {
    opacity: 1;
    pointer-events: all;
}

.chat-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* When sidebar is collapsed (icon rail), hide actions to prevent UI clutter/tooltip artifacts */
#sidebar.collapsed .chat-item-wrapper {
    padding-right: 0;
}

#sidebar.collapsed .chat-actions {
    display: none;
}

.chat-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.chat-action-btn[data-action="delete"]:hover {
    background: rgba(239, 68, 68, 0.3);
}