.sideNav {
  display: block;
  block-size: calc(100vh - 60px);
  inline-size: 80px;
  overflow-x: hidden;
  position: sticky;
  inset-inline-start: 0;
  inset-block-start: 60px;
  z-index: 3;
  box-shadow: 1px -1px 1px -1px var(--primary-shadow-color);
  background-color: var(--side-nav-color);
  transition-property: inline-size;
  transition-duration: 150ms;
  transition-timing-function: ease-in-out;
  user-select: none;
}

.inner {
  block-size: 100%;
  inline-size: 80px;
  overflow: hidden auto;
}

.topNavOption {
  margin-block-start: 10px;
}

.navOption,
.navChannel {
  position: relative;
  padding: 5px;
  min-block-size: 35px;
}

.moreOption {
  display: none;
}

.navOption {
  display: block;
  color: inherit;
  text-decoration: inherit;
  padding-block: 5px;
  padding-inline: 0;
  -webkit-user-drag: none;
}

.channelLink {
  display: block;
  color: inherit;
  text-decoration: inherit;
}

.navOption:hover,
.navChannel:hover {
  background-color: var(--side-nav-hover-color);
  color: var(--side-nav-hover-text-color);
  transition: background 0.2s ease-in;
}

.navOption:active,
.navChannel:active {
  background-color: var(--side-nav-active-color);
  color: var(--side-nav-active-text-color);
  transition: background 0.2s ease-in;
}

.navIcon {
  block-size: 1em;
  inline-size: 100%;
  display: block;
}

.navIcon.fa-user-check {
  /* Align icon according to torso */
  transform: translateX(0.2em);
}

.navLabel {
  text-align: center;
  inset-inline-start: 0;
  font-size: 11px;
  margin-block-end: 0;
}

.navOption .navLabel {
  overflow: hidden;
  overflow-wrap: break-word;
}

.navChannel .navLabel {
  overflow: hidden;
  /* stylelint-disable-next-line liberty/use-logical-spec */
  margin-left: 40px;
  overflow-wrap: break-word;
  font-size: 12px;
}

/* stylelint-disable liberty/use-logical-spec */
:global(body[dir='rtl'] .navChannel .navLabel) {
  margin-left: initial;
  margin-right: 40px;
}
/* stylelint-enable liberty/use-logical-spec */

.thumbnailContainer {
  inline-size: 35px;
  display: block;
  margin: 0;
  position: static;
  text-align: center;
  transform: none;
  float: none;
  margin-inline: auto;
  inset-block-start: 0;
  margin-block: 0.3em;
}

.channelThumbnail {
  border-radius: 50%;
  vertical-align: middle;
}

.noThumbnail {
  /* font-size is used for font-icon */
  font-size: 35px;
}

.sideNav hr {
  inline-size: 90%;
  block-size: 1px;
  border: 0;
  background-color: var(--primary-color);
}

.refreshIcon {
  display: none;
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 20px;
}

.hiddenLabels {
  inline-size: 60px;
}

.hiddenLabels .navLabel {
  display: none;
}

.navIconExpand {
  block-size: 1.3em;
}

@media only screen and (width > 680px) {
  ::-webkit-scrollbar {
    inline-size: 10px;
    block-size: 10px;
  }

  .opened {
    inline-size: 200px;
  }

  .opened .inner {
    inline-size: 200px;
  }

  .opened .refreshIcon {
    display: block;
  }

  .opened .navIcon {
    inline-size: 1.25em;
    margin-inline-start: 10px;
  }

  .opened .navIcon.fa-user-check {
    block-size: 1em;
  }

  .opened .navOption {
    padding-inline: 5px;
  }

  .opened .navLabel {
    text-align: start;
    margin-inline-start: 40px;
    margin-block-end: 16px;
    font-size: 16px;
  }

  .opened .channelLink {
    display: flex;
    align-items: center;
  }

  .opened .navChannel .navLabel {
    font-size: 12px;
    flex-grow: 1;
    margin: 0;
  }

  .opened .thumbnailContainer {
    inset-block-start: 50%;
    position: absolute;
    transform: translateY(-50%);
    margin-block: 0;
  }

  .opened .navChannel .thumbnailContainer {
    position: static;
    transform: none;
    margin: 5px;
  }

  .opened.hiddenLabels .navLabel {
    display: block;
  }
}

@media only screen and (width <= 680px) {
  .inner {
    display: contents; /* sunglasses emoji */
  }

  hr,
  .mobileHidden,
  .refreshIcon {
    display: none;
  }

  .sideNav {
    inset-inline-start: 0;
    position: fixed;
    display: flex;
    margin-block-start: 0;
    block-size: 60px;
    inline-size: 100%;
    inset-block: auto 0;
    overflow-y: hidden;
  }

  .topNavOption {
    margin-block-start: 0;
    padding-inline: 10px;
  }

  .navLabel {
    margin-inline: 0;
    inline-size: 100%;
    text-align: center;
    inset-inline-start: 0;
    font-size: 11px;
  }

  .moreOption {
    display: block;
  }

  .navOption {
    inline-size: 70px;
    block-size: 40px;
    padding: 0;
    padding-block: 10px;
  }

  .hiddenLabels {
    inline-size: 100%;
  }
}

@media only screen and (width <= 400px) {
  /* Hide settings so that they appear in the more dropdown on smaller screens */
  .smallMobileOnlyHidden {
    display: none;
  }
}

@media only screen and (width > 400px) {
  .smallMobileOnlyHidden {
    display: block;
  }
}

