/* Shared account indicator for legacy dashboard headers. */
.leader-actions .account-trigger,
.pitch-topbar-actions .account-trigger,
.stats-topbar-actions .account-trigger,
.admin-header__tools .account-trigger,
.topbar-actions .account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  max-width: 230px;
  white-space: nowrap;
}

.leader-actions .account-trigger > span:last-child,
.pitch-topbar-actions .account-trigger > span:last-child,
.stats-topbar-actions .account-trigger > span:last-child,
.admin-header__tools .account-trigger > span:last-child,
.topbar-actions .account-trigger > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  background: var(--ui-surface, #fff);
  box-shadow: 0 2px 8px rgba(7, 29, 54, .22);
}

.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-trigger[data-authenticated="true"] { max-width: 230px; }

@media (max-width: 680px) {
  .leader-actions .account-trigger,
  .pitch-topbar-actions .account-trigger,
  .stats-topbar-actions .account-trigger,
  .admin-header__tools .account-trigger,
  .topbar-actions .account-trigger {
    max-width: 48px;
    padding-inline: 8px;
  }
  .leader-actions .account-trigger > span:last-child,
  .pitch-topbar-actions .account-trigger > span:last-child,
  .stats-topbar-actions .account-trigger > span:last-child,
  .admin-header__tools .account-trigger > span:last-child,
  .topbar-actions .account-trigger > span:last-child { display: none; }
}
