/**
 * WooCommerce Filter Hub Styles
 * Version: 1.0.0
 */

.wfh-filter-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

.wfh-filter-group h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}



.wfh-filter-option {
    display: block;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    user-select: none;
}

.wfh-filter-option:hover {
    background-color: #f0f0f1;
}

.wfh-filter-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.wfh-filter-option span {
    font-size: 14px;
    color: #555;
    vertical-align: middle;
}

.wfh-filter-option input[type="checkbox"]:checked + span {
    color: #007cba;
    font-weight: 500;
}

/* Loading state */
.wfh-filter-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wfh-filter-form.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .wfh-filter-form {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .wfh-filter-group h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .wfh-filter-option {
        padding: 0px 6px;
        margin-bottom: 0px;
    }
    
    .wfh-filter-option span {
        font-size: 13px;
    }
}

/* Custom checkbox styling */
.wfh-filter-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: white;
    position: relative;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.wfh-filter-option input[type="checkbox"]:checked {
    background: #007cba;
    border-color: #007cba;
}

.wfh-filter-option input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.wfh-filter-option input[type="checkbox"]:focus {
    outline: 2px solid #007cba40;
    outline-offset: 2px;
}

/* Animation for form submission */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

.wfh-filter-form.submitting {
    animation: fadeOut 0.3s ease-in-out;
}

/* Category hierarchy styling */
.wfh-category-link {
    margin-bottom: 0;
}

.wfh-category-item {
    display: block;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.wfh-category-item:hover {
    background-color: #f0f0f1;
    color: #007cba;
    text-decoration: none;
}

.wfh-category-item:focus {
    outline: 2px solid #007cba40;
    outline-offset: 2px;
}

/* Indented categories styling */

.wfh-category-link[style*="margin-left"] .wfh-category-item {
    color: #777;
    font-size: 13px;
    padding: 2px 5px;
    margin-left: -10px;
}

.wfh-category-link[style*="margin-left"] .wfh-category-item:hover {
    color: #005a87;
} 