/* style-r5-avatars.css - design round 5, JOB 2: USER AVATARS. Loaded after style-r5-chat.css. Pure CSS: refined look for every .avatar (photo or initial), colour-matched bot avatars in chats,
   a bar-colour ring for people at a place, nicer presence dots, press feedback. Photo avatars keep their inline background-image; only the fallback (initial) look is new. */
.avatar { background-color: #0A9E48; background-image: linear-gradient(145deg, #3CE680 0%, #06C755 55%, #04A845 100%); background-size: cover; background-position: center; color: #04200E; font-weight: 800; letter-spacing: .01em; text-transform: uppercase;
  line-height: 1; user-select: none; -webkit-user-select: none; position: relative; text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
  box-shadow: 0 0 0 2px #121212, 0 0 0 3px rgba(255, 255, 255, .13), 0 3px 8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), box-shadow .15s; }
.avatar[style*="background-image"] { text-shadow: none; }                              /* photo: no initial to shadow, and the gradient above never shows through */
.avatar:active { transform: scale(.94); }
.topbar .avatar, #chat-list li .avatar, .panel-inner .avatar, .bar-card .avatar, .grp-card .avatar { box-shadow: 0 0 0 2px #1C1C1E, 0 0 0 3px rgba(255, 255, 255, .13), 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }

/* sizes: nothing smaller than 28px inside a chat; bigger header / list / profile avatars */
.avatar-xs { width: 28px; height: 28px; font-size: 12px; }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.avatar-md { width: 46px; height: 46px; font-size: 17px; }
.avatar-lg { width: 96px; height: 96px; font-size: 34px; }
#profile-avatar.avatar-lg { width: 120px; height: 120px; font-size: 44px; }
.msg-row .avatar { width: 32px; height: 32px; font-size: 13px; }

/* bots keep the colour of their bubbles (Kappy purple, Claude blue, Hermes amber) */
.msg-row:has(> .msg.kappy) > .avatar { background-image: linear-gradient(145deg, #C9A6FF, #8A5CE0 60%, #6B3FC0); color: #1F0D3F; }
.msg-row:has(> .msg.claude) > .avatar { background-image: linear-gradient(145deg, #8CCBFF, #3C8DE0 60%, #2766B8); color: #06223F; }
.msg-row:has(> .msg.hermes) > .avatar { background-image: linear-gradient(145deg, #FFD08A, #F09A2E 60%, #C97812); color: #3A1F00; }
.friend-item.bot .avatar { box-shadow: 0 0 0 2px #121212, 0 0 0 4px #06C755, 0 3px 10px rgba(6, 199, 85, .4); }

/* friends row: a ring like a "story", presses in */
#friends-bar .friend-item .avatar { width: 44px; height: 44px; box-shadow: 0 0 0 2px #1C1C1E, 0 0 0 4px rgba(6, 199, 85, .65), 0 4px 10px rgba(0, 0, 0, .45); }

/* people who are AT a place (the row carries --barcol): the avatar gets that bar's colour ring */
.chat-place-row.here .avatar, #chat-list li.host-chat .avatar { box-shadow: 0 0 0 2px #1C1C1E, 0 0 0 4px var(--barcol, #FFB547), 0 3px 10px rgba(0, 0, 0, .45); }
.place-person.friend .avatar { box-shadow: 0 0 0 2px #1C1C1E, 0 0 0 4px #34C759; }

/* presence: a crisp dot with a ring and a soft glow when online */
.pres-dot { width: 14px; height: 14px; border: 2.5px solid #121212; box-shadow: 0 0 0 0 transparent; z-index: 1; }
.pres-dot.on { background: #30D158; box-shadow: 0 0 8px rgba(48, 209, 88, .75); } .pres-dot.away { background: #FFD60A; } .pres-dot.off { background: #636366; }
#chat-list li .av-wrap .pres-dot { border-color: #121212; }

/* big avatars in sheets / lists get a little air */
.req-card .avatar, .music-list .avatar, .bar-people .avatar { flex: none; }
.grp-member .avatar, .cal-person .avatar { box-shadow: 0 0 0 2px #1C1C1E, 0 0 0 3px rgba(255, 255, 255, .13), 0 2px 6px rgba(0, 0, 0, .4); }
@media (prefers-reduced-motion: reduce) { .avatar { transition: none; } .avatar:active { transform: none; } }
