/* Hide old RTD search form if it still exists */
#rtd-search-form {
  display: none;
}

/* Optional: tune DocSearch accent colors */
:root {
  --docsearch-primary-color: #2980b9;
  --docsearch-muted-color: #404040;
}

/* Container placement in RTD sidebar */
#docsearch {
  width: 90%;
  margin: 5px 0 0;
}

/* Make the DocSearch trigger look like the old search field */
#docsearch .DocSearch-Button {
  width: 100%;
  height: 30px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fcfcfc;
  color: #404040;
  box-shadow: none;
  justify-content: flex-start;
}

/* Keep the same simple input-like look on hover/focus */
#docsearch .DocSearch-Button:hover,
#docsearch .DocSearch-Button:focus,
#docsearch .DocSearch-Button:active {
  background: #ffffff;
  color: #404040;
  box-shadow: none;
  outline: none;
}

/* Search icon */
#docsearch .DocSearch-Search-Icon {
  width: 16px;
  height: 16px;
  color: #7a7a7a;
  margin-right: 8px;
}

/* Placeholder text */
#docsearch .DocSearch-Button-Placeholder {
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
  line-height: 1;
}

/* Hide keyboard shortcut hint for a cleaner classic look */
#docsearch .DocSearch-Button-Keys {
  display: none;
}

/* Remove extra internal spacing if present */
#docsearch .DocSearch-Button-Container {
  flex: 1;
}

/* Slightly tighter layout on small screens */
@media (max-width: 768px) {
  #docsearch .DocSearch-Button {
    height: 32px;
    padding: 0 10px;
  }
}
