// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC

@use "common/refactor/common-refactor.scss" as *;

.dashboard-sidebar {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  padding-block-start: $s-16;
  border-right: $s-1 solid var(--panel-border-color);
  z-index: $z-index-1;
  background-color: var(--panel-background-color);
}

.sidebar-content {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100%;
  padding: 0;
  overflow-y: auto;
}

.sidebar-separator {
  border-color: transparent;
  margin: $s-12 $s-16;
}

.sidebar-nav-settings {
  display: grid;
  grid-auto-rows: auto;
  margin: 0;
  overflow: unset;
  user-select: none;
}

.settings-item {
  --settings-foreground-color: var(--menu-foreground-color-rest);
  --settings-background-color: transparent;
  display: flex;
  align-items: center;
  padding: $s-8 $s-8 $s-8 $s-24;
  color: var(--settings-foreground-color);
  background-color: var(--settings-background-color);
  cursor: pointer;

  &:hover {
    --settings-foreground-color: var(--sidebar-element-foreground-color-hover);
    --settings-background-color: var(--sidebar-element-background-color-hover);
  }

  &.current {
    --settings-foreground-color: var(--sidebar-element-foreground-color-selected);
    --settings-background-color: var(--sidebar-element-background-color-selected);
  }
}

.feedback-icon {
  @extend .button-icon-small;
  stroke: var(--settings-foreground-color);
  margin-right: $s-8;
}

.element-title {
  @include textEllipsis;
  @include bodyMediumTypography;
}

.back-to-dashboard {
  @include buttonStyle;
  display: flex;
  align-items: center;
  padding: $s-12 $s-16;
  font-size: $fs-14;
}

.back-text {
  color: $df-primary;
}

.arrow-icon {
  @extend .button-icon;
  stroke: var(--icon-foreground);
  transform: rotate(180deg);
  margin-right: $s-12;
}
