/* Aagron Forum — Unified Profile & Workspace Switcher Styles */

.unified-profile-btn,
.profile,
.user-face,
.top-profile {
  cursor: pointer !important;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
  padding: 4px 8px;
}

.unified-profile-btn:hover,
.profile:hover,
.user-face:hover,
.top-profile:hover {
  background: rgba(189, 87, 31, 0.08) !important;
  outline: 1px solid rgba(189, 87, 31, 0.22);
}

.profile-chevron {
  display: inline-block;
  margin-left: 6px;
  color: #8b95a5;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.unified-profile-btn.upd-open .profile-chevron,
.profile.upd-open .profile-chevron,
.user-face.upd-open .profile-chevron,
.top-profile.upd-open .profile-chevron {
  transform: rotate(180deg);
}

/* Dropdown Container */
.unified-profile-dropdown {
  position: fixed;
  z-index: 100000;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 16px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
  animation: updFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes updFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* User Identity Header */
.upd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.upd-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #bd571f 0%, #ea580c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(189, 87, 31, 0.28);
  flex-shrink: 0;
}

.upd-user-info {
  flex: 1;
  min-width: 0;
}

.upd-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upd-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upd-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: #bd571f;
  background: #fff5ee;
  border: 1px solid #fed7aa;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upd-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Live Synchronized Badge */
.upd-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  margin-bottom: 12px;
}

.upd-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  position: relative;
  flex-shrink: 0;
}

.upd-live-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid #16a34a;
  animation: updPulse 1.8s infinite cubic-bezier(0.24, 0, 0.38, 1);
  opacity: 0.7;
}

@keyframes updPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.upd-status-text {
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  letter-spacing: 0.01em;
}

/* Divider */
.upd-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 10px 0;
}

/* Section Label */
.upd-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* Workspaces List */
.upd-workspaces {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.upd-workspace-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.upd-workspace-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.upd-workspace-item.upd-current {
  background: #fffaf5;
  border-color: #fed7aa;
}

.upd-ws-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.upd-ws-body {
  flex: 1;
  min-width: 0;
}

.upd-ws-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.upd-ws-desc {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upd-badge-active {
  font-size: 9.5px;
  font-weight: 700;
  color: #bd571f;
  background: #ffedd5;
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
}

.upd-arrow {
  font-size: 14px;
  color: #94a3b8;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.upd-workspace-item:hover .upd-arrow {
  transform: translateX(2px);
  color: #bd571f;
}

/* Action Buttons Footer */
.upd-footer-actions {
  display: flex;
  gap: 8px;
  padding-top: 6px;
}

.upd-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s ease;
  font-family: inherit;
}

.upd-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.upd-btn-logout {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.upd-btn-logout:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}
