/* === Search Page Styles === */

.search-bar {
  background: linear-gradient(to bottom, #ffffff 0%, var(--gray-bg) 100%);
  border-bottom: 2px solid var(--gray-lighter);
  padding: 24px 32px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-bar label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-bar select,
.search-bar input {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 16px;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius);
  outline: none;
  transition: all 0.3s;
  background: white;
  color: var(--text);
}

.search-bar select:focus,
.search-bar input:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-bar select { width: 170px; }
.search-bar input { flex: 1; min-width: 240px; }

.search-bar button {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-bar button:hover {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.toggle-btn {
  background: transparent !important;
  color: var(--navy) !important;
  border: 2px solid var(--navy) !important;
  font-size: 12px !important;
  padding: 10px 18px !important;
  text-transform: none !important;
}

.toggle-btn:hover {
  background: var(--navy) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

/* === Search Input Wrapper + Dropdown === */
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-input-wrap input { width: 100%; }

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border: 2px solid var(--blue-bright);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
}

.search-dropdown.hidden { display: none; }

.dropdown-item {
  display: block;
  width: 100%;
  padding: 18px 22px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-lighter);
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
  background: linear-gradient(to right, var(--blue-pale) 0%, white 100%);
  border-left: 3px solid var(--gold);
  padding-left: 19px;
}

.dropdown-address {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
}

.dropdown-details {
  display: block;
  font-size: 14px;
  color: var(--gray);
  margin-top: 6px;
  line-height: 1.5;
}

.dropdown-loading,
.dropdown-empty {
  padding: 20px;
  font-size: 14px;
  color: var(--gray);
  text-align: center;
}

/* === Recent Searches === */
.recent-searches {
  padding: 28px 32px;
  max-width: 1200px;
}

.recent-searches h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 16px;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.recent-card {
  display: block;
  padding: 16px 20px;
  background: white;
  border: 2px solid var(--gray-lighter);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
}

.recent-card:hover {
  border-color: var(--blue-bright);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.recent-card .recent-address {
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 4px;
}

.recent-card .recent-detail {
  font-size: 13px;
  color: var(--gray);
}

/* === Responsive === */
@media (max-width: 768px) {
  .search-bar { padding: 16px 20px; }
  .recent-searches { padding: 16px 20px; }
  .recent-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .search-bar { flex-direction: column; }
  .search-bar select, .search-bar input, .search-input-wrap { width: 100%; min-width: 0; }
}
