@import "@docsearch/css";

.docsearch-wrapper {
  &.full-width {
    &,
    .DocSearch.DocSearch-Button {
      @apply w-full;
    }

    .DocSearch.DocSearch-Button {
      @apply ml-0;
    }

    .DocSearch-Button-Placeholder {
      display: inherit;
    }
  }

  &.slim {
    @screen md {
      .DocSearch.DocSearch-Button {
        height: 30px;
      }
    }
  }
}

.DocSearch-Title {
  @apply text-black;
}

html.dark {
  .DocSearch-Title {
    @apply text-white;
  }
}

.DocSearch-Input:focus {
  @apply ring-0 ring-transparent;
}

// https://github.com/algolia/docsearch/blob/97b279a334e7debc06bfea3b283810b3685b683c/packages/docsearch-css/src/_variables.css

:root {
  --docsearch-primary-color: theme(colors.blue.500);
  --docsearch-highlight-color: var(--docsearch-primary-color);
  --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color);
}

html.dark {
  --docsearch-primary-color: theme(colors.blue.600);
  --docsearch-text-color: theme(colors.gray.200);
  --docsearch-container-background: rgba(3, 3, 3, 0.8);
  --docsearch-modal-background: theme(colors.dark-gray.950);
  --docsearch-modal-shadow: inset 1px 1px 0 0 rgb(44, 46, 64),
    0 3px 8px 0 rgb(0, 3, 9);
  --docsearch-searchbox-background: theme(colors.dark-gray.900);
  --docsearch-searchbox-focus-background: #000;
  --docsearch-hit-color: theme(colors.gray.200);
  --docsearch-hit-shadow: none;
  --docsearch-hit-background: theme(colors.dark-gray.975);
  --docsearch-key-gradient: linear-gradient(
    -26.5deg,
    rgb(86, 88, 114) 0%,
    rgb(49, 53, 91) 100%
  );
  --docsearch-key-shadow: inset 0 -2px 0 0 rgb(40, 45, 85),
    inset 0 0 1px 1px rgb(81, 87, 125), 0 2px 2px 0 rgba(3, 4, 9, 0.3);
  --docsearch-footer-background: theme(colors.dark-gray.900);
  --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5),
    0 -4px 8px 0 rgba(0, 0, 0, 0.2);
  --docsearch-logo-color: rgb(255, 255, 255);
  --docsearch-muted-color: theme(colors.gray.400);
}
