/* Discord Presence Panel */

/* Vertical layout like the test card: avatar on top, name/username below,
   everything left-aligned */
.presence-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  position: relative;
}

/* Avatar + status, left-aligned */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}

.avatar-container {
  position: relative;
  margin-top: 0;
  width: 84px;
  height: 84px;
  transition: margin-top 0.4s cubic-bezier(0.4,0,0.2,1);
}
/* only straddle the banner line when a banner is actually shown */
#bottom-panel.has-banner .avatar-container {
  margin-top: -56px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--bp-accent-border, rgba(8,14,26,0.95));
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.22s var(--spring, ease);
  display: block;
}
.avatar:hover { transform: scale(1.06); }

/* Avatar decoration (animated frame) — overlays the 84px avatar */
.avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  pointer-events: none;
  display: none;
  z-index: 2;
}

.status-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 5px solid var(--bp-accent-border, rgba(8,14,26,0.95));
  background: #747f8d;
  transition: background 0.4s;
}
.status-badge.online  { background: #3ba55c; }
.status-badge.idle    { background: #faa61a; }
.status-badge.dnd     { background: #ed4245; }
.status-badge.offline { background: #747f8d; }

/* username + status on one line */
.username-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.status-sep {
  color: rgba(255,255,255,0.32);
  font-size: 0.92rem;
  line-height: 1;
}

.status-text {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.52);
}

.status-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #747f8d;
  flex-shrink: 0;
  transition: background 0.3s;
}

.status-icon.online { background: #3ba55c; }
.status-icon.idle   { background: #faa61a; }
.status-icon.dnd    { background: #ed4245; }

/* Display Name + Username — under the avatar, left-aligned */
.user-info {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  /* nudge down so the name clears the donut's overhang below the avatar */
  margin-top: 10px;
}

.name-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.display-name {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--bp-accent, #fff);
  line-height: 1.1;
  cursor: pointer;
  transition: opacity 0.15s;
  margin: 0;
  padding: 0;
}

.display-name:hover {
  opacity: 0.68;
}

.username {
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: opacity 0.15s;
  margin: 0;
  padding: 0;
}

.username:hover {
  opacity: 0.68;
}

/* Platform Indicators */
.platform-indicators {
  display: none;
  gap: 6px;
  margin-top: 6px;
}

.platform-indicator {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: default;
}

.platform-indicator i {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  transition: color 0.3s;
}

.platform-indicator.active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.platform-indicator.active i {
  color: rgba(255,255,255,0.85);
}

/* Utilities */
.discord-hint-dot { display: none; }

.custom-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.48);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}

.custom-status img { flex-shrink: 0; }

.user-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  cursor: default;
  opacity: 0.82;
  transition: opacity 0.15s, transform 0.15s;
}

.user-badge:hover {
  opacity: 1;
  transform: scale(1.22);
}

.user-badge i { font-size: 13px; }
