/*
 * Enhanced Product Form - Search Filters Styles
 * Delivery method filters for shop/search pages
 */

/* Main Filter Container */
.epf-delivery-filters-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.epf-delivery-filters h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epf-delivery-filters h4::before {
    content: "🚚";
    font-size: 20px;
}

/* Filter Options */
.epf-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.epf-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.epf-filter-option:hover {
    border-color: #0073aa;
    background: #f0f8ff;
    color: #0073aa;
    text-decoration: none;
}

.epf-filter-option.active {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

.epf-filter-option.active:hover {
    background: #005a87;
    border-color: #005a87;
    color: #fff;
}

.epf-filter-icon {
    font-size: 16px;
    line-height: 1;
}

.epf-filter-label {
    font-size: 14px;
    white-space: nowrap;
}

/* Results Count */
.epf-filter-results-count {
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Product Delivery Info Badge */
.epf-product-delivery-info {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.epf-delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.epf-delivery-badge.postage {
    background: linear-gradient(135deg, #007cba, #0073aa);
}

.epf-delivery-badge.collection {
    background: linear-gradient(135deg, #46b450, #00a32a);
}

.epf-delivery-badge.both {
    background: linear-gradient(135deg, #f56500, #e65100);
}

.epf-delivery-badge i {
    font-size: 10px;
}

/* No Products Found */
.epf-no-products-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.epf-no-products-found::before {
    content: "😞";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

/* Loading State */
.epf-delivery-filters-container.loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Remove the overlay that causes blur */
.epf-delivery-filters-container.loading::after {
    display: none;
}

/* Integration with WooCommerce */
.woocommerce ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .epf-product-delivery-info {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .epf-delivery-filters-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .epf-filter-options {
        gap: 8px;
        justify-content: center;
    }
    
    .epf-filter-option {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    .epf-delivery-filters h4 {
        font-size: 16px;
        text-align: center;
        justify-content: center;
    }
    
    .epf-delivery-badge {
        padding: 3px 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .epf-filter-options {
        flex-direction: column;
    }
    
    .epf-filter-option {
        justify-content: center;
        text-align: center;
    }
    
    .epf-product-delivery-info {
        top: 5px;
        right: 5px;
    }
    
    .epf-delivery-badge {
        padding: 2px 4px;
        font-size: 9px;
    }
}

/* Animation for filter changes */
.epf-filter-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.epf-filter-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.epf-filter-option.active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* Integration with existing shop styles */
.woocommerce .epf-delivery-filters-container {
    margin-bottom: 30px;
}

.woocommerce-ordering + .epf-delivery-filters-container {
    margin-top: 20px;
}

/* Clear floats and ensure proper spacing */
.epf-delivery-filters-container::after {
    content: "";
    display: table;
    clear: both;
}
