.bq-help-wrap {
  --bq-help-ink: #17334b;
  --bq-help-accent: #b78628;
  --bq-help-paper: #fffdf8;
  --bq-help-border: #d8d2c7;
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.38rem;
  vertical-align: middle;
}

.bq-help-button {
  appearance: none;
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bq-help-ink);
  cursor: help;
  opacity: 0.72;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.bq-help-button:hover,
.bq-help-button:focus-visible,
.bq-help-button[aria-expanded="true"] {
  background: var(--bq-help-accent);
  box-shadow: 0 0 0 4px rgb(183 134 40 / 14%);
  color: #fff;
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}

.bq-help-icon {
  display: block;
  width: 1.18rem;
  height: 1.18rem;
  overflow: visible;
  pointer-events: none;
}

.bq-help-tooltip {
  position: absolute;
  z-index: 10000;
  inset-block-end: calc(100% + 0.55rem);
  inset-inline-start: 50%;
  width: max-content;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--bq-help-border);
  border-radius: 0.65rem;
  background: var(--bq-help-paper);
  box-shadow: 0 12px 28px rgb(23 51 75 / 16%);
  color: var(--bq-help-ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: start;
  transform: translate(-50%, 0.25rem);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.bq-help-tooltip::after {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-inline-end: 1px solid var(--bq-help-border);
  border-block-end: 1px solid var(--bq-help-border);
  background: var(--bq-help-paper);
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.bq-help-wrap:hover .bq-help-tooltip,
.bq-help-wrap:focus-within .bq-help-tooltip,
.bq-help-button[aria-expanded="true"] + .bq-help-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

@media (max-width: 520px) {
  .bq-help-tooltip {
    inset-inline-start: auto;
    inset-inline-end: -0.5rem;
    max-width: min(18rem, calc(100vw - 2rem));
    transform: translateY(0.25rem);
  }

  .bq-help-tooltip::after {
    inset-inline-start: auto;
    inset-inline-end: 0.78rem;
    transform: translateY(-50%) rotate(45deg);
  }

  .bq-help-wrap:hover .bq-help-tooltip,
  .bq-help-wrap:focus-within .bq-help-tooltip,
  .bq-help-button[aria-expanded="true"] + .bq-help-tooltip {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bq-help-button,
  .bq-help-tooltip {
    transition: none;
  }
}
