/* Shared by the application and the local documentation portal. */
:root {
  --radiance-search-outline: linear-gradient(115deg, #88bdff, #b3b3ff 25%, #edb5e8 48%, #ffc4bb 73%, #ffad91);
  --radiance-search-surface: var(--td-bg-color-container, var(--vp-c-bg, #fff));
}

html body :is(
  .t-input:has(.t-icon-search),
  .radiance-search .t-input,
  .cmdk__input-row,
  .tenant-dropdown .search-box,
  .kb-search-input,
  .mention-search__box:not(.is-readonly),
  .browser-search-wrap,
  input[type='search'],
  .wk-header-search .DocSearch-Button,
  .search-bar:has(:where(#localsearch-input))
) {
  position: relative;
  --radiance-search-fill: linear-gradient(var(--radiance-search-surface), var(--radiance-search-surface));
  background: var(--radiance-search-fill) padding-box, var(--radiance-search-outline) border-box;
  border-color: transparent !important;
  box-shadow: none;
  transition: box-shadow .2s ease;
}

html body :is(
  .t-input:has(.t-icon-search),
  .radiance-search .t-input,
  .cmdk__input-row,
  .tenant-dropdown .search-box,
  .kb-search-input,
  .mention-search__box:not(.is-readonly),
  .browser-search-wrap,
  input[type='search'],
  .wk-header-search .DocSearch-Button,
  .search-bar:has(:where(#localsearch-input))
):hover {
  box-shadow: 0 0 7px #b3b3ff24;
}

html body :is(
  .t-input:has(.t-icon-search),
  .radiance-search .t-input,
  .cmdk__input-row,
  .tenant-dropdown .search-box,
  .kb-search-input,
  .mention-search__box:not(.is-readonly),
  .browser-search-wrap,
  input[type='search'],
  .wk-header-search .DocSearch-Button,
  .search-bar:has(:where(#localsearch-input))
):is(:focus-within, :focus-visible) {
  outline: none;
  box-shadow: -2px 0 7px #88bdff35, 2px 0 7px #ffad9135;
}

@media (prefers-reduced-motion: no-preference) {
html body :is(
  .t-input:has(.t-icon-search),
  .radiance-search .t-input,
  .cmdk__input-row,
  .tenant-dropdown .search-box,
  .kb-search-input,
  .mention-search__box:not(.is-readonly),
  .browser-search-wrap,
  input[type='search'],
  .wk-header-search .DocSearch-Button,
  .search-bar:has(:where(#localsearch-input))
):is(:focus-within, :focus-visible) {
    animation: radiance-search-breathe 2.8s ease-in-out infinite;
  }
}

@keyframes radiance-search-breathe {
  0%, 100% {
    box-shadow: -1px 0 4px #88bdff30, 1px 0 4px #ffad9130;
  }

  50% {
    box-shadow: -2px 0 9px #88bdff50, 2px 0 9px #ffad9150;
  }
}

/* These composite inputs originally had a divider or no surrounding border. */
html body :is(.cmdk__input-row, .mention-search__box:not(.is-readonly), .browser-search-wrap) {
  border: 1px solid transparent;
  border-radius: var(--app-radius-sm);
}
