.chapter-navigation-dropdown {
  position: relative;
}

.chapter-navigation-dropdown__header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: $baseline * 5;
  padding: 12px 0;
  transition: opacity 0.3s;

  .icon {
    flex-shrink: 0;
  }

  svg {
    fill: returnColorCSSVar('brand-primary');
  }

  // Animates the divider
  &:after {
    content: '';
    opacity: 0;
    transition: opacity 0.3s;
  }
}

.chapter-navigation-dropdown__list {
  -ms-overflow-style: -ms-autohiding-scrollbar; // edge hide scrollbar
  list-style: none;
  overflow-y: scroll;
  scrollbar-width: none; // firefox hide scrollbar
  &::-webkit-scrollbar {
    display: none; // chrome, opera, safari hide scrollbar
  }
  z-index: 9;

  &[data-rs-collapsible-content='expanded'] {
    max-height: $baseline * 30 !important;
  }

  // Animates the gradient
  &:after {
    content: '';
    opacity: 0;
    transition: opacity 0.3s linear;
  }
}

.chapter-navigation-dropdown__list-item {
  border-bottom: 1px solid returnColorCSSVar('brand-tertiary-tint-80');
  cursor: pointer;
  min-height: $baseline * 4;
  padding: 15px 5px 15px 0;
  position: relative;

  &:last-child {
    border-bottom: none;
    margin-bottom: $baseline;
  }

  a {
    text-decoration: none;
    transition: all 0.3s;
  }
}
