/* Enhanced Search Filter Styles */
.search-sort-wrapper {
  position: relative;
  overflow: hidden;
}

.search-sort-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url("#grain#grain")"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.search-box-combined {
  display: flex;
  align-items: stretch;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  height: 60px;
}

.search-box-combined:focus-within {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 25px;
  border-right: 2px solid #e9ecef;
  min-width: 180px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 100%;
}

.select-wrapper:hover {
  background: #e9ecef;
}

.select-wrapper select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
}

.select-wrapper::before {
  content: attr(data-selected);
  color: #495057;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  font-family: 'Poppins', sans-serif;
}

.select-wrapper .dropdown-arrow {
  font-size: 20px;
  color: #6c757d;
  margin-left: 12px;
  transition: transform 0.3s ease;
}

.select-wrapper:hover .dropdown-arrow {
  transform: rotate(180deg);
  color: #8865e1;
}

.search-input-wrapper {
  display: flex;
  align-items: stretch;
  flex: 1;
  height: 100%;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 25px;
  font-size: 16px;
  background: transparent;
  color: #333;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  height: 100%;
}

.search-input::placeholder {
  color: #adb5bd;
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
}

.search-btn {
  background: linear-gradient(135deg, #8865e1, #7a6ad8);
  border: none;
  padding: 0 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  height: 100%;
  min-width: 120px;
  justify-content: center;
}

.search-btn:hover {
  background: linear-gradient(135deg, #7a6ad8, #6a5acd);
  transform: translateX(-2px);
}

.search-btn i {
  font-size: 18px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #8865e1;
  z-index: 3;
}

/* Quick Filters */
.quick-filters {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  backdrop-filter: blur(10px);
}

.filter-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.filter-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tag {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filter-tag.active {
  background: rgba(255, 255, 255, 0.9);
  color: #8865e1;
  border-color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .search-sort-wrapper {
    padding: 35px 15px;
  }
  
  .search-box-combined {
    height: 55px;
  }
  
  .select-wrapper {
    min-width: 160px;
    padding: 0 20px;
  }
  
  .search-input {
    font-size: 15px;
    padding: 0 20px;
  }
  
  .search-btn {
    padding: 0 25px;
    min-width: 110px;
  }
}

@media (max-width: 768px) {
  .search-sort-wrapper {
    padding: 30px 15px;
  }
  
  .search-box-combined {
    flex-direction: column;
    height: auto;
  }
  
  .select-wrapper {
    border-right: none;
    border-bottom: 2px solid #e9ecef;
    min-width: 100%;
    padding: 18px 20px;
    justify-content: space-between;
    height: 55px;
  }
  
  .select-wrapper::before {
    font-size: 14px;
  }
  
  .search-input-wrapper {
    flex-direction: column;
  }
  
  .search-input {
    padding: 18px 20px;
    font-size: 16px;
    height: 55px;
  }
  
  .search-btn {
    padding: 18px 20px;
    justify-content: center;
    height: 55px;
    min-width: auto;
  }
  
  .quick-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 15px;
    padding: 12px 15px;
  }
  
  .filter-tags {
    width: 100%;
    justify-content: flex-start;
  }
  
  .filter-tag {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .search-sort-wrapper {
    padding: 25px 10px;
  }
  

  
  .select-wrapper {
    padding: 15px;
    height: 50px;
  }
  
  .select-wrapper::before {
    font-size: 13px;
  }
  
  .search-input {
    padding: 15px;
    font-size: 15px;
    height: 50px;
  }
  
  .search-btn {
    padding: 15px;
    height: 50px;
    font-size: 14px;
  }
  
  .quick-filters {
    padding: 10px 12px;
  }
  
  .filter-tags {
    gap: 8px;
  }
  
  .filter-tag {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* Animation for loading states */
.search-loading {
  position: relative;
  overflow: hidden;
}

.search-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Focus states for accessibility */
.search-input:focus,
.search-type-select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.filter-tag:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Enhanced select dropdown styling */
.search-type-select option {
  padding: 12px;
  font-size: 14px;
  background: white;
  color: #333;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

/* Remove default transitions and add specific ones */
.search-box-combined,
.select-wrapper,
.search-btn,
.filter-tag {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix for search icon positioning */
.search-container {
  position: relative;
}

/* Ensure proper font rendering */
.search-sort-wrapper * {
  font-family: 'Poppins';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}