@import 'bootstrap/custom-bootstrap-variables';
@import 'bootstrap/scss/mixins/breakpoints';
@import 'bootstrap/scss/mixins/grid';

@import 'mixins/type';
@import 'mixins/icon';

@svg-load arrow url( 'chevron-right.svg' ) {
  fill: rgb(20, 21, 20);
}


.navigation--secondary {
  display: none;

  > .block-title {
    margin: 0;
    font-size: 20px;
    font-weight: $font-weight-bold;
    color: $body-color;
    @include font-smoothing;

    ~ .menu {
      margin-top: $spacer;
      border-top: 1px solid $border-color;
    }
  }


  .menu { 
    margin-left: 0;
    padding: 0;
    border-top: 1px solid $border-color;
    //border-bottom: 1px solid $gray-200;
    font-size: 1rem;

    .menu {
      font-size: .9rem;
    }
    
    .menu__item {
      width: 100%;
    }
  }

  .menu__item + .menu__item {
    //border-top: 1px solid $gray-200;
  }
  
  .menu__item {    
    &.is-collapsed > .menu__link::after {
      content: '';
      background-image: svg-inline(arrow);
    }
    
    &.menu-item-is-unpublished {
      background: repeating-linear-gradient(-45deg, rgba($warning,0.15), rgba($warning,0.15) 0.625rem, rgba($warning,0.1) 0.625rem, rgba($warning,0.1) 1.25rem);
    
    }
  }

  .menu__link {
    padding: calc(#{$spacer} * .85) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-decoration: none;
    color: $body-color;
    border-bottom: 1px solid $border-color;
    
    &::after {
      width: 1.2em;
      height: 1.2em;
      display: block;
      background-repeat: no-repeat;
      background-position: right center;
      background-size: contain;
    }
    
    &:focus {
      background-color: rgba($a11y-focus-color, 0.2);
    }
    
    @media (hover: hover) {
      &:hover, &:active {
        border-bottom-color: rgba(0,0,0,.35);
        background-color: transparent;
      }
    }    

    &.is-active {
      font-weight: $font-weight-bold;
      border-bottom-color: rgba(0,0,0,.8);
    }
  }
  
  .menu .menu .menu__link {
    padding-left: calc(#{$spacer} * 2);
  }
  
}

@include media-breakpoint-up(lg) {
  .navigation--secondary {
    display: block;
  }
}