/* AgroClaro — Unified Search Bar Component */

/* ========== BASE ========== */

.search-bar {
  display: flex;
  gap: 8px;
}

.search-bar input[type="search"] {
  flex: 1;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  outline: none;
  transition: all 0.2s;
}

.search-bar button {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.search-bar button:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* ========== HERO VARIANT ========== */
/* Used on landing page and section intro banners (transparent bg, white text) */

.search-bar--hero {
  max-width: 600px;
  margin: 0 auto;
}

.search-bar--hero input[type="search"] {
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.search-bar--hero input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-bar--hero input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.search-bar--hero button {
  padding: 16px 28px;
}

/* Section pages use slightly smaller padding */
.search-bar--hero.search-bar--section input[type="search"] {
  padding: 14px 20px;
}

.search-bar--hero.search-bar--section button {
  padding: 14px 28px;
}

.search-bar--hero.search-bar--section {
  max-width: 560px;
}

/* ========== COMPACT VARIANT ========== */
/* Used in the site header (no button, smaller, expands on focus) */

.search-bar--compact {
  align-items: center;
}

.search-bar--compact input[type="search"] {
  padding: 8px 16px;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  background: transparent;
  color: var(--color-text);
}

.search-bar--compact input[type="search"]:focus {
  border-color: var(--color-primary-light);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 767px) {
  .search-bar--hero {
    flex-direction: column;
  }

  .search-bar--hero input[type="search"],
  .search-bar--hero button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .search-bar--compact input[type="search"] {
    max-width: none;
  }

  .search-bar--compact input[type="search"]:focus {
    max-width: none;
  }
}
