/* Baiqi Studio - shared site navigation.
   Holds the Docs dropdown, used by every page (index / docs / docs-tools / support).
   Loaded after styles.css on each page. */

.nav-dropdown {
  position: relative;
}

/* Styled to sit in the nav row exactly like a plain nav link, so the topbar keeps one rhythm. */
.nav-dropdown-summary {
  align-items: center;
  color: #526158;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 7px;
  list-style: none;
  transition: color .18s ease;
}

.nav-dropdown-summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-summary:hover,
.nav-dropdown[open] .nav-dropdown-summary,
.nav-dropdown-summary[data-active="true"] {
  color: #598726;
}

.nav-dropdown-caret {
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  height: 5px;
  transform: translateY(-1px) rotate(45deg);
  transition: transform .18s ease;
  width: 5px;
}

.nav-dropdown[open] .nav-dropdown-caret {
  transform: translateY(1px) rotate(225deg);
}

.nav-dropdown-menu {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 14px 34px rgba(19, 35, 27, .13);
  display: grid;
  gap: 2px;
  left: 50%;
  min-width: 208px;
  padding: 7px;
  position: absolute;
  top: calc(100% + 14px);
  transform: translateX(-50%);
  z-index: 40;
}

.nav-dropdown-menu a {
  border-radius: 7px;
  color: #3d4b41;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 11px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: #f2f7ec;
  color: #43661f;
}

.nav-dropdown-menu a[aria-current="page"] {
  background: #eef4e7;
  color: #3f6120;
}

.nav-dropdown-note {
  color: #78877c;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}

/* Small pointer under the summary, so the panel reads as attached to it. */
.nav-dropdown-menu::before {
  background: white;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  content: "";
  height: 9px;
  left: 50%;
  position: absolute;
  top: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
}

@media (max-width: 640px) {
  /* Inside the hamburger panel the menu is not a popover: it is simply indented links. */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-summary {
    border-bottom: 1px solid #e7ece7;
    font-size: 13px;
    justify-content: space-between;
    padding: 13px 0;
    width: 100%;
  }

  .nav-dropdown-menu {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    left: auto;
    min-width: 0;
    padding: 0 0 6px 14px;
    position: static;
    transform: none;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown-menu a {
    border-bottom: 1px solid #f0f3ef;
    font-size: 12.5px;
    padding: 11px 0;
  }

  .nav-dropdown-note {
    display: none;
  }
}
