/*
 * =================================================================
 * Styles for "Filter Everything" Dropdown
 * =================================================================
 */

.qamar-filters-dropdown-container {
    position: relative;
    display: inline-block;
    float: left; /* Aligns it to the left of the sorting dropdown */
    margin-right: 20px;
    z-index: 100; /* Ensures dropdown appears over other content */
}

/* Style for the main filter button */
.filters-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.filters-dropdown-toggle:hover,
.filters-dropdown-toggle[aria-expanded="true"] {
    background-color: #fff;
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filters-dropdown-toggle svg {
    margin-top: -1px;
}

/* The dropdown panel - hidden by default */
.filters-dropdown-content {
    display: none; /* Initially hidden */
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background-color: #ffffff;
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

/* Show the dropdown panel when the container has the 'open' class */
.qamar-filters-dropdown-container.open .filters-dropdown-content {
    display: block;
}

/* Styling for the Filter Everything widget inside the dropdown */
.filters-dropdown-content .wpc-filter-title {
    display: none; /* We don't need the main widget title */
}

.filters-dropdown-content .wpc-filter-term-item label {
    font-size: 14px;
}

.filters-dropdown-content .wpc-filter-header {
    margin-top: 0;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}


/* DELETE THIS ENTIRE BLOCK */
@media (max-width: 768px) {
    .woocommerce .woocommerce-ordering,
    .qamar-filters-dropdown-container {
        float: none;
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
    }

    .filters-dropdown-content {
        width: 100%;
        min-width: unset;
    }
}

/*
 * =================================================================
 * Final Polish v3 (ID-based): Force button text to be visible
 * =================================================================
 */

/* Use the button's unique ID for maximum specificity */
body.wpc-busy #qamar-filters-toggle-btn span {
    visibility: visible !important;
}

/* Hide the spinner using the ID as well */
#qamar-filters-toggle-btn .wpc-spinner {
    display: none !important;
}

