/* Product Filters Styling */
.card > .card-header + .collapse #filterSection .card-body,
#filterSection .card-body {
    background-color: #f8f9fa;
}

/* Filter card styling */
.card:has(#filterSection) {
    border-top: 3px solid #0d6efd;
}

/* Filter input styling */
#searchFilter,
#categoryFilter,
#stockFilter,
#entriesPerPage {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

#searchFilter:focus,
#categoryFilter:focus,
#stockFilter:focus,
#entriesPerPage:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Active filter tags */
#activeFilters {
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

#activeFilterTags .badge {
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#activeFilterTags .badge i.fa-times {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#activeFilterTags .badge i.fa-times:hover {
    opacity: 1;
}

/* Stat cards active state */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.clickable-card.active {
    border: 2px solid #0d6efd;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
    transform: translateY(-3px);
}

.clickable-card.active .card-body {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0.1) 100%);
}

/* Filter collapse button */
.card-header .btn-link {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-header .btn-link:hover {
    color: #0d6efd !important;
}

.card-header .btn-link i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.card-header .btn-link[aria-expanded="false"] i.fa-chevron-down {
    transform: rotate(-90deg);
}

/* Clear filters button */
#clearFilters {
    transition: all 0.3s ease;
}

#clearFilters:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Filter labels */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #activeFilterTags {
        display: flex !important;
        flex-direction: column;
    }
    
    #activeFilterTags .badge {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }
}

/* Filter section animation */
#filterSection.collapsing,
#filterSection.collapse.show {
    transition: all 0.3s ease-in-out;
}

/* Badge colors for different filter types */
#activeFilterTags .badge.bg-primary {
    background-color: #0d6efd !important;
}

#activeFilterTags .badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

#activeFilterTags .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Loading state for filters */
.filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state messages */
#noProductsMessage,
#noResultsMessage {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 3rem 2rem;
    margin: 1rem 0;
}

#noProductsMessage i,
#noResultsMessage i {
    opacity: 0.3;
}

#noProductsMessage h5,
#noResultsMessage h5 {
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#noProductsMessage p,
#noResultsMessage p {
    color: #6c757d;
}

/* Fade in animation for empty states */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#noProductsMessage,
#noResultsMessage {
    animation: fadeIn 0.3s ease-in-out;
}
