@import 'src/scss/variables';
/**
 * Navbar
 */
$navbar-brand-font-width: 300;
$navbar-brand-font-width-bold: 600;
$navbar-brand-small-font-width: 700;
$navbar-brand-small-font-right: 2px;
$navbar-brand-small-font-top: -1px;
$navbar-brand-width: 210px;
$navbar-bg-color: $white;
$navbar-border-width: 2px;
$navbar-border-style: solid;
$navbar-icon-link: darken(white, 40%);
$navbar-dropdown-font-size: 0.875rem !default;
$navbar-dropdown-borders: (
  all: (size: 1px, style: solid, color: $border-color)
);
$navbar-dropdown-top: 6px;
$navbar-dropdown-menu-padding: 0;
$navbar-dropdown-padding: 0.3rem 0.8rem;
$navbar-dropdown-header-color: $white;
$navbar-dropdown-header-background: theme-color('primary');

#navbar-search-bar {
  padding-right: 1rem;
}

#navbar-cmdb {
  height: $navbar-height;
  background: $navbar-bg-color;
  border-bottom: $navbar-border-width $navbar-border-style theme-color('primary');

  .container-content {
    margin: 0.5rem 0;
    padding: 0.5rem 1.5rem;
    background: $white;

    .scrollable-menu {
      height: auto;
      max-height: 250px;
      overflow-x: hidden;
    }
  }

  .navbar-brand {
    width: $navbar-brand-width;
    font-weight: $navbar-brand-font-width;

    b {
      font-weight: $navbar-brand-font-width-bold;
      padding-right: $navbar-brand-small-font-right;
    }

    small {
      font-weight: $navbar-brand-small-font-width;
      color: theme-color('primary');
      position: relative;
      top: $navbar-brand-small-font-top;
      margin-right: $navbar-brand-small-font-right;
    }

    .brand-logo {
      vertical-align: sub;
    }
  }

  .navbar-nav {
    li {
      a {
        color: $navbar-icon-link;
      }
    }

    .dropdown-menu {
      padding: $navbar-dropdown-menu-padding;
      margin-top: $navbar-dropdown-top;
      @include borders($navbar-dropdown-borders);
      position: absolute;

      .dropdown-header {
        padding: $navbar-dropdown-padding;
        color: $navbar-dropdown-header-color;
        background: $navbar-dropdown-header-background;
      }

      a.dropdown-item {
        font-size: $navbar-dropdown-font-size;
        padding: $navbar-dropdown-padding;

        &:active {
          color: $white;
        }

        i,
        svg {
          margin-right: 10px;
        }
      }
    }
  }

  .nav-1,
  .nav-2,
  .nav-3 {
    margin: 3px;


    & a.nav-link {
      padding: 0;
      margin: 0 5px;
    }

    & p {
      font-size: 12px;
      margin: 0;
      color: #999999;
    }

    &:hover .hover-trigger:hover,
    &:hover p {
      color: #212529;
    }

    & p:hover {
      color: #999999 !important;
    }
  }

  .nav-user {
    padding: 0 20px 15px 57px !important;
    text-align: left !important;
    position: relative;
    min-height: 70px;
    min-width: 180px;

    .account-user-avatar {
      position: absolute;
      top: 4px;
      left: 15px;
    }

    .account-user-name {
      display: block;
      font-weight: 600;
    }

    .account-position {
      display: block;
      font-size: 12px;
      margin-top: -3px;
    }

    .account-user-avatar img {
      height: 32px;
      width: 32px;
    }
  }

  .navbar-right-menu li {
    max-height: 70px;
  }

  .navbar-right-menu {
    .nav-link {
      min-width: 32px;
      display: block;
      text-align: center;
      margin: 15px 0 15px 0;
      position: relative;
    }

    .nav-link i {
      font-size: 22px;
      vertical-align: middle;
    }

    .dropdown-icon-item {
      display: block;
      line-height: 56px;
      text-align: center;
      padding: 15px 10px 9px;
      border: 1px solid transparent;
      color: #6c757d;
    }

    .dropdown-icon-item i,
    .dropdown-icon-item fa-icon {
      font-size: 22px;
      line-height: 24px;
    }

    .dropdown-icon-item span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
      line-height: initial;
    }

    .dropdown-icon-item:hover {
      cursor: pointer;
    }

    .dropdown-lg {
      width: 320px;
    }
  }

  .navbar-nav {
    flex-direction: initial !important;
  }

  .nav-item-toolbox .col:empty {
    display: none;
  }
}


@media(max-width: 991px) {
  #navbar-cmdb {
    .container-content {
      border-bottom: 1px solid darken(white, 40%);
    }

    .dropdown-lg {
      width: 220px !important;
    }
  }
}

@media(max-width: 1200px) {
  #navbar-cmdb {
    .nav-user {
      padding: 0 !important;
      text-align: left !important;

      .account-user-name,
      .account-position {
        display: none !important;
      }

      .account-user-avatar {
        top: 8px !important;
        left: 3px !important;
      }

      .account-user-avatar img {
        height: 22px !important;
        width: 22px !important;
      }
    }
  }
}

.hover-trigger:hover {
  color: #212529;
}


// Styles for the progress bar
.progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;

  .progress-label {
      font-size: 0.9rem;
      white-space: nowrap;
      margin-bottom: 0;
  }

  .progress {
      position: relative;
      height: 15px;
      width: 100%;
      border-radius: 0px;
      background-color: #e0e0e0; // Light gray background for unused area
      overflow: visible;

      .progress-bar {
          border-radius: 0px;
      }

      .progress-percentage {
          position: absolute;
          width: 100%;
          text-align: center;
          font-size: 0.6rem;
          font-weight: bold;
          color: #000;
          top: 50%;
          transform: translateY(-50%);
          text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
      }
  }
}
