@import (reference) '../../dependencies/patternfly/patternfly.less';

/* stylelint-disable */
.view-width-100 { width: 100vw !important; }
/* stylelint-enable */
.nav {
  .open {
    >.dropdown-menu {
      transform: scale(1, 1);
    }
    &>a {
      height: 43px;
      background-color: @color-pf-black-900;
      border-color: @color-pf-black-600;
    }
  }
}
.navbar {
  margin-bottom: 0;
  border-top: 3px solid;
  border-top-color: @color-pf-red;
  &-collapse {
    padding-right: 0;
    padding-left: 0;
  }
  &-right { margin-right: 0; }
  .context {
    &:hover { .pointer; }
  }
  .status-dropdown {
    border-right: 1px solid;
    border-right-color: @color-pf-black-600;
  }
  .user-dropdown-menu {
    height: 43px;
    transition: height 4s;
    &:hover { .pointer; }
    .user-dropdown {
      width: 200px;
      height: 43px;
      padding-top: 10px;
    }
  }
  &-getting-started-logo {
    width: 15%;
    margin-top: 7px;
  }
}
.navbar-pf {
  min-height: 48px;
  border-color: @color-pf-red-100;
  .infotip {
    &.bottom-right {
      .arrow { left: 88%; }
    }
  }
  .navbar-primary {
    > .active > a {
      background-color: @color-pf-black-900;
      background-image: linear-gradient(to bottom, @color-pf-black-700 0, @color-pf-black-900 100%);
      border-bottom-color: @color-pf-black-900;
    }
    &.persistent-secondary {
      background: none;
      > li {
        &.active {
          &.with-no-children { margin-bottom: 0; }
        }
        .navbar-persistent {
          border-bottom: 1px solid;
          border-bottom-color: @color-pf-black;
          background-color: @color-pf-black-900;
          > li a {
            color: @color-pf-white;
            &:hover { color: @color-pf-black-300; }
          }
        }
      }
    }
  }
}
.io-recent-items-active {
  height: 43px;
  width: 275px;
  border-right: 1px solid;
  border-right-color: @color-pf-black-600;
}
.recent-items-toggle {
  width: 273px;
  &-text {
    height: 20px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    &-dropdown {
      @extend: {.recent-items-toggle-text};
      margin-right: 2px;
    }
  }
  .caret {
    position: absolute;
    right: 0;
    margin-right: 5px;
    margin-top: 3px;
  }
}
.recent-items-dropdown {
  &.open {
    .recent-items {
      width: 275px;
      &:hover { .pointer; }
    }
  }
}

.status-dropdown {
  &:hover { .pointer; }
  a {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .pficon-white {
    font-size: 1.3em;
    &:before { color: @color-pf-white; }
  }
}
.login-block {
  border-left: 1px solid;
  border-left-color: @color-pf-black-600;
  a {
    padding-top: 11px;
    padding-bottom: 11px;
    width: 200px;
    &-logged-out-user {
      border: 1px solid;
      border-color: @color-pf-black-600;
      padding: 2px;
      display: inline-block;
      vertical-align: text-bottom;
      i { color: @color-pf-black-500; }
    }
    &:hover { .pointer; }
  }
}
.user-dropdown {
  padding: 10px 14px;
  width: 200px;
  &:hover { .pointer; }
  &-items {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-right: 5px;
  }
  &__username { vertical-align: sub; }
  &__user-icon {
    display: inline-block;
    vertical-align: middle;
    img {
      width: 24px;
      height: 23px;
      margin-right: 5px;
    }
  }
  .caret {
    position: absolute;
    right: 0;
    margin-right: 5px;
    margin-top: 8px;
  }
  &-menu {
    .dropdown-menu {
      li {
        width: 198px;
        a {
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
        }
      }
    }
  }
}
@media (max-width: 768px) {
  .nav {
    &>li { float: left; }
    .recent-items-dropdown { width: 100%; }
    .status-dropdown { display: none; }
    .user-dropdown { width: 100%; }
    .open {
      > .dropdown-menu { width: 100%; }
    }
  }
  .navbar-pf {
    min-height: auto;
    .dropdown-menu {
      display: inline-block;
    }
    .navbar-header {
      width: 100%;
      margin-left: 0;
    }
  }
  .navbar-collapse {
    &.in {
      margin-left: 0;
      width: 100%;
      .navbar-right {
        width: 100%;
        padding-right: 3px;
        padding-left: 0;
        display: inline-flex;
        .user-dropdown-menu {
          width: 100%;
          .user-dropdown {
            width: 100%;
          }
          &.open {
            width: 100%;
            display: inline-table;
          }
          .dropdown-menu {
            li { width: 100%; }
          }
        }
      }
      .persistent-secondary {
        margin-left: 0;
        padding-left: 0;
        li.active {
          width: 100%;
          display: grid;
          .navbar-persistent {
            width: 100%;
            display: inline-flex;
            li.active {
              width: auto;
            }
          }
        }
      }
    }
  }
  .arrow { display: none; }
  .recent-items-dropdown {
    &.open {
      .recent-items { width: 100%; }
    }
  }
  .recent-items-toggle {
    width: 100%;
    .recent-items {
      width: 100%;
      &-toggle { width: 100%; }
    }
  }
}
