/* =========================================================
   SEARCH FORM — scoped to #search-form
   (Previously used bare `form`, `select`, `input[type=text]`
   selectors, which applied to ANY form on the page. Scoping
   this to #search-form means adding other forms later — like
   a future registration form — won't inherit these styles
   unintentionally.)
========================================================= */

#search-form {
  font-family: inherit;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

#search-form .form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

#search-form .form-group {
  flex: 1 1 200px;
  min-width: 0;
}

#search-form .form-submit {
  flex: 0 0 auto;
}

#search-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #333;
}

#search-form select,
#search-form input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
}

#search-form select:focus,
#search-form input[type="text"]:focus {
  outline: 2px solid #007BFF;
  outline-offset: 1px;
  border-color: #007BFF;
}

#search-form input[type="submit"] {
  background: #007BFF;
  color: white;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

#search-form input[type="submit"]:hover {
  background: #0b5fc9;
}

#searchMessage {
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

/* City autocomplete */
#search-form .city-container {
  position: relative;
}

.suggestion-box {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  display: none;
}

/* =========================================================
   MOBILE — replaces the old 48%-width hack with normal
   flex wrapping, no !important needed
========================================================= */
@media (max-width: 600px) {
  #search-form {
    padding: 1.1rem;
  }

  #search-form .form-row {
    gap: 0.6rem;
  }

  #search-form .form-group {
    flex: 1 1 47%;
  }

  #search-form .form-submit {
    flex: 1 1 100%;
    margin-top: 0.2rem;
  }

  #search-form input[type="submit"] {
    width: 100%;
  }
}

/* Safari select height fix, scoped */
@supports (-webkit-appearance: none) {
  #search-form select {
    height: 48px;
  }
}

.form-footer {
  max-width: 620px;
  margin: 1rem auto;
  min-height: 56px;
  background: #f9f9f9;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  text-align: center;
  gap: 0.5rem;
}

.form-footer .description {
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.form-footer .highlight-link {
  color: #007BFF;
  font-weight: 600;
  text-decoration: none;
}

.form-footer .highlight-link:hover {
  text-decoration: underline;
}