/* ============================================================
   PROFILE-DROPDOWN.CSS — Account dropdown menu
   ============================================================ */

/* ── Wrapper for positioning ─────────────────────────────── */
.nav-account-wrap {
  position: relative;
}

/* ── Dropdown panel ──────────────────────────────────────── */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 10px -6px rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  z-index: 1500;
  overflow: hidden;
}
.profile-dropdown.pd-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── User header ─────────────────────────────────────────── */
.pd-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}
.pd-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #38B6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pd-avatar span {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.3px;
}
.pd-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.pd-user-info {
  display: flex;
  flex-direction: column;
}
.pd-user-name {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0e1013;
  line-height: 1.4;
}
.pd-user-edit {
  font-family: inherit;
  font-size: 15px;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}
.pd-user-edit:hover {
  text-decoration: underline;
}

/* ── Menu sections ───────────────────────────────────────── */
.pd-section {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.pd-section:last-child {
  border-bottom: none;
}
.pd-section-label {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  padding: 6px 18px 4px;
  line-height: 1.5;
}

/* ── Menu items ──────────────────────────────────────────── */
.pd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.pd-item:hover {
  background: #f8fafc;
}
.pd-item.pd-item-active {
  background: transparent;
  color: #374151;
  font-weight: 400;
}
.pd-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.pd-item:hover svg {
  color: inherit;
}

/* ── Logout item ─────────────────────────────────────────── */
.pd-item-logout {
  color: #dc2626;
}
.pd-item-logout svg {
  color: #dc2626;
}
.pd-item-logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* ── Nav avatar circle (logged-in state) ─────────────────── */
.nav-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #38B6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-avatar-circle b {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Login item style ────────────────────────────────────── */
.pd-item-login {
  color: #2563eb;
  font-weight: 400;
}
.pd-item-login:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

/* ── Chevron rotation when open ──────────────────────────── */
.nav-account-wrap .nav-account-btn .pd-chevron {
  transition: transform 0.2s ease;
}
.nav-account-wrap.pd-active .nav-account-btn .pd-chevron {
  transform: rotate(180deg);
}


/* ============================================================
   DARK MODE — aligned with landing page design system
   ============================================================ */
body.dark-mode .profile-dropdown {
  background: #1b1e2b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
}
body.dark-mode .pd-user {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .pd-avatar {
  background: #38B6FF;
}
body.dark-mode .pd-user-name {
  color: #ffffff;
}
body.dark-mode .pd-user-edit {
  color: #38B6FF;
}
body.dark-mode .pd-section {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .pd-section-label {
  color: #a1a1aa;
}
body.dark-mode .pd-item {
  color: #a1a1aa;
}
body.dark-mode .pd-item:hover {
  background: rgba(136, 206, 255, 0.06);
  color: #38B6FF;
}
body.dark-mode .pd-item.pd-item-active {
  background: rgba(136, 206, 255, 0.08);
  color: #38B6FF;
}
body.dark-mode .pd-item-logout {
  color: #f87171;
}
body.dark-mode .pd-item-logout:hover {
  background: rgba(220,38,38,0.1);
  color: #f87171;
}
