/**
 * Custom Filter Widget Styles - Optimized
 */

/* Common filter widget styles */
.wn-price-filter-widget,
.wn-brand-filter-widget {
  margin-top: 15px;
}

.wn-price-filter-item,
.wn-brand-filter-item {
  margin-bottom: 8px;
}

.wn-price-filter-item label,
.wn-brand-filter-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #323640;
}

.wn-price-filter-checkbox,
.wn-brand-filter-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  margin-bottom: 5px;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  accent-color: var(--primary-color);
}

.wn-filter-count {
  margin-left: auto;
  color: #666;
  font-size: 13px;
}

/* Loading overlay styles */
.wn-filter-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.wn-filter-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: wnFilterSpin 1s linear infinite;
}

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

/* Make containers relative positioned for overlay */
#main .products,
.woocommerce-loop-container,
ul.products,
.products {
  position: relative;
}

/* WooCommerce Price Filter Widget Styles */
.widget_price_filter {
  background: #fff;
  border: 1px solid #d7d7d7;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
}

.widget_price_filter .widget-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d7d7d7;
}

.widget_price_filter .price_slider_wrapper {
  padding: 10px 0;
}

.widget_price_filter .price_slider_amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  gap: 10px;
}

.widget_price_filter .price_label {
  font-size: 14px;
  font-weight: 500;
}

.widget_price_filter .button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.widget_price_filter .button:hover {
  background-color: #0056b3;
}

.widget_price_filter .ui-slider {
  position: relative;
  height: 6px;
  background: #e1e1e1;
  border-radius: 3px;
  margin: 10px 0;
}

.widget_price_filter .ui-slider-handle {
  position: absolute;
  top: -6px;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.widget_price_filter .ui-slider-range {
  position: absolute;
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
}

/* Shop Sidebar Styles */
#shop-sidebar {
  padding-top: 55px;
}

/* Mobile Responsive Styles */
@media only screen and (max-width: 48em) {
  .widget_price_filter {
    padding: 15px;
  }

  .widget_price_filter .price_slider_amount {
    flex-direction: column;
    gap: 10px;
  }

  .widget_price_filter .button {
    width: 100%;
  }
}
