.vp-navbar-search {
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .vp-navbar-search {
    flex-grow: 1;
    padding-left: 24px;
  }
}

@media (min-width: 960px) {
  .vp-navbar-search {
    padding-left: 32px;
  }
}

/* plugin-docsearch */
.DocSearch {
  --docsearch-primary-color: var(--vp-c-brand-1);
  --docsearch-highlight-color: var(--docsearch-primary-color);
  --docsearch-text-color: var(--vp-c-text-1);
  --docsearch-muted-color: var(--vp-c-text-2);
  --docsearch-searchbox-shadow: none;
  --docsearch-searchbox-background: var(--vp-c-default-soft);
  --docsearch-searchbox-focus-background: var(--vp-c-default-3);
  --docsearch-key-gradient: transparent;
  --docsearch-key-shadow: none;
  --docsearch-modal-background: var(--vp-c-bg-soft);
  --docsearch-footer-background: var(--vp-c-bg);
}

[data-theme="dark"] .DocSearch {
  --docsearch-modal-shadow: none;
  --docsearch-footer-shadow: none;
  --docsearch-logo-color: var(--vp-c-text-2);
  --docsearch-hit-background: var(--vp-c-default-soft);
  --docsearch-hit-color: var(--vp-c-text-2);
  --docsearch-hit-shadow: none;
}

.vp-navbar-search .DocSearch-Button {
  display: flex;
  align-items: center;
  justify-content: center !important;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background: var(--docsearch-searchbox-background);
  transition: border-color var(--vp-t-color), background var(--vp-t-color);
}

.vp-navbar-search .DocSearch-Button:hover {
  background: var(--docsearch-searchbox-focus-background);
}

.vp-navbar-search .DocSearch-Button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}

.vp-navbar-search .DocSearch-Button:focus:not(:focus-visible) {
  outline: none !important;
}

.vp-navbar-search #docsearch-container {
  min-width: 32px;
}

.DocSearch-Button .DocSearch-Button-Container {
  display: flex;
  align-items: center;
}

.DocSearch-Button .DocSearch-Search-Icon {
  position: relative;
  width: 16px;
  height: 16px;
  color: var(--vp-c-text-1);
  fill: currentcolor;
  transition: color var(--vp-t-color);
}

.DocSearch-Button:hover .DocSearch-Search-Icon {
  color: var(--vp-c-text-1);
}

.DocSearch-Button .DocSearch-Button-Placeholder {
  display: none;
  padding: 0 16px 0 0;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vp-c-text-2);
  transition: color var(--vp-t-color);
}

.DocSearch-Button:hover .DocSearch-Button-Placeholder {
  color: var(--vp-c-text-1);
}

.DocSearch-Button .DocSearch-Button-Keys {
  display: none;
  min-width: auto;

  /* rtl:ignore */
  direction: ltr;
}

.DocSearch-Button .DocSearch-Button-Key {
  display: block;
  width: auto;

  /* rtl:end:ignore */
  min-width: 0;
  height: 22px;
  padding-left: 6px;
  margin: 2px 0 0;
  font-family: var(--vp-font-family-base);
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  border: 1px solid var(--vp-c-divider);

  /* rtl:begin:ignore */
  border-right: none;
  border-radius: 4px 0 0 4px;
  transition: color var(--vp-t-color), border-color var(--vp-t-color);
}

.DocSearch-Button .DocSearch-Button-Key + .DocSearch-Button-Key {
  padding-right: 6px;
  padding-left: 2px;

  /* rtl:begin:ignore */
  border-right: 1px solid var(--vp-c-divider);
  border-left: none;
  border-radius: 0 4px 4px 0;

  /* rtl:end:ignore */
}

.DocSearch-Button .DocSearch-Button-Key:first-child {
  font-size: 1px;
  color: transparent;
  letter-spacing: -12px;
}

.DocSearch-Button .DocSearch-Button-Key:first-child::after {
  font-size: 12px;
  color: var(--docsearch-muted-color);
  letter-spacing: normal;
  content: "Ctrl";
}

.mac .DocSearch-Button .DocSearch-Button-Key:first-child::after {
  content: "⌘";
}

.DocSearch-Button .DocSearch-Button-Key:first-child > * {
  display: none;
}

[data-theme="dark"] .DocSearch-Footer {
  border-top: 1px solid var(--vp-c-divider);
}

.DocSearch-Form {
  background-color: var(--vp-c-white);
  border: 1px solid var(--vp-c-brand-1);
}

[data-theme="dark"] .DocSearch-Form {
  background-color: var(--vp-c-bg-soft);
}

/* plugin-docsearch */

/* plugin-search */
.vp-navbar-search .search-box input {
  padding: 0 0.3rem 0 1.655rem;
  background-position: 0.5rem 0.4rem;
}

/* plugin-search */
/* stylelint-disable-next-line order/order */
@media (min-width: 768px) {
  .vp-navbar-search {
    flex-grow: 1;
    padding-left: 24px;
  }
}

@media (min-width: 960px) {
  .vp-navbar-search {
    padding-left: 32px;
  }
}

@media print {
  .vp-navbar-search {
    display: none;
  }
}

@media (min-width: 768px) {
  .vp-navbar-search .DocSearch-Button {
    justify-content: flex-start;
    width: 100%;
    height: 40px;
    padding: 0 10px 0 12px;
    background-color: var(--vp-c-bg-alt);
    border: 1px solid transparent;
    border-radius: 8px;
  }

  .vp-navbar-search .DocSearch-Button:hover {
    background: var(--docsearch-searchbox-focus-background);
    border-color: var(--vp-c-brand-1);
  }
}

@media (min-width: 768px) {
  .DocSearch-Button .DocSearch-Search-Icon {
    top: 1px;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    color: var(--vp-c-text-2);
  }
}

@media (min-width: 768px) {
  .DocSearch-Button .DocSearch-Button-Placeholder {
    display: inline-block;
  }
}

@media (min-width: 768px) {
  .DocSearch-Button .DocSearch-Button-Keys {
    display: flex;
    align-items: center;
  }
}

.search-box .suggestions {
  top: 2.5rem;
  right: -1rem;
  padding: 16px 12px;
  background-color: var(--vp-c-bg);
  border-radius: 12px;
  box-shadow: var(--vp-shadow-3);
}
