/* CompHelp Marketplace compact accordion navigation */
.nav {
  display: grid;
  gap: .46rem;
  align-content: start;
}

.nav-group {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .012));
  overflow: hidden;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.nav-group:hover {
  border-color: rgba(255, 255, 255, .14);
  transform: translateY(-1px);
}

.nav-group.is-open {
  border-color: rgba(37, 225, 177, .22);
  background: linear-gradient(145deg, rgba(37, 225, 177, .075), rgba(125, 178, 255, .025));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
}

.nav-group.has-active:not(.is-open) {
  border-color: rgba(37, 225, 177, .16);
  box-shadow: inset 3px 0 var(--accent);
}

.nav .nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  min-height: 58px;
  padding: .55rem .62rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  overflow: visible;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.nav .nav-group-toggle:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, .035);
}

.nav-group-main,
.nav-group-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-group-main {
  gap: .62rem;
}

.nav-group-main > span:last-child {
  min-width: 0;
}

.nav-group-main strong,
.nav-group-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-main strong {
  color: #f1f7f6;
  font-size: .78rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.nav-group-main small {
  margin-top: .2rem;
  color: #71808d;
  font-size: .61rem;
  font-weight: 700;
}

.nav-group-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  color: #8e9ca8;
  font-size: .58rem;
  font-weight: 950;
  letter-spacing: .04em;
  transition: color .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.nav-group.is-open .nav-group-icon,
.nav-group.has-active .nav-group-icon {
  border-color: rgba(37, 225, 177, .3);
  background: linear-gradient(135deg, rgba(37, 225, 177, .18), rgba(125, 178, 255, .09));
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 225, 177, .045), 0 7px 18px rgba(0, 0, 0, .2);
}

.nav-group.is-open .nav-group-icon {
  animation: navIconWake .42s ease-out backwards;
}

.nav-group-meta {
  flex: 0 0 auto;
  gap: .38rem;
}

.nav-group-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .35rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: linear-gradient(145deg, #ff718b, #db3e64);
  color: #fff;
  font-size: .62rem;
  line-height: 1;
  box-shadow: 0 5px 15px rgba(219, 62, 100, .28);
}

.nav-group-badge[hidden] {
  display: none;
}

.nav-chevron {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #677783;
  font-size: 1.18rem;
  font-weight: 500;
  transform: rotate(0deg);
  transition: color .25s ease, transform .32s cubic-bezier(.2, .8, .2, 1);
}

.nav-group.is-open .nav-chevron {
  color: var(--accent);
  transform: rotate(90deg);
}

.nav-group-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows .34s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, visibility 0s linear .34s;
}

.nav-group.is-open .nav-group-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows .34s cubic-bezier(.2, .8, .2, 1), opacity .28s ease .05s, visibility 0s linear 0s;
}

.nav-group-items {
  display: grid;
  min-height: 0;
  gap: .16rem;
  padding: 0 .45rem;
  overflow: hidden;
}

.nav-group.is-open .nav-group-items {
  padding-bottom: .48rem;
}

.nav .nav-group-items > button {
  position: relative;
  min-width: 0;
  min-height: 34px;
  padding: .47rem .62rem .47rem 1.22rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #8e9ba6;
  font-size: .7rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.nav .nav-group-items > button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: .55rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4f5e69;
  transform: translateY(-50%);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.nav .nav-group-items > button:hover {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .04);
  color: #f4f8f7;
  transform: translateX(2px);
}

.nav .nav-group-items > button.is-active {
  border-color: rgba(37, 225, 177, .24);
  background: linear-gradient(90deg, rgba(37, 225, 177, .13), rgba(37, 225, 177, .035));
  color: #effffb;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.nav .nav-group-items > button.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 225, 177, .1), 0 0 10px rgba(37, 225, 177, .55);
  transform: translateY(-50%) scale(1.15);
}

.nav-group.is-open .nav-group-items > button {
  animation: navItemIn .3s cubic-bezier(.2, .8, .2, 1) backwards;
}

.nav-group.is-open .nav-group-items > button:nth-child(2) { animation-delay: .025s; }
.nav-group.is-open .nav-group-items > button:nth-child(3) { animation-delay: .05s; }
.nav-group.is-open .nav-group-items > button:nth-child(4) { animation-delay: .075s; }
.nav-group.is-open .nav-group-items > button:nth-child(5) { animation-delay: .1s; }
.nav-group.is-open .nav-group-items > button:nth-child(6) { animation-delay: .125s; }
.nav-group.is-open .nav-group-items > button:nth-child(7) { animation-delay: .15s; }
.nav-group.is-open .nav-group-items > button:nth-child(8) { animation-delay: .175s; }
.nav-group.is-open .nav-group-items > button:nth-child(9) { animation-delay: .2s; }
.nav-group.is-open .nav-group-items > button:nth-child(10) { animation-delay: .225s; }

.nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

section[data-view].is-active {
  animation: workspaceViewIn .42s cubic-bezier(.2, .8, .2, 1) backwards;
}

@keyframes navItemIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes navIconWake {
  0% { opacity: .55; transform: scale(.86) rotate(-7deg); }
  65% { transform: scale(1.06) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes workspaceViewIn {
  from { opacity: 0; transform: translateY(9px); filter: saturate(.75); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 900px) {
  .nav {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-top: .7rem;
    padding: 0 0 .45rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
  }

  .nav-group {
    flex: 0 0 186px;
    scroll-snap-align: start;
  }

  .nav-group.is-open {
    flex-basis: min(82vw, 300px);
  }

  .nav .nav-group-toggle {
    width: 100%;
    min-height: 54px;
  }

  .nav-group-items {
    max-height: 34vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav .nav-group-items > button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .side {
    max-height: 48vh;
    overflow-y: auto;
  }

  .nav-group {
    flex-basis: 172px;
  }

  .nav-group.is-open {
    flex-basis: min(88vw, 290px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-group,
  .nav-group-toggle,
  .nav-group-icon,
  .nav-chevron,
  .nav-group-panel,
  .nav-group-items > button,
  .nav-group-items > button::before,
  section[data-view].is-active {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .nav-group:hover,
  .nav .nav-group-items > button:hover {
    transform: none;
  }
}
