/* ==========================================================================
   seeker-avatar-menu.css
   Matches the Phoenix / Figma "Expanded Avatar Menu" design.
   All selectors are namespaced with .seeker- to avoid collisions.
   ========================================================================== */

/* ── Login button (logged-out state) ─────────────────────────────────────── */

#seekerAvatarMount {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.seeker-auth-login-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 13px 20px !important;
  font-size: 14px !important;
  font-weight: 300 !important;
  color: rgb(238, 79, 86) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  transition: color 0.4s ease;
  white-space: nowrap;
  cursor: pointer;
  line-height: 20px !important;
  box-shadow: none !important;
  position: relative !important;
}

.seeker-auth-login-btn::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background-color: rgb(31, 31, 31) !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
}

.seeker-auth-login-btn:hover::after,
.seeker-auth-login-btn:focus-visible::after {
  opacity: 1 !important;
}

.seeker-auth-login-btn:visited,
.seeker-auth-login-btn:active {
  color: rgb(238, 79, 86) !important;
}

.seeker-auth-login-btn:hover,
.seeker-auth-login-btn:focus-visible {
  color: rgb(31, 31, 31) !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.seeker-auth-login-btn:focus {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* ── Avatar button (logged-in state) ─────────────────────────────────────── */

.seeker-avatar-menu {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-left: 20px !important;
  line-height: 1 !important;
  font-size: 16px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

.seeker-avatar-menu,
.seeker-avatar-menu * {
  box-sizing: border-box !important;
}

.seeker-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  overflow: visible !important;
  transition: opacity 0.15s ease;
  box-shadow: none !important;
  appearance: none !important;
  vertical-align: middle !important;
}

.seeker-avatar-trigger {
  cursor: pointer !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seeker-avatar-trigger__name {
  cursor: pointer !important;
  font-size: 14px;
  font-weight: 500;
  color: #161616;
  line-height: 1.2;
  white-space: nowrap;
}

.seeker-avatar-trigger__chevron {
  cursor: pointer !important;
  font-size: 0;
  line-height: 1;
  color: #8d8f95;
}

.seeker-avatar-trigger__chevron:before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 5 L8 11 L14 5' stroke='%23989595' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.seeker-avatar-btn:hover,
.seeker-avatar-btn:focus-visible {
  opacity: 0.85;
  outline: none !important;
  box-shadow: none !important;
}

.seeker-avatar-img {
  cursor: pointer !important;
  flex: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.seeker-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  background-color: #FF4D54;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* ── Dropdown container ───────────────────────────────────────────────────── */

.seeker-avatar-dropdown {
  position: absolute !important;
  top: calc(100% + 2px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(258px, calc(100vw - 20px)) !important;
  min-width: 0 !important;
  background: #fff !important;
  border: 1px solid #dcdcdc !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  animation: seekerFadeIn 0.12s ease;
  /* Reset any theme interference */
  outline: none !important;
  list-style: none !important;
  transform: none !important;
  opacity: 1 !important;
  max-height: min(560px, 75vh) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.seeker-avatar-dropdown a:focus {
  outline: none !important;
}

.seeker-linked-accounts {
  max-height: none;
  overflow: visible;
}

.seeker-avatar-dropdown[hidden] {
  display: none !important;
}

@keyframes seekerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Profile rows ─────────────────────────────────────────────────────────── */

.seeker-menu-profile {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 48px !important;
  padding: 8px 16px !important;
  cursor: default;
  transition: background-color 0.1s ease;
  /* Reset theme link/list styles */
  text-decoration: none !important;
  color: inherit !important;
  border: none !important;
  background: transparent;
  width: 100% !important;
  box-sizing: border-box !important;
}

.seeker-menu-profile--active {
  background-color: #f4f4f5 !important;
}

.seeker-menu-profile:not(.seeker-menu-profile--active) {
  cursor: pointer;
}

.seeker-menu-profile:not(.seeker-menu-profile--active):hover,
.seeker-menu-profile:not(.seeker-menu-profile--active):focus-visible {
  background-color: #dfdfe0 !important;
  outline: none;
}

.seeker-menu-profile--linked {
  text-decoration: none !important;
}

.seeker-profile-avatar {
  flex-shrink: 0 !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background-color: #FF4D54;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.seeker-profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  /* Kill any theme border/shadow on img */
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.seeker-profile-avatar span {
  color: #fff;
  font-size: 12px;
  font-weight: 400;
}

.seeker-profile-name {
  flex: 1 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #151515 !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seeker-profile-type {
  font-style: normal !important;
  font-weight: 400 !important;
  color: #6f7278 !important;
}

.seeker-chevron {
  flex-shrink: 0;
  color: #8d8f95;
}

/* ── Separator ────────────────────────────────────────────────────────────── */

.seeker-menu-separator {
  display: block !important;
  margin: 6px 0 !important;
  border: none !important;
  border-top: 1px solid #e9e9e9 !important;
  height: 0 !important;
  background: none !important;
}

/* ── Action links (Settings, Dashboard, Logout) ──────────────────────────── */
/* OceanWP sets nav a { display: inline } — override with !important */

.seeker-menu-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 48px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #181818 !important;
  text-decoration: none !important;
  transition: background-color 0.1s ease;
  /* Reset theme nav-link styles */
  border: none !important;
  background: transparent !important;
  line-height: 1.4 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.seeker-menu-action:hover,
.seeker-menu-action:focus-visible {
  background-color: #dfdfe0 !important;
  color: #1a1a1a !important;
  outline: none;
  text-decoration: none !important;
}

/* Logout – slightly muted */
.seeker-menu-action--logout {
  color: #181818 !important;
}

.seeker-menu-action--logout:hover,
.seeker-menu-action--logout:focus-visible {
  color: #1a1a1a !important;
  background-color: #dfdfe0 !important;
}

/* Loading state: hide the placeholder link while JS fetches */
.seeker-auth-loading {
  visibility: hidden;
  pointer-events: none;
  min-width: 120px;
}

@media (max-width: 420px) {
  .seeker-avatar-dropdown {
    right: -4px;
    min-width: 0 !important;
    width: min(258px, calc(100vw - 12px)) !important;
  }

  .seeker-avatar-trigger__name {
    display: none;
  }

  .seeker-menu-profile,
  .seeker-menu-action {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seeker-avatar-dropdown {
    animation: none;
  }

  .seeker-avatar-btn,
  .seeker-auth-login-btn,
  .seeker-menu-profile,
  .seeker-menu-action {
    transition: none;
  }
}
