// Copyright 2020 Energinet DataHub A/S
//
// Licensed under the Apache License, Version 2.0 (the "License2");
// 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.
@use "@energinet-datahub/watt/utils" as watt;

watt-nav-list {
  background-color: var(--watt-sidenav-background-color);

  watt-nav-list-item {
    display: block;

    a {
      @include watt.space-inset-squish-m;
      display: block;
      border-left: var(--watt-space-xs) solid transparent;
      color: var(--watt-color-neutral-white);
      text-decoration: none;
    }

    a:hover,
    a.active {
      background-color: var(--watt-nav-list-hover-background-color);
    }

    a.active {
      border-left-color: var(--watt-color-secondary);
    }
  }

  &.watt-nav-list--expandable {
    .mat-expansion-panel {
      background-color: var(--watt-sidenav-background-color);
      border-radius: 0;
    }

    .mat-expansion-panel-header.mat-expanded:hover,
    .mat-expansion-panel:not(.mat-expanded)
      .mat-expansion-panel-header:hover:not([aria-disabled="true"]) {
      background-color: var(--watt-nav-list-hover-background-color);
    }

    .mat-expansion-panel-header {
      padding-left: calc(var(--watt-space-xs) + var(--watt-space-m));
      height: 40px;
    }

    .mat-expansion-panel-header-title {
      color: var(--watt-color-neutral-white);
    }

    .mat-expansion-indicator::after {
      color: var(--watt-color-neutral-white);
      position: relative;
      top: -3px;
    }

    .mat-expansion-panel-body {
      padding: 0;
    }

    watt-nav-list-item a {
      padding-left: var(--watt-space-l);
    }
  }
}
