@import "../../patternfly.scss";

.ToolbarPageConfig {
  position: relative;
  width: calc(100% + 20px);

  &__collapse-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 45px;
    height: 45px;
    outline: none;
    background-color: $color-black;
    color: $color-white;
    text-align: center;
    box-shadow: none;

    // sass-lint:disable class-name-format nesting-depth
    .fa {
      font-size: 18px;
      font-weight: bold;
      text-align: center;
      vertical-align: middle;
    }

    &:focus {
      outline: none;
      background-color: $color-black;
      color: $color-white;
    }

    &:hover {
      background-color: $color-dragitem-bg;
      color: $color-mid-blue;
    }
    // sass-lint:enable class-name-format nesting-depth
  }

  &__tab-container {
    position: relative;
    height: 100%;
    overflow: auto;
  }

  &__tab-main {
    height: 100%;

    // sass-lint:disable class-name-format force-element-nesting nesting-depth no-qualifying-elements
    ul.nav {
      border-bottom-color: $color-black;
      background-color: $color-dragitem-bg;

      &::before {
        display: block;
        width: 45px;
        height: 45px;
        float: left;
      }

      li {
        min-width: 108px;
        height: 45px;
        background-color: transparent;

        & > a {
          width: 100%;
          padding: 13px 10px;
          border-color: transparent;
          color: $color-white;
          font-size: 12px;
          font-weight: bold;
          text-align: center;

          .fa {
            margin-right: 5px;
            font-size: 18px;
            line-height: 21px;
            vertical-align: middle;
          }

          &:hover {
            border-color: transparent;
            color: $color-mid-blue;

            .fa {
              color: $color-mid-blue;
            }
          }
        }

        &.active {
          border: 1px solid $color-black;
          border-bottom: transparent;
        }

        &.active a {
          height: calc(100% + 1px);
          border-top: 0;
          border-color: transparent;
          background-color: $color-sidebar-dark-bg;
          color: $color-white;

          &:hover {
            color: $color-white;
          }

          .fa {
            color: $color-mid-blue;
          }
        }
      }
    }
    // sass-lint:enable class-name-format force-element-nesting nesting-depth no-qualifying-elements
  }

  &__drawer-pf-sidebar-right {
    height: 100%;
    background-color: $color-sidebar-dark-bg;
    box-shadow: 0 6px 12px rgba(3,3,3,.175);
    z-index: 10;
  }

  &__drawer-pf-sidebar-right-expanded {
    position: fixed;
    right: 0;
    width: calc(100% - 200px);
  }

  &__drawer-pf-sidebar-right-fixed {
    width: 100%;
    height: calc(100vh - 59px);
  }

  &__drawer-pf-title:focus {
    outline: 0;
    text-decoration: none;
  }

  &__drawer-pf-title {
    display: block;
    position: relative;
    width: 100% ;
    padding: 1.2em 0 1.2em 0;
    background: $color-pf-black-700;
    color: $color-pf-black-100;
    font-weight: normal;
  }

  &__right-bar-title {
    margin-left: 19px;
    color: $color-pf-black-100;
    font-size: 15px;
    line-height: 18px;
    text-decoration: none;
    text-transform: capitalize;
    cursor: pointer;
    text-decoration: none;
  }

  &__title {
    margin-left: 10px;
  }

  &__open-button-menu-right {
    position: absolute;
    top: 11px;
    right: 10px;
    color: $color-pf-black-500;
    font-size: 23px;
  }

  &__drawer-pf-container {
    height: calc(100vh - 124px);
    border-top: 1px solid $color-pf-black-200;
    overflow-y: auto;
  }

  &__drawer-pf-container-fixed {
    height: calc(100vh - 59px);
  }
}

.ToolbarPageConfig__collapse-mode {
  width: 48px;

  // sass-lint:disable class-name-format force-element-nesting nesting-depth no-qualifying-elements
  .ToolbarPageConfig__collapse-main {
    width: 48px;

    .fa {
      color: $color-mid-blue;
    }
  }

  .ToolbarPageConfig__tab-container {
    overflow: hidden;
  }

  .ToolbarPageConfig__tab-main {
    width: 48px;

    ul.nav {
      display: flex;
      flex-direction: column;
      border-bottom-color: transparent;

      li {
        min-width: 45px;
        border: transparent;

        span:not([class]) {
          display: none;
        }

        a {
          border: 0;

          .fa {
            margin-right: 0;
            color: $color-white;
            text-align: center;
          }
        }

        &.active a {
          background-color: $color-dragitem-bg;
          cursor: pointer;
        }
      }
    }

    .tab-content {
      display: none;
    }
  }
  // sass-lint:enable class-name-format force-element-nesting nesting-depth no-qualifying-elements
}

.ToolbarPageConfig__drawer-pf-title:hover {
  background: $color-pf-black-800;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;

  .ToolbarContentIcon--widgets-left:before  {
    color: $color-pf-blue-300;
    text-decoration: none;
  }
}
