@import "../_variables";

.navbarContainer {
  .bbLogo {
    z-index: 5;
    display: inline-block;
    position: relative;
    width: 150px;
    height: 100%;

    .overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      -webkit-mask-image: url("../../assets/copilot-logo-full.svg");
      mask-image: url("../../assets/copilot-logo-full.svg");
      -webkit-mask-size: contain;
      mask-size: contain;
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
      -webkit-mask-position: center;
      mask-position: center;

      background: linear-gradient(
        45deg,
        #d74d00,
        #da08ec,
        #da08ec,
        #b9d700,
        #089aec,
        #00d7a3,
        #d7c100,
        #d74d00
      );
      background-size: 400% 400%;
      animation: gradientAnimation 5s infinite;
    }
  }

  .navItems {
    display: flex;
    gap: 2.5rem;
    z-index: 11;
    align-items: center;

    .navItem {
      font-weight: 500;
      color: var(--secondary-text);
      font-size: 0.875rem;
      text-decoration: none;
      letter-spacing: -0.01em;
      transition: color var(--transition-fast);

      &:hover {
        color: var(--primary-text);
      }
    }

    .navItemSelected {
      color: var(--primary-text);
      font-weight: 600;
      text-decoration: none;
      font-size: 0.875rem;
    }

    .login {
      margin-left: 0.5rem;
    }

    @media only screen and (max-width: 1207px) {
      display: none;
    }
  }
}

.hamSec {
  display: none;
  z-index: 15;

  @media only screen and (max-width: 1207px) {
    display: block;
  }

  .ham {
    color: var(--secondary-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-fast);

    &:hover {
      color: var(--primary-text);
    }
  }
}

.sidebarContainer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  background-color: var(--primary-bg);
  min-height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
  border-left: 1px solid var(--border-subtle);

  .closeSec {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 1.2rem;

    .close {
      font-size: 1.1rem;
      cursor: pointer;
      color: var(--secondary-text);
      transition: color var(--transition-fast);

      &:hover {
        color: var(--primary-text);
      }
    }
  }

  .sidebarWrapper {
    width: 18rem;
    padding-left: 1rem;

    @include responsive(mobile3) {
      width: 100vw;
    }

    .loginBtn {
      background-color: var(--filled-purple) !important;
      border-radius: 6px;
    }

    :global(.ant-menu) {
      height: calc(100vh - 64px);
      width: 100%;
      display: flex;
      flex-direction: column;
      background-color: var(--primary-bg);
    }
    :global(.ant-menu .ant-menu-item) {
      width: 90%;
      color: var(--secondary-text);
      font-weight: 500;
      font-size: 0.875rem;
      border-radius: 6px;
      transition: all var(--transition-fast);
    }
    :global(.ant-menu .ant-menu-item:hover) {
      color: var(--primary-text);
      background-color: var(--surface-hover);
    }
    :global(.ant-menu .ant-menu-item-selected) {
      background-color: var(--surface-active) !important;
      border-radius: 6px;
      color: var(--primary-text);
    }

    .navLink {
      font-size: 0.875rem;
      font-weight: 500;
    }

    .activeLink {
      color: var(--primary-text);
    }
  }
}

.navbar {
  display: flex;
  height: 64px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);

  @include responsive(tablet2) {
    padding: 0 1rem;
  }
}

.noNavbarbg {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
