/* Static Search Results Container */

.bd-search{
  display: flex;
}
.static-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: 39.375rem; /* 630px */
  padding: 1em;
  border: 1px solid var(--ast-search-bar-enable-border);
  box-shadow: var(--ast-box-shadow-active);
  overflow: auto;
  max-height: 31.25rem; /* 500px */
}

/* Individual Result Item */
.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;

  &:last-child {
    border-bottom: 0;
    margin-bottom: 0;
  }

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

/* Result Title */
.result-title {
  font-size: 1em;
  font-family: "Open Sans", sans-serif;
  color: var(--ast-color-link);
}

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

/* Highlighted Text */
html[data-theme="light"] .highlight {
  color: var(--pst-color-text-base);
  font-weight: var(--ast-font-weight-bold);
}

/* Search Input Styles */
.bd-search input.form-control,
.bd-search input.form-control:focus,
.bd-search input.form-control:focus-visible,
.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: 0.875rem; /* 14px */
  outline-color: var(--ast-search-bar-enable-border);
  border: 0;
  width: 18.75rem; /* 300px */
  transition: max-width 0.3s ease;
  max-width: 200%;
  height: 2.5rem; /* 40px */
}

/* Search Button Wrapper */
.search-button__wrapper.show input,
.search-button__wrapper.show svg {
  font-size: 0.875rem; /* 14px */
}

/* Search Button Keyboard Shortcut */
.bd-search .search-button__kbd-shortcut {
  background-color: var(--ast-search-bar-enable-background) !important;
  box-shadow: none !important;
}

/* Index Select Dropdown */
.index-select {
  color: var(--ast-search-bar-enable-text);
  background: var(--ast-search-bar-enable-background);
  height: 2.5rem; /* 40px */
  font-size: 0.875rem; /* 14px */
  font-family: "Open Sans", sans-serif;
  border: 0.03125rem solid var(--ast-search-bar-enable-border); /* 0.5px */
  border-radius: 0.25rem; /* 4px */
  box-shadow: none;
  padding: 0 0.5rem; /* 0 8px */
  margin-left: 0.125rem; /* 2px */
}

/* Focus Visible Outline */
:focus-visible {
  outline: none;
}

/* Search Icon */
#search-icon {
  font-size: 1.5rem; /* 24px */
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
  color: var(--ast-search-bar-enable-text);
}

/* Form Control Focus Styles */
.form-control:focus,
.bd-search:focus-within {
  box-shadow: none;
}

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

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

  input.form-control.expanded {
    width: 37.5rem; /* 600px */
  }
}

/* Search Icon Styling */
.search-icon {
  cursor: pointer;
}

/* Blurred Main Content */
.bd-main.blurred {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* Responsive Styles */
@media (min-width: 1200px) and (max-width: 85.375rem) {
  .bd-search input.form-control.expanded {
    width: 100%; /* 320px */
  }

  .bd-search input.form-control {
    width: 100%; /* 240px */
  }

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

  .static-search-results {
    width: 50%; /* 480px */
  }
}

@media (max-width: 1200px) {

  .bd-search input.form-control.expanded {
    width: 5rem; /* 320px */
  }

  .bd-search input.form-control {
    width: 100%; /* 240px */
  }

  .static-search-results {
    width: 50%; /* 480px */
  }

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

// laptop
@media (min-width: 85.375rem)  and (max-width: 128rem) {
  .bd-search input.form-control.expanded {
    width: 35rem; /* 560px */
  }

  .bd-search input.form-control {
    width: 100%; /* 240px */
  }

  .static-search-results {
    width: 37rem; /* 600px */
  }
}


/* ========== General Styles ========== */

.result-item {
  padding: 8px;
  margin-bottom: 4px;
  cursor: pointer;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 10px;
  cursor: pointer;
}

/* ========== Search Input ========== */

#search-input {
  width: 100%;
  max-width: 600px; /* Adjust as needed */
  padding: 10px;
  margin-bottom: 10px;
}

/* ========== Checkbox Filter Items ========== */

.checkbox-item {
  display: flex;
  align-items: center;
  margin: 0.3125rem 0.625rem; // 5px 10px
}



/* ========== Chips (Selected Filter Tags) ========== */

.chip {
  display: inline-flex;
  align-items: center;
  background-color: var(--ast-hover-suggestion-text-background);
  border-radius: 1rem; // 16px
  padding: 0.3125rem 0.625rem; // 5px 10px
  margin: 0.3125rem; // 5px
}

.chip .remove-btn {
  margin-left: 0.5rem; // 8px
  background: none;
  border: none;
  color:var(--ast-search-bar-enable-text);
  cursor: pointer;
  font-weight: bold;
}

.chip .remove-btn:hover {
  color: var(--ast-search-bar-enable-background);
}

/* Dropdown items inside chips if needed */
.chip .dropdown-item {
  padding: 0.3125rem 0.625rem; // 5px 10px
  cursor: pointer;
}

/* ========== Dropdown Panels (Sidebar) ========== */

#objectid-dropdown,
#library-dropdown {
  position: relative;
  top: 100%; /* Directly below parent */
  left: 0.625rem; // 10px
  background-color: transparent;
  border: none;
  display: block;
}

.search-page-sidebar.toggle-section {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.3125rem 0.625rem; // 5px 10px
  border-radius: 0.3125rem; // 5px
  margin-top: 0.3125rem; // 5px
}

.search-page-sidebar.toggle-section.active {
  background-color: var(--ast-hover-suggestion-text-background);
  font-weight: bold;
}

.toggle-icon {
  padding: 0.5rem; // 8px
}

.checkmark {
  margin-right: 0.3125rem; // 5px
  color: var(--ast-search-bar-enable-text);
  font-weight: 400;
}

.result-limit-wrapper {
  display: flex;
  align-items: center;
  margin: 0 0.625rem; // 0 10px
  font-size: 0.875rem; /* 14px */
  color: var(--ast-search-bar-enable-text);
}

select {
  background-color: var(--ast-search-bar-enable-background);
  color: var(--ast-search-bar-enable-text);
  border: 0.03125rem solid var(--ast-search-bar-enable-border); /* 0.5px */
  border-radius: 0.25rem; /* 4px */
  padding: 0.5rem;
  font-size: 0.875rem; /* 14px */
}