/* The city field, icon, suggestions and loading spinner.
   index.html loads this file in place of the old rules. SEO pages load the same file. */
.wc-seo-search {
  --wc-sans: "Inter", system-ui, sans-serif;
  --search-suggestions-bg: #ffffff;
  --search-input-bg: #ffffffd2;
  --accent: #4325eb75;
  --accent-soft: #ffffff;
  --text-muted: #586579;
  --border: rgba(203, 213, 225, 0.9);
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 4px 1.5rem 1rem;
  background: #ffffffd8;
  border: 1px solid rgba(255, 0, 0, 0.05);
  border-radius: 0;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}
.wc-seo-search.has-suggestions { z-index: 40; }
html.dark .wc-seo-search {
  --search-suggestions-bg: #0f0f0f;
  --text-muted: #dddfe2;
  --border: rgba(155, 149, 184, 0.9);
  background: #00acac9c;
}

.search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.8rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--wc-sans);
  font-size: 0.85rem;
  outline: none;
  color: #000;
  caret-color: #000;
  color-scheme: light;
  background: var(--search-input-bg);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.search-button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  white-space: nowrap;
}

.search-button:hover { background: #1e4dc8; }

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-with-icon { position: relative; }

.search-with-icon .search-input { padding-right: 2.4rem; }

.search-icon {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.08s ease;
}

.search-icon svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
}

.search-icon:hover { opacity: 1; }

.search-icon:active { transform: translateY(-50%) scale(0.95); }

.search-icon.is-loading {
  opacity: 1;
  cursor: progress;
}

.search-icon .load-spin {
  width: 25px;
  height: 25px;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--search-suggestions-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  max-height: 260px;
  overflow-y: auto;
  font-size: 0.85rem;
  z-index: 50;
  display: none;
}

.search-suggestion {
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.search-suggestion-main { font-weight: 500; }

.search-suggestion-sub {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: #4325eb1c;
  color: #4325ebcb;
}

html.dark .search-suggestion:hover,
html.dark .search-suggestion.active {
  background: #008c8c;
  color: #73F6F5;
}

.search-with-icon .search-input { padding-right: 2.2rem; }

.search-icon {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #6b7280;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.search-icon:hover { opacity: 1; }

.search-status {
  margin: 0.35rem 0 0;
  font-family: var(--wc-sans);
  font-size: 0.78rem;
  color: var(--text-muted);
}

@keyframes loading-ui-classic-fade {
  0% { opacity: 1; }
  100% { opacity: 0.15; }
}

.load-spin {
  box-sizing: border-box;
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  position: relative;
  color: currentColor;
}

.load-spin-rotor {
  position: relative;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
}

.load-spin-rotor > span {
  position: absolute;
  top: -3.9%;
  left: -10%;
  display: block;
  height: 8%;
  width: 24%;
  border-radius: 999px;
  background: currentColor;
  animation: loading-ui-classic-fade var(--load-spin-duration, 1.2s) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .load-spin-rotor > span {
    animation: none;
    opacity: 0.55;
  }
}

html.mobile-view .wc-seo-search { padding: 0.45rem 0.65rem 0.7rem; }

html.mobile-view .wc-seo-search .search-input {
  box-sizing: border-box;
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 32px;
}

@media (orientation: landscape) {
  html.mobile-view .wc-seo-search .search-input {
    box-sizing: border-box;
    height: 22px;
    padding: 0 2.1rem 0 0.7rem;
    font-size: 0.78rem;
    line-height: 20px;
  }
  html.mobile-view .wc-seo-search .search-icon { right: 0.45rem; }
  html.mobile-view .wc-seo-search .search-icon svg {
    width: 18px;
    height: 18px;
  }
}
