/* ═══════════════════════════════════════════════════════════════════════
   KOZMETİKLER · Profil kartı
   The card opened from a member-list row (and the market's try-on preview).
   It is the surface for profile frames and effects, and shows the avatar
   decoration and nameplate at their largest.
   ═══════════════════════════════════════════════════════════════════════ */

.cosmProfileCard {
  /* Geometry the cosmetic art relies on: effects centre on the avatar, frames follow the radius. */
  --cosm-card-radius: 14px;
  --cosm-banner-height: 84px;
  --cosm-avatar-size: 80px;
  --cosm-avatar-x: 58px;
  --cosm-avatar-y: 82px;
  position: relative;
  width: 300px;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--border-rgb) / 0.16);
  border-radius: var(--cosm-card-radius);
  /* Opaque, so nothing behind a popover shows through the banner or the frame art. */
  background: linear-gradient(var(--card-strong), var(--card-strong)), var(--bg-deep, #111214);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.cosmProfileBanner {
  height: var(--cosm-banner-height);
  background:
    radial-gradient(120% 140% at 85% -20%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, var(--bg-deep)), color-mix(in srgb, var(--accent) 8%, var(--card-strong)));
}

.cosmProfileAvatarSlot {
  position: absolute;
  top: 42px;
  left: 18px;
  width: 80px;
  height: 80px;
}

.cosmProfileAvatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 4px solid var(--card-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)), var(--card-strong);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
}

.cosmProfileAvatarImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button.cosmProfileAvatar {
  padding: 0;
  color: inherit;
  font-family: inherit;
}

button.cosmProfileAvatar:not(:disabled) {
  cursor: pointer;
}

button.cosmProfileAvatar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cosmProfileStatusDot {
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--card-strong);
  border-radius: 50%;
  background: var(--status-offline);
}

.cosmProfileStatusDot[data-status="online"] { background: var(--success); }
.cosmProfileStatusDot[data-status="idle"] { background: var(--status-away); }

.cosmProfileBody {
  display: grid;
  gap: 8px;
  padding: 50px 22px 24px;
}

.cosmProfileNameplate {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgb(var(--border-rgb) / 0.04);
}

.cosmProfileNameplate.hasCosmPlate {
  border-color: transparent;
}

.cosmProfileName {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cosmProfileSelf {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.cosmProfileSelf[hidden] {
  display: none;
}

.cosmProfileStatus {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12.5px;
}

.cosmProfileFooter:empty {
  display: none;
}

.cosmProfileFooter .btn[hidden] {
  display: none;
}

.cosmProfilePopover {
  position: fixed;
  z-index: 1200;
  outline: none;
  animation: cosmPopoverIn 0.14s ease-out;
}

.cosmProfilePopover[hidden] {
  display: none;
}

@keyframes cosmPopoverIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cosmProfilePopover {
    animation: none;
  }
}

.onlineUserRow[tabindex="0"] {
  cursor: pointer;
}

.onlineUserRow[tabindex="0"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 1px;
}
