/* User List Popup */
.user-list-popup {
  position: fixed;
  left: 0;
  top: 0;
  width: 272px;
  max-width: 95vw;
  height: auto;
  max-height: 95vh;
  background: #ffcf25;
  border-radius: 14px;
  box-shadow: 0 3px 19px rgba(0, 0, 0, 0.13);
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  overflow-y: auto;
  box-sizing: border-box;
  transition: opacity 0.2s;
  height: 444px;
}

.user-list-popup.active {
  display: flex;
  opacity: 1;
}

.user-list-popup-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.user-list-popup > *:not(.user-list-popup-shapes) {
  position: relative;
  z-index: 1;
}

.user-list-popup-header {
  width: 100%;
  padding: 18px 24px 8px 0px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 9px;
}

.user-list-users {
  width: 100%;
  padding: 0 2px 16px 7px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #ffffff #fff0;
}

.user-list-users::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.user-list-users::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
  transition: background 0.2s;
}

.user-list-users::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

.user-list-users::-webkit-scrollbar-track {
  background: transparent;
}

.user-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5de24;
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 7px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.user-list-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #90773c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 2px solid #f5de24;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.user-list-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.user-list-name-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.user-display-name {
  font-size: 13px;
  font-weight: 500;
  color: #454554;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}

.user-display-name:hover {
  color: #000000;
  text-decoration: underline;
}

.user-username {
  font-size: 10px;
  color: #90773c;
  margin-top: 2px;
  cursor: pointer;
  transition: color 0.2s;
}

.user-username:hover {
  color: #5a4a22;
  text-decoration: underline;
}

.user-username::before {
  content: "@";
}

.user-list-action {
  width: 70px;
  height: 21px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 26px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  background: #ff9bc6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-list-action.following {
  background: linear-gradient(90deg, #ff7bac 0%, #85b5b9 100%);
  color: #fff;
}

.user-list-action.following:hover {
  background: #c7a3c7;
}

.user-list-action.remove {
  background: #c7a3c7;
  color: #fff;
}

.user-list-action.remove:hover {
  background: #c7a3a3;
}

/* Following/Followers specific styles */
.user-logo-following,
.user-logo-followers {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5de24;
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 7px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  box-sizing: border-box; /* Prevent overflow from padding */
  max-width: 100%; /* Ensure it doesn't exceed container width */
  overflow: hidden; /* Hide any overflow content */
}

.user-display-name-following,
.user-display-name-followers {
  font-size: 13px;
  font-weight: bold;
  color: #454554;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}

.user-display-name-following:hover,
.user-display-name-followers:hover {
  color: #000000;
  text-decoration: underline;
}

.user-username-following,
.user-username-followers {
  font-size: 11px;
  font-weight: 500;
  color: #90773c;
  margin-top: 2px;
  cursor: pointer;
  transition: color 0.2s;
}

.user-username-following:hover,
.user-username-followers:hover {
  color: #5a4a22;
  text-decoration: underline;
}

.user-username-following::before,
.user-username-followers::before {
  content: "@";
}

/* Auth Dropdown */
.auth-dropdown {
  position: relative;
  justify-self: end;
  transform: translate(-336px, -40px);
  z-index: 1000;
}

.auth-trigger {
  display: flex;
  align-items: center;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-trigger img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  opacity: 1;
  visibility: visible;
  display: block;
  object-fit: contain;
  background-color: #f5f5f5;
  transform: scale(1);
  min-width: 26px;
  min-height: 26px;
}

.auth-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1001;
  margin-top: 4px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  padding: 6px 0;
  margin-top: 6px;
  display: none;
  z-index: 1000;
}

.auth-menu.active {
  display: block;
}

.auth-menu-item {
  padding: 8px 12px;
  color: #454554;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s;
  font-size: 13px;
}

.auth-menu-item:hover {
  background: #f5f5f5;
}

.auth-menu-item.danger {
  color: #ff4444;
}

.user-email {
  color: #454554;
  font-weight: 500;
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  margin-bottom: 6px;
  font-size: 13px;
}
