/* 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 #16181d;
  cursor: pointer;
  display: block;
}

/* 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 #16181d;
  background: #747f8d;
  transition: background 0.15s ease;
}
.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 {
  display: none;
  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: 600;
  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: background 0.15s ease, border-color 0.15s ease;
  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);
}

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

/* Social links — clickable profile icons, styled like platform indicators */
.social-links {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  touch-action: manipulation;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.social-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.social-link:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

.social-link.steam:hover { color: #66c0f4; border-color: rgba(102,192,244,0.35); }

/* 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;
}

.user-badge:hover {
  opacity: 1;
}

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

/* Mobile: compact presence card. These sizes live HERE (not layout.css)
   because panel.css loads last of the two — the base rules above would
   otherwise win on source order and the shrink would never apply. */
@media (max-width: 768px) {
  .avatar-container,
  .avatar          { width: 56px; height: 56px; }
  .avatar          { border-width: 4px; }
  .avatar-deco     { width: 74px; height: 74px; }
  .status-badge    { width: 17px; height: 17px; border-width: 3px; }
  #bottom-panel.has-banner .avatar-container { margin-top: -36px; }
  .display-name    { font-size: 1.15rem; }
  .username        { font-size: 0.8rem; }
  .status-text     { font-size: 0.66rem; }
  .user-info       { margin-top: 6px; }
}

@media (max-width: 480px) {
  .avatar-container,
  .avatar          { width: 48px; height: 48px; }
  .avatar          { border-width: 3px; }
  .avatar-deco     { width: 64px; height: 64px; }
  .status-badge    { width: 15px; height: 15px; border-width: 3px; }
  #bottom-panel.has-banner .avatar-container { margin-top: -30px; }
  .display-name    { font-size: 1.02rem; }
  .username        { font-size: 0.76rem; }
  .status-text     { font-size: 0.62rem; }
}
