/* Scoping for MA Filters */
.ma-filter {
    background-color: #fff;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
    font-family: Arial, sans-serif; /* Adjust to your theme's font */
}

.ma-filter h3 {
    font-size: 1.1em;
    font-weight: bold;
    color: #333; /* Dark text for headings */
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    text-transform: uppercase;
}

.ma-filter ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ma-filter li {
    margin-bottom: 8px;
    font-size: 0.95em;
    color: #555;
}

.ma-filter li:last-child {
    margin-bottom: 0;
}

.ma-filter input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.ma-filter label {
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

/* Apply/Clear Buttons */
.ma-filter-buttons {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    text-align: center;
}

.ma-filter-buttons button {
    background-color: #000; /* Black button */
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.ma-filter-buttons button:hover {
    background-color: #333; /* Darker black on hover */
}

.ma-filter-buttons button.ma-filter-clear {
    background-color: #dc3232; /* Red for clear button */
    margin-left: 10px;
}

.ma-filter-buttons button.ma-filter-clear:hover {
    background-color: #c02b2b; /* Darker red on hover */
}

/* Loading Overlay for AJAX */
.ma-filter-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    display: none; /* Hidden by default */
}

.ma-filter-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc3232; /* Red spinner */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsiveness (Optional: Collapsible Accordions) */
@media (max-width: 768px) {
    .ma-filter-section-title {
        cursor: pointer;
        padding: 10px;
        background-color: #f5f5f5;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ma-filter-section-title::after {
        content: '\002B'; /* Plus sign */
        font-size: 1.2em;
        font-weight: bold;
        transition: transform 0.3s ease;
    }

    .ma-filter-section-title.active::after {
        content: '\2212'; /* Minus sign */
        transform: rotate(0deg); /* No rotation for minus */
    }

    .ma-filter-section-content {
        display: none; /* Hidden by default on mobile */
        padding-top: 10px;
    }

    .ma-filter-section-content.open {
        display: block;
    }
}