/**
 * Search Page Styles - Page-specific styles only
 * Common styles moved to common.css
 * All original functionality preserved
 * Updated to use CSS custom properties for easy theming
 */

/* === SEARCH PAGE SPECIFIC STYLES === */
body {
  padding-top: 136px; /* Primary navbar (56px) + Secondary navbar (60px) + spacing (20px) - SEARCH SPECIFIC */
}

/* Search page mobile body padding adjustment */
@media (max-width: 767px) {
  body {
    padding-top: 126px; /* Primary navbar (56px) + Secondary navbar (50px) + spacing (20px) */
  }
}

/* === SEARCH PAGE SPECIFIC COMPONENTS === */
.search-container {
  background: var(--surface-bg);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

/* Mobile overlay filters */
.filters-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 1050;
  display: none;
}

.filters-panel {
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  height: calc(100vh - 76px);
  background: var(--surface-bg);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 1051;
}

.filters-panel.show {
  transform: translateX(0);
}

.filters-panel-header {
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  z-index: 1;
}

.filters-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.close-filters-btn {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop filters styling */
.desktop-filters {
  display: block;
}

/* Mobile filters toggle button */
.mobile-filters-toggle {
  background: var(--gradient-primary);
  border: none;
  color: var(--text-white);
  padding: 0.75rem 1.25rem;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
  display: none;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.mobile-filters-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.4);
}

/* Filter styles */
.filter-section {
  background: var(--surface-bg);
  border-radius: 15px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.1);
  overflow: hidden;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.filter-header {
  background: var(--body-bg);
  padding: 1rem 1.25rem;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.filter-header:hover {
  background: var(--border-light);
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.filter-title i {
  color: var(--primary-color);
}

.filter-count-badge {
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.filter-toggle {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.filter-toggle.collapsed {
  transform: rotate(-90deg);
}

.filter-body {
  padding: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.filter-option {
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--surface-bg);
}

.filter-option:hover {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.05) 0%, rgba(var(--secondary-color-rgb), 0.05) 100%);
  transform: translateY(-1px);
}

.filter-option.selected {
  border-color: var(--primary-color);
  background: var(--gradient-primary);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.filter-option.selected .filter-item-count {
  color: rgba(255, 255, 255, 0.8);
}

.filter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.filter-item-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Active filters display */
.active-filters-summary {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--secondary-color-rgb), 0.1) 100%);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.active-filter-tag {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.3);
}

.remove-filter-btn {
  background: none;
  border: none;
  color: var(--text-white);
  margin-left: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.8;
}

.remove-filter-btn:hover {
  opacity: 1;
}

.clear-filters-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
}

/* Results styling */
.results-container {
  background: var(--surface-bg);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.1);
  padding: 1.5rem;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.results-header {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.sort-options select {
  min-width: 180px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.9rem;
}

.sort-options select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
}

.results-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.place-card {
  background: var(--surface-bg);
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
  border-radius: 15px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.1);
}

.place-card:hover {
  box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.2);
  transform: translateY(-3px);
  border-color: var(--primary-color);
}

.place-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.place-logo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.place-info h3 {
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
}

.place-location {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.place-location i {
  color: var(--primary-color);
}

.place-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.place-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-tag {
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--secondary-color-rgb), 0.1) 100%);
  color: var(--primary-color);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid var(--border-light);
  border-top: 2px solid var(--secondary-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
}

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

/* Error states */
.error-message {
  background: var(--danger-bg, #f8d7da);
  color: var(--danger-text, #721c24);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid var(--danger-border, #f5c6cb);
}

/* Mobile responsive */
@media (max-width: 991px) {
  .desktop-filters {
    display: none;
  }
  
  .mobile-filters-toggle {
    display: block;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .sort-options {
    text-align: right;
  }
  
  .sort-options select {
    min-width: auto;
    width: 100%;
    max-width: 200px;
  }
}

@media (min-width: 992px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}
