/* General widget container - Modern Design */
.woo-dynamic-filter-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.woo-dynamic-filter-widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 16px 16px 0 0;
}

/* Widget title - Enhanced */
.woo-dynamic-filter-widget .filter-title {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    cursor: default;
    color: #1e293b;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.woo-dynamic-filter-widget .filter-title .filter-icon {
    margin-right: 12px;
    font-size: 24px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Filter sections - Modern Cards */
.woo-dynamic-filter-widget .filter-section {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.woo-dynamic-filter-widget .filter-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.woo-dynamic-filter-widget .filter-toggle {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
    transition: all 0.3s ease;
    position: relative;
}

.woo-dynamic-filter-widget .filter-toggle:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #1e293b;
}

.woo-dynamic-filter-widget .filter-toggle .toggle-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.woo-dynamic-filter-widget .filter-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid #f1f5f9;
}

/* Filter options - Enhanced Checkboxes */
.woo-dynamic-filter-widget .filter-option {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.woo-dynamic-filter-widget .filter-option:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

.woo-dynamic-filter-widget .filter-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    appearance: none;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.woo-dynamic-filter-widget .filter-option input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #3b82f6;
}

.woo-dynamic-filter-widget
    .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;
}

.woo-dynamic-filter-widget .filter-option input[type="checkbox"]:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.woo-dynamic-filter-widget .filter-option .option-label {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s ease;
}

.woo-dynamic-filter-widget .filter-option:hover .option-label {
    color: #1e293b;
}

/* Color circle - Enhanced */
.woo-dynamic-filter-widget .color-option .color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.woo-dynamic-filter-widget .color-option .color-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Price section - Enhanced UI */
.woo-dynamic-filter-widget .price-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.woo-dynamic-filter-widget .price-section .price-slider {
    margin: 20px 10px;
    height: 6px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 3px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ensure jQuery UI slider works properly */
.woo-dynamic-filter-widget .ui-slider {
    position: relative !important;
    background: transparent !important;
    border: none !important;
}

.woo-dynamic-filter-widget .ui-slider-horizontal {
    height: 6px !important;
}

/* jQuery UI Slider customization */
.woo-dynamic-filter-widget .ui-slider-handle {
    width: 20px !important;
    height: 20px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    top: -7px !important;
    transition: box-shadow 0.2s ease !important;
    position: absolute !important;
    z-index: 2 !important;
    margin-left: -10px !important;
}

.woo-dynamic-filter-widget .ui-slider-handle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

.woo-dynamic-filter-widget .ui-slider-handle:active {
    transform: scale(0.95) !important;
}

.woo-dynamic-filter-widget .ui-slider-range {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}

/* Price values display */
.woo-dynamic-filter-widget .price-section .price-values {
    display: flex;
    justify-content: space-between;
    margin: 15px 0 20px 0;
    font-weight: 600;
    font-size: 16px;
}

.woo-dynamic-filter-widget .price-section .price-values span {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.woo-dynamic-filter-widget .price-section .price-values span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.woo-dynamic-filter-widget .price-section .price-values span.price-updated {
    animation: pricePulse 0.3s ease-in-out;
}

@keyframes pricePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced price inputs */
.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.price-inputs label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-inputs input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-inputs input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.price-inputs input[type="number"]:hover {
    border-color: #9ca3af;
}

/* Price range indicator */
.price-range-indicator {
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Apply button - Enhanced */
.woo-dynamic-filter-widget .apply-wrap {
    text-align: center;
    margin-top: 20px;
}

.woo-dynamic-filter-widget .apply-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 14px 32px;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    min-width: 180px;
}

.woo-dynamic-filter-widget .apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.woo-dynamic-filter-widget .apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Empty state - Enhanced */
.woo-dynamic-filter-widget .filter-empty {
    font-size: 14px;
    color: #6b7280;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    border: 2px dashed #d1d5db;
    font-style: italic;
    margin: 10px 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .woo-dynamic-filter-widget {
        padding: 16px;
        border-radius: 12px;
    }

    .woo-dynamic-filter-widget .filter-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .woo-dynamic-filter-widget .filter-section {
        margin-bottom: 16px;
    }

    .woo-dynamic-filter-widget .filter-toggle {
        padding: 14px 16px;
        font-size: 15px;
    }

    .woo-dynamic-filter-widget .filter-content {
        padding: 16px;
    }

    .woo-dynamic-filter-widget .price-section {
        padding: 16px;
        margin: 10px 0;
    }

    .price-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .woo-dynamic-filter-widget .price-section .price-values {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .woo-dynamic-filter-widget .apply-btn {
        width: 100%;
        padding: 16px;
        font-size: 15px;
    }

    .woo-dynamic-filter-widget .filter-option {
        padding: 6px 10px;
        margin-bottom: 10px;
    }
}
