/* OHVO voice filter polish: keep search and dropdown controls identical. */
#wp-voices .ohvo-filter-grid .ohvo-filter-input {
  appearance: none;
  box-sizing: border-box;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 40px 0 12px !important;
  border: 1px solid rgb(209 213 219) !important;
  border-radius: 0.5rem !important;
  font-size: 16px;
  line-height: 20px;
}

#wp-voices .ohvo-filter-grid .ohvo-filter-input:focus-visible {
  border-color: #8ead2d !important;
  box-shadow: 0 0 0 2px rgb(142 173 45 / 20%);
}

/* The placeholder already communicates search. Keep the filter row quiet at rest. */
#wp-voices .ohvo-filter-grid form.ohvo-filter-item > div > div:first-child {
  display: none !important;
}

/* Reveal the component spinner only while a request is active. */
#wp-voices .ohvo-filter-grid form.ohvo-filter-item > div > div:first-child:has(.motion-safe\:animate-spin) {
  display: flex !important;
}

#wp-voices .ohvo-filter-grid form.ohvo-filter-item:has(.motion-safe\:animate-spin) .ohvo-filter-input,
#wp-voices .ohvo-filter-grid form.ohvo-filter-item.ohvo-search-loading .ohvo-filter-input {
  padding-left: 40px !important;
}

/* The compatibility helper also covers Enter searches in the currently deployed bundle. */
#wp-voices .ohvo-filter-grid form.ohvo-filter-item.ohvo-search-loading {
  position: relative;
}

#wp-voices .ohvo-filter-grid form.ohvo-filter-item.ohvo-search-loading::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid rgb(142 173 45 / 25%);
  border-top-color: #8ead2d;
  border-radius: 999px;
  transform: translateY(-50%);
  animation: ohvo-search-spin 700ms linear infinite;
  pointer-events: none;
}

#wp-voices .ohvo-filter-grid form.ohvo-filter-item.ohvo-search-loading:has(.motion-safe\:animate-spin)::before {
  display: none;
}

@keyframes ohvo-search-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

#wp-voices .ohvo-filter-grid button[aria-label="Clear voice search"] {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  transform: translateY(-50%);
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
}

#wp-voices .ohvo-filter-grid button[aria-label="Clear voice search"] svg {
  width: 14px !important;
  height: 14px !important;
}

#wp-voices .ohvo-filter-grid button[aria-label="Clear voice search"]:focus-visible {
  outline: 2px solid #8ead2d;
  outline-offset: 2px;
}
