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

/* COLORS */
$primary: #5e3817;
$text-dark: #1a1a1a;
$text-light: #6b6b6b;
$bg-soft: #faf8f6;

/* =========================================
   WRAPPER
========================================= */

.wrapper {
  margin-top: 1.6rem;
  margin-bottom: 1.2rem;

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

  /* 🔥 desktop = clean */
}

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

.left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* AVATAR */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;

  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #eee;

  flex-shrink: 0;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* =========================================
   TEXT
========================================= */

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

.text h1 {
  font-size: 1.45rem;
  font-weight: 600;
  color: $text-dark;
  letter-spacing: -0.01em;

  span {
    color: $primary;
  }
}

.meta {
  font-size: 0.82rem;
  color: $text-light;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

/* =========================================
   ACTIONS
========================================= */

.actions {
  display: flex;
  align-items: center;
}

/* NOTIFICATION BUTTON */
.bell {
  position: relative;

  width: 42px;
  height: 42px;

  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);

  background: #F2EDEA;

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

  cursor: pointer;

  transition: all 0.25s ease;

  svg {
    font-size: 1.2rem;
    color: #444;
  }

  &:hover {
    background: $bg-soft;
    transform: translateY(-2px);
  }
}

/* NOTIFICATION DOT */
.dot {
  position: absolute;
  top: 8px;
  right: 8px;

  width: 8px;
  height: 8px;
  border-radius: 50%;

  background: #473324;

  box-shadow: 0 0 0 2px #fff;
}

/* =========================================
   MOBILE TRANSFORMATION (🔥 IMPORTANT)
========================================= */

@media (max-width: 768px) {
  .wrapper {
    margin-top: 0;
    margin-bottom: 0rem !important;

    padding: 0.7rem 0rem;

    border-radius: 14px;

    background: $bg-soft;

    // box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  }

  .text h1 {
    font-size: 1.05rem;
  }

  .meta {
    font-size: 0.75rem;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .bell {
    width: 38px;
    height: 38px;

    border-radius: 10px;
  }
}


//Dropdown on click of avatar on mobile 
.avatarWrapper {
  position: relative;
}

/* ===========================
   DROPDOWN (MATCH NAVBAR)
=========================== */

.avatarWrapper {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 55px;
  left: 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;
}

/* ================= HEADER (NO AVATAR NOW) ================= */
.dropdownHeader {
  margin-bottom: 0.8rem;

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

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

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

/* ================= LINKS ================= */
.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;
    }
  }

  /* ================= LOGOUT BUTTON ================= */
  .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);
    }
  }
}