/* Table Column Manager Styles */
.table-column-controls {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.table-column-controls .btn-group {
    gap: 0.25rem;
}

.table-column-controls .btn-check:checked + .btn-outline-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.table-column-controls .btn-outline-primary {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
}

/* Drag and Drop Styles */
thead th[draggable="true"] {
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

thead th[draggable="true"]::before {
    content: "⋮⋮";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
    opacity: 0.5;
    font-weight: bold;
}

thead th[draggable="true"]:hover {
    background-color: #f8f9fa;
    cursor: move;
}

thead th.dragging {
    opacity: 0.4;
    background-color: #e9ecef;
    border: 2px dashed #0d6efd;
}

thead th.drag-over {
    border-left: 3px solid #0d6efd;
    background-color: #e7f1ff;
}

/* RTL Support */
[dir="rtl"] thead th[draggable="true"]::before {
    left: auto;
    right: 5px;
}

[dir="rtl"] thead th.drag-over {
    border-left: none;
    border-right: 3px solid #0d6efd;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .table-column-controls {
        padding: 0.75rem;
    }
    
    .table-column-controls .btn-outline-primary {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .table-column-controls .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .table-column-controls .btn-group {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    thead th[draggable="true"]::before {
        font-size: 0.7rem;
        left: 2px;
    }
}

/* Animation */
@keyframes columnHighlight {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: transparent;
    }
}

.column-highlight {
    animation: columnHighlight 0.5s ease;
}
