/* Profile Menu - High-quality UI for user avatar and options */

/* Wrapper for positioning dropdown */
.user-profile-wrapper {
  position: relative;
  z-index: 1100;
  overflow: visible;
}

/* Profile dropdown */
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 300px;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1100;
  overflow: hidden;
  animation: profileDropdownIn 0.25s ease;
}

.profile-dropdown.active {
  display: block;
}

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

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

.profile-dropdown-header {
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(0, 191, 255, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-dropdown-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00bfff, #8a2be2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.profile-avatar-icon {
  font-size: 32px;
  color: white;
}

.profile-dropdown-info {
  min-width: 0;
}

.profile-dropdown-name {
  font-size: 17px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.profile-dropdown-email {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.profile-dropdown-actions {
  padding: 12px 8px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-dropdown-item i {
  width: 20px;
  font-size: 16px;
  color: rgba(0, 191, 255, 0.9);
  flex-shrink: 0;
}

.profile-dropdown-logout {
  color: #ff6b6b;
  margin-top: 8px;
}

.profile-dropdown-logout:hover {
  background: rgba(255, 107, 107, 0.15);
}

.profile-dropdown-logout i {
  color: #ff6b6b;
}

/* Avatar with image support */
.header-user-avatar img.avatar-img,
.menu-user-avatar img.menu-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-user-avatar.has-avatar img.avatar-img,
.menu-user-avatar.has-avatar img.menu-avatar-img {
  display: block !important;
}

.header-user-avatar.has-avatar i,
.menu-user-avatar.has-avatar i {
  display: none !important;
}

/* Menu user card */
.menu-user-card {
  padding: 20px;
  background: rgba(0, 191, 255, 0.05);
  border-radius: 12px;
  margin: 0 20px 20px 20px;
}

.menu-user-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.menu-user-name {
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.menu-user-email {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-top: 4px;
}

.menu-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  margin-bottom: 10px;
  background: rgba(0, 191, 255, 0.15);
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: 8px;
  color: #00bfff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-profile-btn:hover {
  background: rgba(0, 191, 255, 0.25);
}

/* Change Photo Modal */
.profile-photo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.profile-photo-modal {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  min-width: 360px;
  max-width: 90vw;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.profile-photo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-photo-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.profile-photo-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.profile-photo-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.profile-photo-modal-body {
  padding: 28px 24px;
  text-align: center;
}

.profile-photo-preview {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00bfff, #8a2be2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-preview i {
  font-size: 48px;
  color: white;
}

.profile-photo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #00bfff, #8a2be2);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-photo-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 191, 255, 0.3);
}

.profile-photo-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
