/**
 * Attribute Filters Styles
 */

.mm-attribute-filters-section {
    margin-bottom: 30px;
    padding: 0px;
    border-radius: 4px;
}

.mm-attribute-filters-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.mm-attribute-filters-section h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.mm-attribute-filters-section h4 {
    margin: 10px 0;
    display: none;
    font-size: 1.1em;
}

/* Legacy active filters styles - kept for backwards compatibility */

/* Product Count Styles */
.mm-count {
    font-size: 0.85em;
    color: #777;
    margin-left: 5px;
    font-weight: normal;
}

.mm-filter-button .mm-count {
    display: inline-block;
    margin-left: 4px;
}

.mm-filter-checkbox .mm-count {
    margin-left: auto;
}

/* Available Filters */
.mm-available-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mm-filter-group {
    margin-bottom: 15px;
}

/* Active Filter Group */
.mm-filter-is-active h4 {
    color: #333;
    font-weight: bold;
}

/* Remove filter X button inside filter items */
.mm-filter-remove-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #999;
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    font-size: 14px;
    margin-left: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.05);
}

.mm-filter-remove-x:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    text-decoration: none;
}

/* Dropdown remove button */
.mm-dropdown-remove-x {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #999;
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
    font-size: 16px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.05);
}

.mm-dropdown-remove-x:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    text-decoration: none;
}

/* Position dropdown wrapper relatively for absolute positioning of X */
.mm-filter-style-dropdown {
    position: relative;
}



/* Common styles for all filter options */
.mm-filter-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mm-filter-options li {
    margin: 0;
}

/* Style 1: Buttons Style */
.mm-filter-options-buttons {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 10px;
    scroll-behavior: smooth;
    padding: 11px 0;
}

/* Hide scrollbar */
.mm-filter-options-buttons::-webkit-scrollbar {
    display: none;
}

/* Slider arrows for buttons style */
.mm-filter-style-buttons {
    position: relative;
    padding-right: 30px;
}

.mm-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mm-slider-arrow.prev {
    left: 0;
}

.mm-slider-arrow.next {
    right: 0;
}

.mm-slider-arrow.prev:after {
    content: "‹";
    font-size: 20px;
    font-weight: bold;
}

.mm-slider-arrow.next:after {
    content: "›";
    font-size: 20px;
    font-weight: bold;
}

.mm-filter-option.mm-filter-button {
    white-space: nowrap;
    padding: 10px 20px;
    background-color: #f9f9f9;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    flex: 0 0 auto;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.mm-filter-option.mm-filter-button:hover {
    background-color: #e9ecef;
    border-color: #e9ecef;
    text-decoration: none;
}

/* Active button style */
.mm-filter-option.mm-filter-button.mm-filter-active {
    background-color: #f8f9fa;
    border-color: #1B1AFF;
    color: #333;
    font-weight: 500;
}

/* Style 2: Checkbox List Style */
.mm-filter-options-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mm-filter-options-list li {
    margin-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
    padding: 5px 0;
}

.mm-filter-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    color: #333;
    width: 100%;
    justify-content: space-between;
}

.mm-filter-checkbox:hover {
    color: #1B1AFF;
}

.mm-filter-checkbox input[type="checkbox"] {
    margin-right: 6px;
}

/* Active checkbox style */
.mm-filter-checkbox.mm-filter-active {
    font-weight: 500;
    color: #1B1AFF;
}

/* Style 3: Dropdown Menu Style */
.mm-filter-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px!important;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
    width: 100%;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.mm-filter-dropdown:after {
    content: "";
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.mm-filter-dropdown:focus {
    outline: none;
    border-color: #aaa;
}

.mm-filter-dropdown:hover {
    border-color: #aaa;
}

/* Highlight active dropdown */
.mm-filter-is-active .mm-filter-dropdown {
    border-color: #1B1AFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Additional styling for filter group containers based on style */
.mm-filter-style-list {
    margin-bottom: 20px;
}

.mm-filter-style-buttons {
    margin-bottom: 15px;
}

.mm-filter-style-dropdown {
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mm-filter-list {
        gap: 8px;
    }
    
    .mm-filter-list li {
        padding: 4px 10px;
        font-size: 0.9em;
    }
    
    .mm-filter-options-buttons {
        gap: 6px;
    }
    
    .mm-filter-option.mm-filter-button {
        padding: 12px 20px;
        font-size: 0.85em;
    }
    
    .mm-filter-dropdown {
        padding: 0 10px;
        height: 40px;
        min-width: 40%;
        font-size: 0.85em;
    }
    
    .mm-slider-arrow {
        width: 25px;
        height: 25px;
    }
    
    .mm-slider-arrow.prev:after,
    .mm-slider-arrow.next:after {
        font-size: 16px;
    }
    
    .mm-count {
        font-size: 0.8em;
    }
}

/* Dropdown wrappers - specifically for grouped dropdowns */
.mm-dropdowns-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.mm-dropdowns-wrapper .mm-filter-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.mm-dropdowns-wrapper .mm-filter-dropdown {
    width: 100%;
}

/* Media query adjustments for dropdowns wrapper */
@media (max-width: 768px) {
    .mm-dropdowns-wrapper {
        flex-direction: row!important;
        gap: 10px;
    }
    
    .mm-dropdowns-wrapper .mm-filter-group {
        max-width: auto;
    }

        .mm-available-filters {
            gap: 0px;
        }
}

/* Toggle Filters */
.mm-toggle-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: 20px;
}

.mm-toggle-filter {
    position: relative;
}

.mm-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.mm-toggle-checkbox {
    display: none;
}

.mm-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mm-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mm-toggle-checkbox:checked + .mm-toggle-slider {
    background-color: #3b82f6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mm-toggle-checkbox:checked + .mm-toggle-slider::before {
    transform: translateX(20px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mm-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: color 0.2s ease;
}

.mm-toggle-label.active .mm-toggle-text {
    color: #1f2937;
    font-weight: 600;
}

.mm-toggle-label:hover .mm-toggle-text {
    color: #1f2937;
}

/* Hover effects */
.mm-toggle-label:hover .mm-toggle-slider {
    background-color: #d1d5db;
}

.mm-toggle-label:hover .mm-toggle-checkbox:checked + .mm-toggle-slider {
    background-color: #2563eb;
}

/* Focus styles for accessibility */
.mm-toggle-label:focus-within .mm-toggle-slider {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .mm-toggle-filters {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        margin-left: 0;
    }
    
    .mm-toggle-text {
        font-size: 13px;
    }
    
    .mm-toggle-slider {
        width: 40px;
        height: 22px;
    }
    
    .mm-toggle-slider::before {
        width: 18px;
        height: 18px;
    }
    
    .mm-toggle-checkbox:checked + .mm-toggle-slider::before {
        transform: translateX(18px);
    }
}

/* Disabled Filter Options */
.mm-filter-disabled {
    opacity: 0.3;
    cursor: not-allowed !important;
    pointer-events: none;
}

.mm-filter-option.mm-filter-disabled {
    opacity: 0.3;
    cursor: not-allowed !important;
    pointer-events: none;
}

.mm-filter-option.mm-filter-disabled:hover {
    background-color: inherit;
    border-color: inherit;
    color: inherit;
}

/* Button style filters - completely hidden when disabled */
.mm-filter-button.mm-filter-disabled,
.mm-filter-options-buttons li.mm-filter-disabled {
    display: none !important;
}

/* Checkbox style filters - keep opacity behavior */
.mm-filter-checkbox.mm-filter-disabled {
    opacity: 0.3;
    cursor: not-allowed !important;
    pointer-events: none;
}

.mm-filter-checkbox.mm-filter-disabled:hover {
    background-color: transparent;
    color: inherit;
}

/* Disabled dropdown options */
.mm-filter-dropdown option.mm-option-disabled {
    color: #999;
    background-color: #f5f5f5;
}

.mm-filter-dropdown option:disabled {
    color: #999;
    background-color: #f5f5f5;
}

/* Product count styling */
.mm-filter-count {
    font-size: 0.85em;
    color: #777;
    margin-left: 5px;
    font-weight: normal;
}

.mm-filter-disabled .mm-filter-count {
    color: #999;
}

/* Disabled toggle filters */
.mm-toggle-disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed !important;
}

.mm-toggle-disabled .mm-toggle-label {
    cursor: not-allowed !important;
}

.mm-toggle-disabled .mm-toggle-checkbox {
    cursor: not-allowed !important;
}

.mm-toggle-disabled .mm-toggle-slider {
    cursor: not-allowed !important;
}

/* Client-side filtering animations */
.mm-product-card-wrapper {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mm-product-card-wrapper.mm-filtered-hidden {
    opacity: 0;
    transform: scale(0.95);
} 