/* ================= OVERLAY ================= */
#profileOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 998;
}

/* ================= DRAWER ================= */
#profileDrawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #f4f6fb;
  z-index: 999;
  transition: left 0.9 5s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 🔥 MOBILE SCROLL FIX */
  will-change: transform;
}


#profileDrawer.open {
  right: 0;
  animation: drawerIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes drawerIn {
  from {
    opacity: 0.85;
  }
  to {
    opacity: 1;
  }
}

/* ================= HEADER ================= */
.drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  font-weight: 600;
}

.drawer-header span {
  font-size: 1.4rem;
  cursor: pointer;
}

/* ================= USER SECTION ================= */
.drawer-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 12px;
  text-align: center;
}

.drawer-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.drawer-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
}

/* ================= INFO PILLS ================= */
.drawer-info-fields {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

.drawer-info-pill {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 999px;
  background: #e9edff;
  color: #333;
  font-weight: 500;
}

.drawer-info-pill.muted {
  background: #f1f2f6;
  color: #777;
}

/* ================= BRAND / WALLET CARD ================= */
.drawer-card {
  margin: 12px 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #4f6bed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  background: #fff;
}

.drawer-amount {
  font-size: 1rem;
}

.drawer-label {
  font-size: 0.95rem;
  color: #111;
}

.drawer-arrow {
  font-size: 1.2rem;
}

/* ================= MENU ================= */
.drawer-menu {
  padding: 10px 16px;
}

.drawer-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 10px;
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

/* ================= LOGOUT ================= */
.drawer-logout {
  margin: auto 16px 20px;
  background: #5c74e6;
  color: white;
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
}

/* ================= DESKTOP POLISH ================= */
@media (min-width: 768px) {
  #profileDrawer {
    max-width: 340px;
  }
}
.drawer-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto 15px 20px;
}

.drawer-logout.secondary {
  background: #ffffff;
  color: #5c74e6;
  border: 2px solid #5c74e6;
}


/* //admin profile drawer styles */

/* ===== ADMIN BADGE ===== */
.drawer-admin-badge {
  background: linear-gradient(135deg, #1f3cff, #4f6bed);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(79,108,237,0.4);
}

/* ===== ADMIN ITEMS ===== */
.drawer-item.admin {
  border: 1.5px solid #4f6bed;
  background: #eef1ff;
  font-weight: 600;
}

/* ===== DIVIDER ===== */
.drawer-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 12px 0;
}

/* LETTER AVATAR */
.letter-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5c74e6, #7f8cff);
  color: white;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}






/* ================= DESKTOP RIGHT MINI DRAWER ================= */
@media (min-width: 1024px) {

  #profileOverlay {
    background: rgba(0,0,0,0.25);
  }

  #profileDrawer {
    right: -420px;                 /* hidden */
    left: auto;                    /* IMPORTANT */
    width: 360px;                  /* mini width */
    max-width: 360px;
    border-radius: 16px 0 0 16px;  /* smooth edge */
    box-shadow: -6px 0 20px rgba(0,0,0,0.15);
  }

  #profileDrawer.open {
    right: 0;
  }

  /* header compact */
  .drawer-header {
    padding: 14px 16px;
  }

  /* user section thoda tight */
  .drawer-user {
    padding: 18px 14px 10px;
  }

  /* menu spacing */
  .drawer-menu {
    padding: 8px 14px;
  }

  .drawer-item {
    padding: 12px;
    font-size: 0.95rem;
  }

  /* logout fixed bottom feel */
  .drawer-logout {
    margin: auto 14px 18px;
  }
}
