/* Profile Dropdown Styles */
#profile-dropdown-container {
  position: relative;
  flex: 0 0 auto;
}

#profile-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--obid-radius-control);
  transition: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

#profile-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

body.light-theme #profile-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

#profile-avatar-image,
#profile-avatar-fallback {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#profile-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 70;
  width: min(280px, calc(100vw - 24px));
  background-color: #18181b;
  background-image: none !important;
  border: 1px solid #27272a;
  border-radius: var(--obid-radius-panel);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  min-width: 250px;
  overflow: hidden;
  transform-origin: top right;
  animation: none;
  transform: none;
  isolation: isolate;
}

#profile-dropdown-menu.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Full-width hover rows */
.dropdown-menu-row {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: transparent;
  background-image: none !important;
  border-radius: 0;
  color: #d4d4d8;
  transition: none;
}

.dropdown-menu-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.dropdown-menu-row--admin {
  color: #fbbf24;
}

.dropdown-menu-row--admin:hover {
  background-color: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

/* Section dividers — full-width line */
.dropdown-menu-divider {
  border-color: #27272a;
}

.dropdown-menu-divider-wrap {
  border-color: #27272a;
}

body.light-theme #profile-dropdown-menu {
  background-color: #ffffff;
  background-image: none !important;
  border-color: #dbe2ea;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
}

body.light-theme .dropdown-menu-row {
  color: #374151;
}

body.light-theme .dropdown-menu-row:hover {
  background-color: rgba(15, 23, 42, 0.06);
  color: inherit;
}

body.light-theme .dropdown-menu-row--admin {
  color: #b45309;
}

body.light-theme .dropdown-menu-row--admin:hover {
  background-color: rgba(180, 83, 9, 0.07);
  color: #92400e;
}

body.light-theme .dropdown-menu-divider {
  border-color: #e4e4e7;
}

body.light-theme .dropdown-menu-divider-wrap {
  border-color: #e4e4e7;
}

/* Listing type badges now inherit unified site styles from style.css */

/* Profile upload button */
.profile-upload-btn {
  background-color: #2563eb;
  color: #ffffff;
  border: 1px solid #3b82f6;
  border-radius: var(--obid-radius-control);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.profile-upload-btn:hover {
  background-color: #1d4ed8;
  border-color: #60a5fa;
}

.profile-upload-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

body.light-theme .profile-upload-btn {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: none;
}

body.light-theme .profile-upload-btn:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.profile-dropdown-logout-btn {
  color: #f87171;
  border: none;
  background: transparent;
  background-image: none !important;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  transition: none;
}

.profile-dropdown-logout-btn:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

body.light-theme .profile-dropdown-logout-btn {
  color: #be123c;
  background: transparent;
  background-image: none !important;
  border: none;
}

body.light-theme .profile-dropdown-logout-btn:hover {
  color: #9f1239;
  background: rgba(190, 18, 60, 0.06);
}

@media (max-width: 1023px) {
  #profile-dropdown-container {
    position: static;
  }

  #profile-dropdown-menu {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
}
