@use "../../../styles/abstracts/variables";

/* ===========================
   NAVBAR
=========================== */
.nav {
  background: #ffffff;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-family: variables.$font;
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  z-index: 50;
  transition: left 0.3s ease;

  @media (max-width: 1000px) {
    left: 0;
    padding: 0.9rem 1rem;
  }

  p {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
  }
}

/* ===========================
   LEFT
=========================== */
.left {
  display: flex;
  align-items: center;

  .contextPills {
    .roleInfo {
      background: rgba(122, 75, 32, 0.12);
      padding: 0.35rem 0.7rem;
      border-radius: 10px;
      display: flex;
      gap: 0.4rem;
      font-size: 0.78rem;
      color: #5e3817;
      border: 1px solid rgba(122, 75, 32, 0.25);
      font-weight: 600;

      h6 {
        margin: 0;
        font-weight: 600;
        color: #5e3817;
      }
    }
  }
}

/* ===========================
   RIGHT
=========================== */
.right {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;

  .email {
    color: #6b6b6b;
    font-size: 0.82rem;

    @media (max-width: 600px) {
      display: none;
    }
  }

  .iconBtn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(122, 75, 32, 0.12);
    color: #5e3817;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;

    &:hover {
      background: linear-gradient(135deg, #5e3817, #7a4b20);
      color: #ffffff;
      box-shadow: 0 6px 16px rgba(122, 75, 32, 0.25);
    }
  }

  .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #5e3817, #7a4b20);
    color: #ffffff;
    font-size: 0.55rem;
    padding: 2px 5px;
    border-radius: 999px;
    font-weight: 700;
  }

  .avatarSection {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;

    .avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 1px solid rgba(122, 75, 32, 0.25);
    }

    .username {
      color: #1a1a1a;
      font-size: 0.85rem;

      @media (max-width: 600px) {
        display: none;
      }
    }
  }

  .menuIcon {
    display: none;
    cursor: pointer;
    background: linear-gradient(135deg, #5e3817, #7a4b20);
    padding: 0.45rem;
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.25s ease;

    &:hover {
      box-shadow: 0 6px 16px rgba(122, 75, 32, 0.25);
      transform: scale(1.05);
    }

    @media (max-width: 1000px) {
      display: flex;
    }
  }
}

/* ===========================
   DROPDOWN
=========================== */
.dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  min-width: 230px;
  padding: 0.75rem;
  box-shadow: 0 12px 30px rgba(122, 75, 32, 0.08);
  z-index: 200;

  .dropdownHeader {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.8rem;

    .dropdownAvatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 1px solid rgba(122, 75, 32, 0.25);
    }

    .userInfo {
      .name {
        color: #1a1a1a;
        font-weight: 600;
        font-size: 0.85rem;
      }

      .email {
        font-size: 0.75rem;
        color: #6b6b6b;
      }
    }
  }

  .dropdownLinks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;

    .dropdownLink {
      padding: 0.45rem 0.7rem;
      border-radius: 8px;
      font-size: 0.82rem;
      color: #1a1a1a;
      transition: all 0.2s ease;

      &:hover {
        background: rgba(122, 75, 32, 0.1);
        color: #5e3817;
      }
    }

    .logoutBtn {
      margin-top: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;

      padding: 0.6rem;
      border-radius: 12px;

      font-size: 0.78rem;
      font-weight: 600;

      background: linear-gradient(
        135deg,
        #ff6b6b,
        #d64545
      );

      color: #fff;

      cursor: pointer;
      transition: all 0.25s ease;

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(255, 77, 77, 0.25);
      }
    }
  }
}

/* ===========================
   BACKDROP
=========================== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  z-index: 40;
  transition: all 0.25s ease;

  &.show {
    opacity: 1;
    visibility: visible;
  }
}