/* === SEARCH FORM CONTAINER === */
.search-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  max-width: 600px;
  width: 100%;
  margin: 1.5rem auto;
  position: relative;
}

/* === INPUT FIELD === */
.search-form input[type="text"] {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
  min-width: 0;
}

.search-form input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
  outline: none;
}

/* === SEARCH BUTTON === */
.search-form button[type="submit"] {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  font-size: 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-form button[type="submit"]:hover {
  background: var(--primary-hover);
}

/* === CLEAR HISTORY BUTTON === */
#clear-history {
  background: #ff7043;
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

#clear-history:hover {
  background: #e64a19;
}

/* === SUGGESTION DROPDOWN === */
.suggestion-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* === SUGGESTION ITEM === */
.suggestion-box li {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s ease;
}

.suggestion-box li span {
  margin-left: 0.5rem;
  color: #555;
}

.suggestion-box li:last-child {
  border-bottom: none;
}

.suggestion-box li:hover,
.suggestion-box li.active {
  background: var(--primary);
  color: #fff;
}

.suggestion-box li:hover span,
.suggestion-box li.active span {
  color: #fff;
}

/* === CLEAR HISTORY IN DROPDOWN === */
.suggestion-box li.clear-suggestions {
  background: #fff3e0;
  color: #c0392b;
  font-weight: 500;
  justify-content: center;
  text-align: center;
  border-top: 1px solid #ffd6ad;
  transition: background 0.2s ease, color 0.2s ease;
}

.suggestion-box li.clear-suggestions:hover {
  background: #ffe0c2;
  color: #b03a2e;
}

/* === SEARCH HISTORY SECTION (optional) === */
.search-history {
  margin: 0 auto;
  max-width: 600px;
  padding: 1rem;
  font-size: 0.95rem;
  color: #333;
}

.search-history ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.search-history li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.search-history li::before {
  content: "🕒";
  font-size: 0.9rem;
  color: #999;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form input[type="text"],
  .search-form button[type="submit"],
  .search-form #clear-history {
    width: 100%;
    font-size: 1rem;
  }

  .search-form button {
    margin-top: 0.5rem;
  }
}
