/**
 * Modern Price Range Filter with Slider
 * Uses unified filter design system - matches brand and specification filters
 */

.modern-price-filter {
  background: var(--filter-bg);
  border-radius: var(--filter-border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

/* Header - Using unified gradient and animations */
.price-filter-header {
  background: var(--gradient-price);
  padding: var(--filter-header-padding);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Wave pattern overlay */
.price-filter-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 8px,
        rgba(255, 255, 255, 0.04) 8px,
        rgba(255, 255, 255, 0.04) 16px
    );
    pointer-events: none;
}

.price-filter-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.5s ease;
  z-index: 1;
}

.price-filter-header:hover::before {
  left: 100%;
}

.price-filter-header:hover {
  filter: brightness(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Ensure content is above overlays */
.price-filter-header > * {
    position: relative;
    z-index: 2;
}

.price-filter-icon {
  font-size: 17px;
  flex-shrink: 0;
  opacity: 0.95;
}

/* Currency label - consistent with badges */
.price-filter-currency {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.3);
  padding: 3px 7px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-filter-title {
  flex: 1;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
}

.price-chevron {
  font-size: 13px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  opacity: 0.9;
}

/* Collapsible content */
.price-filter-content {
  display: none;
  padding: 20px 16px;
  background: #fafbfc;
}

.price-filter-content.expanded {
  display: block;
}

/* Price range display */
.price-range-display {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  letter-spacing: 0.3px;
}

/* Range slider container */
.price-slider-container {
  padding: 0 8px 30px 8px;
}

.price-range-slider {
  height: 6px;
}

/* noUiSlider custom styling */
.price-range-slider .noUi-connect {
  background: linear-gradient(90deg, #667eea 0%, #4274d9 100%);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.price-range-slider .noUi-target {
  background: #e9ecef;
  border: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
}

.price-range-slider .noUi-handle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  top: -9px;
  right: -12px;
}

.price-range-slider .noUi-handle:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.price-range-slider .noUi-handle:active {
  transform: scale(1.05);
}

.price-range-slider .noUi-handle::before,
.price-range-slider .noUi-handle::after {
  display: none;
}

/* Input fields */
.price-inputs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.price-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-input-label {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 4px;
}

.price-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  background: #fff;
  transition: all 0.25s ease;
  text-align: center;
}

.price-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #fff;
}

.price-input::placeholder {
  color: #adb5bd;
  font-weight: 500;
}

/* Loading state - Uses unified design */
.price-loading {
  padding: 20px;
  text-align: center;
  color: var(--filter-text-muted);
  font-size: 14px;
}

/* Responsive - Uses unified design */
@media only screen and (max-width: 991px) {
  .price-filter-title {
    font-size: 13px;
  }
  
  .price-range-display {
    font-size: 15px;
  }
  
  .price-input {
    font-size: 13px;
    padding: 9px 10px;
  }
}

@media only screen and (max-width: 767px) {
  .price-filter-title {
    font-size: 12px;
  }
  
  .price-range-display {
    font-size: 14px;
  }
  
  .price-input {
    font-size: 12px;
    padding: 8px 10px;
  }
  
  .price-filter-content {
    padding: 16px 12px;
  }
}
