// Styles for the mobile scrollable navbar

.td-navbar-container {
  &.navbar-is-overflowing {
    padding: 0;
  }
}

@include media-breakpoint-down(lg) {
  .td-navbar-nav-scroll {
    max-width: 100%;
    height: 2.5rem;
    overflow: hidden;
    font-size: 0.9rem;
  }

  .navbar-brand {
    margin-right: 0;
  }

  .navbar-nav {
    // padding-bottom: 2rem;
    overflow-x: auto;
  }
}

@include media-breakpoint-up(md) {
  .td-navbar-nav-scroll {
  margin-left: auto !important;
  }
}

.td-navbar-nav-scroll--indicator {
  display: flex;
  flex-direction: row;
  align-items: center;

  .scroll-indicator {
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0;

    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 100%;

    // Scroll indicators are centered relative to navbar-nav, including the
    // scrollbar when the navbar is overflowing. The following padding moves the
    // scroll indicators a bit higher, to visually centering them relative to
    // the navbar-nav without the scrollbar.
    padding-bottom: .25rem;

    &.scroll-left {
      &::before {
        font: var(--fa-font-solid);
        content: fa-content($fa-var-chevron-left);
        color: var(--bs-navbar-active-color);
      }
    }

    &.scroll-right {
      &::before {
        font: var(--fa-font-solid);
        content: fa-content($fa-var-chevron-right);
        color: var(--bs-navbar-active-color);
      }
    }

    &.visible {
      opacity: 1;
      pointer-events: auto;
    }
  }

  // Customize the scrollbar appearance.
  .navbar-nav {
    &::-webkit-scrollbar {
      height: 4px;
    }

    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba($white, 0.3);
      border-radius: 2px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: rgba($white, 0.5);
    }

    // Firefox scrollbar
    scrollbar-width: thin;
    scrollbar-color: rgba($white, 0.3) transparent;
  }

}
