/**
 *
 * @ai-apps/angular v2.152.0 | _side-nav.scss
 *
 * Copyright 2014, 2023 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


@import './side-nav-carbon';

/////////////////////////////////////////////
// AI applications dark sidenav theme styles
////////////////////////////////////////////
$textColor: $inverse-01;
$selectedBgColor: $inverse-02;
$hoverBgColor: #2c2c2c;

.#{$iot-prefix}--side-nav {
  background: $ui-05;

  .#{$prefix}--side-nav__submenu,
  .#{$prefix}--side-nav__link > .#{$prefix}--side-nav__link-text,
  .#{$prefix}--side-nav__item--active .#{$prefix}--side-nav__submenu-title,
  .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
    > .#{$prefix}--side-nav__link:hover
    > span,
  .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
    .#{$prefix}--side-nav__menu-item
    > .#{$prefix}--side-nav__link:hover
    > span,
  .#{$prefix}--side-nav__menu .#{$prefix}--side-nav__link--current > span,
  .#{$prefix}--side-nav__link--current > span {
    color: $textColor;
  }

  .#{$prefix}--side-nav__icon > svg {
    fill: $textColor;
  }

  .#{$prefix}--side-nav__submenu:hover,
  .#{$prefix}--side-nav__submenu:hover + .#{$prefix}--side-nav__menu,
  [aria-expanded='true'].#{$prefix}--side-nav__submenu,
  [aria-expanded='true'].#{$prefix}--side-nav__submenu + .#{$prefix}--side-nav__menu,
  .#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
    > .#{$prefix}--side-nav__link:hover {
    background-color: $hoverBgColor;
  }

  .#{$prefix}--side-nav__menu .#{$prefix}--side-nav__link--current,
  .#{$prefix}--side-nav__menu .#{$prefix}--side-nav__link[aria-current='page'],
  .#{$prefix}--side-nav__link--current,
  .#{$prefix}--side-nav__menu
    .#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover {
    background-color: $selectedBgColor;
  }

  .#{$prefix}--side-nav__menu
    .#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover,
  &.bx--side-nav__menu .bx--side-nav__link--current > span,
  &.bx--side-nav__menu .bx--side-nav__link[aria-current='page'] > span,
  &.bx--side-nav__link--current > span {
    color: $textColor;
  }

  .#{$prefix}--side-nav__item--active .#{$prefix}--side-nav__submenu[aria-expanded='false'] {
    background-color: $selectedBgColor;
    color: $textColor;
  }

  &.#{$prefix}--side-nav.#{$prefix}--side-nav--rail:not(.#{$prefix}--side-nav--fixed):hover {
    // stylelint-disable-next-line declaration-property-unit-blacklist
    transition: width $duration--fast-01 motion(entrance, productive) 300ms;
  }
}

html[dir='rtl'] {
  .#{$iot-prefix}--side-nav {
    left: unset;
    right: 0;
  }

  .#{$prefix}--side-nav__icon:not(.#{$prefix}--side-nav__submenu-chevron) {
    margin-left: mini-units(3);
    margin-right: unset;
  }
}
