/* Global navbar search */

.global-search {
  flex: 0 0 66.666%;
  width: 66.666%;
  max-width: 66.666%;
  min-width: 12rem;
}

.global-search-field {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.global-search-field:focus-within {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}

.global-search-field .form-control {
  background: transparent;
  min-height: 2.375rem;
  padding-inline-start: 0.25rem;
}

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

.global-search-results {
  display: block;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  margin-top: 0.35rem;
  padding: 0.5rem 0;
  z-index: 1080;
}

.global-search-results.d-none {
  display: none !important;
}

.global-search-heading {
  color: var(--bs-secondary-color);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1rem 0.25rem;
  margin: 0;
}

.global-search-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: start;
}

.global-search-item:hover,
.global-search-item.is-active {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
  color: inherit;
}

.global-search-item-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background-color: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
}

.global-search-item-body {
  min-width: 0;
  flex-grow: 1;
}

.global-search-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-item-subtitle {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin: 0.1rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-item-meta {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--bs-secondary-color);
  max-width: 7rem;
  text-align: end;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 0.15rem;
}

.global-search-empty,
.global-search-status {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

@media (max-width: 575.98px) {
  .global-search {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .global-search-item-meta {
    display: none;
  }
}
