/* ⌘K search modal and Ask AI (CrawlChat) chrome; reads Material's theme tokens. */

/* Material's own search box stays hidden; the modal replaces it. */
.md-header .md-search,
.md-header .md-header__button[for="__search"] {
  display: none;
}

/* The language menu is the last header control; centred, it ran past a phone's edge. */
.md-header .md-select__inner {
  left: auto;
  right: 0;
  transform: translate3d(0, 0.3rem, 0);
}
.md-header .md-select:focus-within .md-select__inner,
.md-header .md-select:hover .md-select__inner {
  transform: translate3d(0, 0, 0);
}
.md-header .md-select__inner::after {
  left: auto;
  right: 1rem;
}

.rbln-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* the product toggle's height */
  height: calc(var(--ui-fs-mono) * var(--ui-lh-control) + 2 * var(--sp-4) + 2 * var(--ui-hairline-w));
  padding: 0 0.6rem 0 0.5rem;
  margin-left: 0.4rem;
  border: var(--ui-hairline-w) solid var(--rcp-chip-bd);
  border-radius: var(--ui-radius-sm);
  background: var(--rcp-surface2);
  color: var(--rcp-text);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  white-space: nowrap;
}
.rbln-search-trigger:hover {
  border-color: var(--rcp-accent);
}
.rbln-search-trigger kbd {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.55rem;
  padding: 1px 5px;
  border: var(--ui-hairline-w) solid var(--rcp-chip-bd);
  border-radius: 2px;
  color: var(--rcp-muted);
}
@media (max-width: 59.9em) {
  .rbln-search-trigger .rbln-search-trigger__label,
  .rbln-search-trigger kbd {
    display: none;
  }
  .rbln-search-trigger {
    margin-left: 0;
    padding: 0 0.4rem;
  }
  .rbln-search__ask-body span {
    display: none;
  }
}

.rbln-search[hidden] {
  display: none;
}
.rbln-search {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  background: rgba(10, 12, 16, 0.55);
  backdrop-filter: blur(2px);
  font-family: var(--md-text-font-family, system-ui, sans-serif);
  color: var(--md-default-fg-color, #1b1f27);
}
.rbln-search__dialog {
  width: min(760px, 100%);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--md-default-bg-color, #fff);
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.rbln-search__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--md-default-fg-color--lightest, #e5e8ee);
}
.rbln-search__bar svg {
  flex: none;
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: inherit;
}
.rbln-search__scope {
  font-size: 0.55rem;
  padding: 2px 7px;
  border-radius: 2px;
  background: var(--md-code-bg-color, #f2f4f8);
  color: var(--md-default-fg-color--light, #6b7280);
  white-space: nowrap;
}
.rbln-search__bar kbd {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.55rem;
  padding: 1px 6px;
  border: 1px solid var(--md-default-fg-color--lightest, #d7dbe3);
  border-bottom-width: 2px;
  border-radius: 2px;
  color: var(--md-default-fg-color--light, #6b7280);
  cursor: pointer;
  background: none;
}

.rbln-search__facets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--md-default-fg-color--lightest, #e5e8ee);
  font-size: 0.6rem;
}
.rbln-search__facets:empty {
  display: none;
}
.rbln-search__flabel {
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light, #6b7280);
  margin-right: 2px;
}
.rbln-search__chip {
  font: inherit;
  font-size: 0.6rem;
  padding: 3px 10px;
  border-radius: 2px;
  border: 1px solid var(--md-default-fg-color--lightest, #d7dbe3);
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color, #1b1f27);
  cursor: pointer;
  white-space: nowrap;
}
.rbln-search__chip[aria-pressed="true"] {
  background: var(--md-primary-fg-color, #000);
  border-color: var(--md-primary-fg-color, #000);
  color: var(--md-primary-bg-color, #fff);
}
.rbln-search__chip:focus-visible {
  outline: 2px solid var(--md-accent-fg-color, #526cfe);
  outline-offset: 2px;
}
.rbln-search__chip b {
  font-family: var(--md-code-font-family, monospace);
  font-weight: 400;
  font-size: 0.5rem;
  opacity: 0.7;
  margin-left: 4px;
}

.rbln-search__results {
  overflow-y: auto;
  padding: 4px 0 10px;
  flex: 1;
  min-height: 0;
}
.rbln-search__close {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.rbln-search__close-x {
  display: none;
}

.rbln-search__picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 14px 4px;
}
.rbln-search__pick {
  font: inherit;
  font-size: 0.6rem;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--md-default-fg-color--lightest, #d7dbe3);
  background: none;
  color: var(--md-default-fg-color, #1b1f27);
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rbln-search__pick:hover {
  border-color: var(--md-accent-fg-color, #526cfe);
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__group-act {
  all: unset;
  margin-left: auto;
  order: 2;
  font-weight: 400;
  cursor: pointer;
}
.rbln-search__group-act:hover {
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__empty--idle {
  padding: 16px 16px 4px;
}

html.rbln-search-open [id^="appzi-"],
html.rbln-askai-open [id^="appzi-"] {
  display: none !important;
}

@media (hover: none) and (pointer: coarse) {
  .rbln-search__close kbd,
  .rbln-search__foot > span:first-child {
    display: none;
  }
  .rbln-search__close-x {
    display: block;
  }
  .rbln-search__close {
    width: 40px;
    height: 40px;
    margin: -8px -8px -8px 0;
    color: var(--md-default-fg-color--light, #6b7280);
  }
  .rbln-search__chip,
  .rbln-search__pick,
  .rbln-search__more {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
  .rbln-search__sub {
    line-height: 26px;
  }
  .rbln-search__swap {
    display: flex;
  }
}
@media (max-width: 59.9em) {
  .rbln-search {
    padding: 0;
    align-items: stretch;
  }
  .rbln-search__dialog {
    width: 100%;
    max-height: none;
    height: 100vh;
    /* --rbln-vvh: the visual viewport, which a phone keyboard shrinks and dvh ignores */
    height: var(--rbln-vvh, 100dvh);
    border-radius: 0;
  }
}

.rbln-search__group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 4px;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__group::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--md-default-fg-color--lightest, #e5e8ee);
}
.rbln-search__group b {
  font-weight: 400;
}
.rbln-search__group--pin {
  color: #a4501a;
}
.rbln-search__group--pin::after {
  background: #f0d3b6;
}
.rbln-search__why {
  padding: 2px 14px 8px;
  font-size: 0.56rem;
  line-height: 1.45;
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__more {
  font: inherit;
  font-size: 0.6rem;
  margin: 2px 14px 6px;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--md-default-fg-color--lightest, #d7dbe3);
  background: none;
  color: var(--md-default-fg-color--light, #6b7280);
  cursor: pointer;
}
/* Locale switch: blank on the way out, and on arrival until the search has painted. */
html.rbln-leaving body > *,
html.rbln-resume body > * {
  opacity: 0 !important;
}

.rbln-search__swap {
  display: block;
  margin: 4px auto 10px;
}
.rbln-search__more:hover {
  border-color: var(--md-accent-fg-color, #526cfe);
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__more:focus-visible {
  outline: 2px solid var(--md-accent-fg-color, #526cfe);
  outline-offset: 2px;
}

.rbln-search__ask {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 20px);
  margin: 8px 10px 4px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--md-default-fg-color--lightest, #e5e8ee);
  border-radius: 4px;
  background: var(--md-code-bg-color, #f6f7f9);
  color: inherit;
  cursor: pointer;
}
.rbln-search__ask:hover,
.rbln-search__ask:focus-visible {
  border-color: var(--md-accent-fg-color, #526cfe);
  outline: none;
}
.rbln-search__ask-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--md-default-bg-color, #fff);
  border: 1px solid var(--md-default-fg-color--lightest, #e5e8ee);
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__ask-action {
  flex: none;
  font-size: 0.56rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--md-default-fg-color--lighter, #c2c7d0);
  color: var(--md-default-fg-color, #1b1f27);
  white-space: nowrap;
}
.rbln-search__ask:hover .rbln-search__ask-action,
.rbln-search__ask:focus-visible .rbln-search__ask-action {
  border-color: var(--md-accent-fg-color, #526cfe);
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__ask-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.rbln-search__ask-body b {
  font-size: 0.68rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.rbln-search__ask-body span {
  font-size: 0.56rem;
  line-height: 1.4;
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__hit {
  display: block;
  padding: 7px 14px;
  border-left: 2px solid transparent;
  color: inherit;
  text-decoration: none;
}
.rbln-search__hit:hover,
.rbln-search__hit[aria-selected="true"] {
  background: var(--md-code-bg-color, #f2f4f8);
  border-left-color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__hit--model {
  border-left-color: #2ea043;
}
.rbln-search__hit--key {
  border-left-color: #6a7fdb;
}
.rbln-search__hit--err {
  border-left-color: #d1495b;
}
.rbln-search__hit--pin {
  border-left-color: #d98a45;
  background: #fdf6ef;
}
.rbln-search__hit-title {
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.rbln-search__hit-title mark {
  background: var(--md-accent-fg-color--transparent, rgba(82, 108, 254, 0.14));
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.rbln-search__subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 4px 0 2px;
}
.rbln-search__sub {
  font-size: 0.58rem;
  line-height: 1.5;
  padding: 0 6px;
  border: 1px solid var(--md-default-fg-color--lightest, #e5e7eb);
  border-radius: 2px;
  color: var(--md-default-fg-color--light, #6b7280);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rbln-search__sub::before {
  content: "\00a7 ";
  opacity: 0.6;
}
.rbln-search__sub:hover {
  border-color: var(--md-accent-fg-color, #526cfe);
  color: var(--md-accent-fg-color, #526cfe);
}
.rbln-search__sub mark {
  background: none;
  color: inherit;
  font-weight: 600;
}

.rbln-search__hit-arch {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__hit-crumb {
  font-size: 0.55rem;
  color: var(--md-default-fg-color--light, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.rbln-search__hit-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.rbln-search__tag {
  font-size: 0.5rem;
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--md-code-bg-color, #f2f4f8);
  color: var(--md-default-fg-color--light, #6b7280);
}
.rbln-search__hit-heading {
  font-size: 0.6rem;
  color: var(--md-default-fg-color--light, #6b7280);
  margin-top: 2px;
}
.rbln-search__hit-heading::before {
  content: "§ ";
  opacity: 0.6;
}

.rbln-search__empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--md-default-fg-color--light, #6b7280);
  font-size: 0.68rem;
}

.rbln-search__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  border-top: 1px solid var(--md-default-fg-color--lightest, #e5e8ee);
  font-size: 0.55rem;
  color: var(--md-default-fg-color--light, #6b7280);
  flex-wrap: wrap;
}
.rbln-search__foot kbd {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.5rem;
  padding: 0 4px;
  border: 1px solid var(--md-default-fg-color--lightest, #d7dbe3);
  border-radius: 2px;
}

.rbln-search__hit--api {
  border-left-color: #8250df;
}
.rbln-search__hit--section {
  border-left-color: var(--md-default-fg-color--lighter, #9aa0ab);
}
.rbln-search__hit-title code {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.68rem;
  background: none;
  padding: 0;
}
.rbln-search__tag--kind {
  background: #efe6fb;
  color: #6b3fa0;
  font-weight: 600;
}
.rbln-search__hit-sig {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.55rem;
  color: var(--md-default-fg-color--light, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.rbln-search__empty-hint {
  font-size: 0.6rem;
}

.rbln-askai-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  background: rgba(15, 17, 21, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
}
.rbln-askai-open .rbln-askai-backdrop {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.15s ease;
}
/* Closed, the vendor parks its container top-left behind a visibility transition. */
#crawlchat-embed:not(.open) {
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* Below 700px the vendor goes fullscreen, and a backdrop would cover it. */
@media (max-width: 699.98px) {
  .rbln-askai-backdrop {
    display: none;
  }
}
@media (min-width: 700px) {
  #crawlchat-embed.popup.open {
    top: 6vh !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: min(880px, 92vw) !important;
    height: 88vh !important;
    height: 88dvh !important;
    z-index: 2147483000 !important;
    border: 0 !important;
    border-radius: 2px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--md-default-bg-color, #fff) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45) !important;
  }
  #crawlchat-embed.popup.open iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 2px !important;
    background: var(--md-default-bg-color, #fff) !important;
  }
}
.rbln-askai-notice {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2147483100;
  max-width: 90vw;
  padding: 10px 14px;
  border-radius: 2px;
  font: 500 13px/1.4 system-ui, sans-serif;
  background: #1f2937;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
