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

/* ==========================================
   NAVBAR
========================================== */

.nav {
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 1.5rem;

  background:
    linear-gradient(
      180deg,
      rgba(18, 18, 20, 0.98),
      rgba(14, 14, 16, 0.98)
    );

  border-bottom:
    1px solid #090909;

  position: sticky;
  top: 0;

  z-index: 200;

  backdrop-filter: blur(18px);

  @media (max-width: 768px) {
    padding: 0 1rem;
    height: 64px;
  }
}

/* ==========================================
   LEFT
========================================== */

.left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.welcomeText {
  font-size: 0.72rem;

  color:
    rgba(
      255,
      255,
      255,
      0.55
    );

  font-weight: 500;

  line-height: 1;
}

.userName {
  font-size: 1rem;

  font-weight: 600;

  color: #fff;

  line-height: 1.2;

  margin: 0;

  @media (max-width: 768px) {
    font-size: 0.9rem;
  }
}

/* ==========================================
   RIGHT
========================================== */

.right {
  display: flex;
  align-items: center;
  gap: 0.85rem;

  position: relative;

  @media (max-width: 768px) {
    gap: 0.5rem;
  }
}

/* ==========================================
   ICON BUTTONS
========================================== */

.iconBtn {
  position: relative;

  width: 42px;
  height: 42px;

  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.06
    );

  background:
    rgba(
      255,
      255,
      255,
      0.03
    );

  color: #fff;

  cursor: pointer;

  transition: all 0.25s ease;

  &:hover {
    transform: translateY(-1px);

    background:
      rgba(
        255,
        255,
        255,
        0.06
      );

    border-color:
      rgba(
        255,
        255,
        255,
        0.12
      );
  }

  @media (max-width: 768px) {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}

/* ==========================================
   NOTIFICATION BADGE
========================================== */

.badge {
  position: absolute;

  top: -5px;
  right: -5px;

  min-width: 20px;
  height: 20px;

  padding: 0 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      #ff7a18,
      #ff9f43
    );

  color: #111;

  font-size: 0.65rem;
  font-weight: 800;

  box-shadow:
    0 0 18px
    rgba(
      247,
      147,
      24,
      0.45
    );

  border:
    2px solid
    #111;
}

/* ==========================================
   NOTIFICATIONS
========================================== */

.notificationWrapper {
  position: relative;
}

.notificationDropdown {
  position: absolute;

  top: 56px;
  right: 0;

  width: 380px;

  background:
    linear-gradient(
      180deg,
      rgba(22, 22, 25, 0.98),
      rgba(15, 15, 18, 0.98)
    );

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.06
    );

  border-radius: 20px;

  overflow: hidden;

  backdrop-filter: blur(24px);

  box-shadow:
    0 24px 80px
    rgba(
      0,
      0,
      0,
      0.55
    );

  animation: dropdownFade 0.2s ease;

  z-index: 999;

  @media (max-width: 768px) {
    width: 320px;
    right: -40px;
  }

  @media (max-width: 480px) {
    width: 290px;
    right: -80px;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1rem 1rem;

    border-bottom:
      1px solid
      rgba(
        255,
        255,
        255,
        0.05
      );

    h5 {
      color: #fff;

      font-size: 0.9rem;

      font-weight: 700;

      margin-bottom: 0.15rem;
    }

    p {
      color:
        rgba(
          255,
          255,
          255,
          0.45
        );

      font-size: 0.72rem;
    }

    a {
      color:
        variables.$col-orange;

      font-size: 0.72rem;

      font-weight: 700;
    }
  }

  &__list {
    max-height: 420px;
    overflow-y: auto;
  }
}

/* ==========================================
   NOTIFICATION ITEM
========================================== */

.notificationItem {
  display: block;

  padding: 1rem;

  transition: all 0.25s ease;

  border-bottom:
    1px solid
    rgba(
      255,
      255,
      255,
      0.04
    );

  &:hover {
    background:
      rgba(
        255,
        255,
        255,
        0.03
      );
  }

  &__top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;

    margin-bottom: 0.35rem;

    h6 {
      color: #fff;

      font-size: 0.8rem;

      font-weight: 600;

      line-height: 1.4;
    }
  }

  p {
    color:
      rgba(
        255,
        255,
        255,
        0.6
      );

    font-size: 0.72rem;

    line-height: 1.6;

    display: -webkit-box;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }
}

.notificationDot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background:
    variables.$col-orange;

  flex-shrink: 0;

  box-shadow:
    0 0 14px
    rgba(
      247,
      147,
      24,
      0.8
    );
}

.notificationEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 0.8rem;

  padding: 2rem;

  color:
    rgba(
      255,
      255,
      255,
      0.45
    );

  p {
    font-size: 0.8rem;
  }
}

/* ==========================================
   PROFILE SECTION
========================================== */

.avatarWrapper {
  position: relative;
}

.avatarSection {
  display: flex;
  align-items: center;
  gap: 0.75rem;

  background: transparent;

  border: none;

  cursor: pointer;

  @media (max-width: 768px) {
    gap: 0.5rem;
  }
}

.avatar {
  width: 42px;
  height: 42px;

  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      135deg,
      #ff7a18,
      #ff9f43
    );

  color: #111;

  font-size: 0.9rem;
  font-weight: 800;

  box-shadow:
    0 0 20px
    rgba(
      247,
      147,
      24,
      0.15
    );

  @media (max-width: 768px) {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}

.userDetails {
  display: flex;
  flex-direction: column;

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

  .username {
    color: #fff;

    font-size: 0.82rem;

    font-weight: 600;
  }

  small {
    color:
      rgba(
        255,
        255,
        255,
        0.45
      );

    font-size: 0.68rem;
  }
}

/* ==========================================
   PROFILE DROPDOWN
========================================== */

.dropdown {
  position: absolute;

  top: 58px;
  right: 0;

  width: 300px;

  background:
    linear-gradient(
      180deg,
      rgba(22, 22, 25, 0.98),
      rgba(15, 15, 18, 0.98)
    );

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.06
    );

  border-radius: 20px;

  overflow: hidden;

  backdrop-filter: blur(24px);

  box-shadow:
    0 24px 80px
    rgba(
      0,
      0,
      0,
      0.55
    );

  animation: dropdownFade 0.2s ease;

  z-index: 999;
}

.dropdownHeader {
  padding: 1rem;

  display: flex;
  align-items: center;
  gap: 0.8rem;

  border-bottom:
    1px solid
    rgba(
      255,
      255,
      255,
      0.05
    );
}

.dropdownAvatar {
  width: 48px;
  height: 48px;

  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      135deg,
      #ff7a18,
      #ff9f43
    );

  color: #111;

  font-size: 1rem;
  font-weight: 800;
}

.userInfo {
  display: flex;
  flex-direction: column;

  .name {
    color: #fff;

    font-size: 0.85rem;

    font-weight: 700;
  }

  .email {
    color:
      rgba(
        255,
        255,
        255,
        0.55
      );

    font-size: 0.72rem;

    word-break: break-all;
  }
}

/* ==========================================
   LINKS
========================================== */

.dropdownLinks {
  padding: 0.75rem;

  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdownLink {
  padding: 0.8rem 0.9rem;

  border-radius: 12px;

  color: #fff;

  font-size: 0.82rem;

  transition: all 0.2s ease;

  &:hover {
    background:
      rgba(
        255,
        255,
        255,
        0.05
      );
  }
}

/* ==========================================
   LOGOUT
========================================== */

.logoutBtn {
  margin-top: 0.4rem;

  width: 100%;

  height: 44px;

  border: none;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  background:
    rgba(
      239,
      68,
      68,
      0.12
    );

  color: #ef4444;

  font-size: 0.8rem;

  font-weight: 700;

  cursor: pointer;

  transition: all 0.25s ease;

  &:hover {
    background:
      rgba(
        239,
        68,
        68,
        0.18
      );
  }
}

/* ==========================================
   MOBILE
========================================== */

.hamburger {
  display: none;

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

/* ==========================================
   ANIMATION
========================================== */

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}