@import "ansys-sphinx-theme-variable.css";

.search-results {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  justify-content: flex-start;
  position: absolute;
  background-color: var(--ast-search-bar-enable-background);
  width: 630px;
  padding: 1em;
  border: 1px solid var(--ast-search-bar-enable-border);
  box-shadow: var(--ast-box-shadow-active);
  overflow: auto;
  max-height: 500px;
}

.result-item {
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  border-bottom: thin solid var(--ast-search-bar-enable-border);
  padding-bottom: 0.5em;
  margin-bottom: 0.5em;
}

.result-item:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.result-title {
  font-size: 1em;
  font-weight: bold;
  font-family: "Open Sans", sans-serif;
  color: var(--ast-catagory-header-text);
}

.result-text {
  font-size: 12px;
  font-family: "Open Sans", sans-serif;
  color: var(--ast-search-bar-enable-text);
}

.result-item.selected {
  box-shadow: var(--ast-ring-shadow-focused);
}

html[data-theme="light"] .highlight {
  color: var(--ast-highlight-color);
}

.form-control:focus,
.form-control:focus-visible,
.form-control {
  background-color: var(--ast-search-bar-enable-background);
  color: var(--ast-search-bar-enable-text);
  font-size: 14px;
  outline-color: var(--ast-search-bar-enable-border);
  border: 0px solid var(--ast-search-bar-enable-border);
  width: 300px;
  transition: max-width 0.3s ease;
  max-width: 200%;
  height: 40px;
}

.search-button__wrapper.show input,
.search-button__wrapper.show svg {
  font-size: 14px;
}

.bd-search .search-button__kbd-shortcut {
  background-color: var(--ast-search-bar-enable-background) !important;
  box-shadow: none !important;
  height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
}

.index-select {
  color: var(--ast-search-bar-enable-text);
  background: var(--ast-search-bar-enable-background);
  height: 40px;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
  border: 0.5px solid var(--ast-search-bar-enable-border);
  border-radius: 4px;
  box-shadow: none;
  padding: 0px 8px;
  margin-left: 2px;
}
:focus-visible {
  outline: none;
}

#search-icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--ast-search-bar-enable-text);
}

.form-control:focus {
  box-shadow: none;
}

/* Button Styling */
.search-button__button {
  transition: width 0.3s ease;
  width: 50px; /* Initial width */
}

/* Result Container Styling */
.bd-search {
  gap: 8px;
  background-color: var(--ast-search-bar-enable-background);
  border: 0px solid var(--ast-search-bar-enable-border);
  margin-bottom: 0px;
}

.bd-search input.expanded {
  width: 600px;
}

.search-icon {
  cursor: pointer;
}

.bd-main.blurred {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .bd-search input.expanded {
    width: 100px;
  }

  .form-control {
    width: 50px;
  }

  .result {
    width: 100px;
  }

  .bd-search .search-button__kbd-shortcut {
    display: none;
  }
}
