/* Home Search Styles - Updated to match tour.css */
/* ===== Last edited by NK on Nov 22 at 21:37 Hours ===== */
/* NK has changed only color theme */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-overlay.active {
  display: flex;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-light-on-hover);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Custom Select - Match tour.css */
.custom-select {
  position: relative;
  width: 100%;
  pointer-events: none;
}

.select-selected {
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  color: #000;
  font-weight: 400;
}

.select-selected:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--primary-dark);
  margin-left: 10px;
  transition: transform 0.3s;
}

.select-selected.select-arrow-active:after {
  transform: rotate(180deg);
}

/* Dropdown Container - Using Primary Theme Colors */
.dropdown-container {
  position: fixed;
  background-color: white;
  border: 2px solid var(--primary-light-on-hover);
  box-shadow: 0 8px 24px rgba(0, 189, 191, 0.25);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 20;
}

.dropdown-container.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.dropdown-container div {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.dropdown-container div:hover {
  background-color: #e0f7fa;
  color: var(--primary-dark);
}

.dropdown-container div.same-as-selected {
  background-color: var(--primary-dark);
  color: white;
  font-weight: 600;
}

.dropdown-container div.same-as-selected:hover {
  background-color: var(--primary-dark);
}

/* Autocomplete Container - Using Primary Theme Colors */
.autocomplete-container {
  position: fixed;
  background-color: white;
  border: 1px solid var(--primary-light-on-hover);
  box-shadow: 0 8px 24px rgba(0, 189, 191, 0.25);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
}

.autocomplete-container.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: #e0f7fa;
  color: var(--primary-dark);
}

.autocomplete-item.no-results {
  color: var(--text-muted);
  cursor: default;
  font-style: italic;
}

.autocomplete-item.no-results:hover {
  background-color: white;
  color: var(--text-muted);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media only screen and (max-width: 968px) {
  .search-section {
    padding: 1.5em 2em;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .search-input-group {
    border-right: none;
    border-bottom: 2px solid var(--dark-text-color);
  }

  .search-input-group:last-of-type {
    border-bottom: none;
  }

  .search-btn {
    padding: 1.5em;
  }
}