/*
  Site search form (templates/partials/search-form.php) — a rounded input with
  a round icon submit button. Used in the accessibility bar (desktop) and the
  mobile menu drawer.
*/

.search-form {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

.search-form__input {
  min-inline-size: 0;
  inline-size: 12rem;
  max-inline-size: 100%;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-white);
  color: var(--color-text);
  font-size: var(--text-small);
}

.search-form__input::placeholder {
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.search-form__submit {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border: 1px solid var(--color-green-strong);
  border-radius: 50%;
  background-color: var(--color-green-strong);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-form__submit:hover,
.search-form__submit:focus-visible {
  background-color: var(--color-green-dark);
}

.search-form__icon {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

/* Drawer: full-width field under the tools. */
@media (max-width: 60rem) {
  .nav-tools .search-form {
    inline-size: 100%;
  }

  .nav-tools .search-form__input {
    flex: 1;
    inline-size: auto;
  }
}
