.bds-help__button {
  border: none;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  text-decoration: none;
  font-family: var(--bds--font-weight-bold);
  color: var(--bds--help-button--color);
  background-color: var(--bds--help-button--background-color);
  box-shadow: var(--bds--box-shadow);
  transition: var(--bds--transition);
}

.bds-help__button i {
  position: relative;
  top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  aspect-ratio: 1;
  font-size: larger;
}

.bds-help__button > span {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition:
    opacity 0.3s ease,
    max-width 0.3s ease;
  display: inline-block;
}

.bds-help__button > span span {
  padding: 0 1rem 0 0;
}

.bds-help__button.expanded > span,
.bds-help__button:hover > span {
  opacity: 1;
  max-width: 200px;
}

/* The anchored dialog */
.bds-help__dialog {
  border: none;
  border-radius: 16px;
  z-index: 10002;
  display: none;
  width: 420px;
  max-width: min(420px, 90vw);
  margin: 0 0 0 -12px;
  padding: 0;
  background: var(--wp--preset--color--base-1);
  box-shadow: var(--bds--box-shadow-lg);
}

.bds-help__dialog[open] {
  display: block;
}

.bds-help__panel {
  position: relative;
  padding: 0.5em 1.5em;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.bds-help__close {
  border: none;
  border-radius: 999px;
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 10002;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 1;
  color: var(--wp--preset--color--base-1);
  background: var(--wp--preset--color--accent);
  box-shadow: var(--bds--box-shadow);
  cursor: pointer;
}

.bds-help__close::before {
  font: var(--bds--font-family-icons);
  content: "\f00d";
}

.bds-help__nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.bds-help__body {
  overflow: auto;
  max-height: min(60vh, 520px);
}
