.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  color: #c3c9c3;
}

.nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  transition: color 180ms ease;
}

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

.nav-dropdown summary:hover,
.nav-dropdown[open] summary,
.nav-dropdown:focus-within summary {
  color: var(--green);
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0.8;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown:focus-within .dropdown-chevron {
  opacity: 1;
}

.nav-dropdown[open] .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: -14px;
  display: none;
  min-width: 260px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #343a34;
  border-radius: 11px;
  background: #191c19;
  box-shadow: 0 18px 45px #0008;
}

.nav-dropdown-panel::before {
  position: absolute;
  top: -7px;
  right: 0;
  left: 0;
  height: 8px;
  content: '';
}

.nav-dropdown[open] .nav-dropdown-panel,
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: grid;
}

.nav-dropdown-panel a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border-radius: 7px;
  color: #d3d9d3;
  font-size: 12px;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a:focus-visible {
  outline: none;
  background: #49cd8a12;
  color: var(--green);
}

.nav-dropdown-panel .nav-dropdown-all {
  margin-bottom: 4px;
  border-bottom: 1px solid #303630;
  border-radius: 7px 7px 0 0;
  color: var(--green);
  font-weight: 800;
}

.nav-dropdown-panel .nav-dropdown-all span {
  font-size: 15px;
}

.nav-links.open .nav-dropdown {
  display: grid;
  width: 100%;
}

.nav-links.open .nav-dropdown summary {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.nav-links.open .nav-dropdown-panel {
  position: static;
  min-width: 0;
  max-height: none;
  padding: 0 0 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-links.open .nav-dropdown-panel::before {
  display: none;
}

.nav-links.open .nav-dropdown-panel .nav-dropdown-all {
  border-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown summary,
  .dropdown-chevron,
  .nav-dropdown-panel a {
    transition: none;
  }
}
