/* SG Chat Web Client — Avatar component styles.
 * Self-contained per docs/wave4-6-web-client-architecture.md §1 pattern:
 * does not override or redefine any selector from style.css/contacts.css.
 *
 * Ports the mockup's .avatar-illo / .avatar-ring treatment
 * (sketches/005-hybrid-001-colors/index.html) to token-driven values —
 * uses tokens.css's --ring-gradient (already defined for exactly this
 * purpose) instead of hardcoding the conic-gradient stops again.
 */

.avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-illo {
  border-radius: var(--radius-pill);
  background: linear-gradient(160deg, var(--color-accent-soft), var(--color-success-soft));
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Presence ring — conic-gradient border wrapping the avatar, shown only
 * for online users (per mockup: "thin online-presence ring", not a
 * global motif). */
.avatar-ring {
  background: var(--ring-gradient);
  padding: 3px;
  border-radius: var(--radius-pill);
  box-sizing: border-box;
}
.avatar-ring .avatar-illo {
  border: 2px solid var(--color-surface);
}

.avatar-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  border: 2px solid var(--color-surface);
}

/* --- Avatar picker (profile / "My avatar" panel) --- */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
  max-width: 420px;
}

.avatar-picker-option {
  border: 1.5px solid transparent;
  background: var(--color-bg-alt);
  border-radius: var(--radius-pill);
  width: 44px;
  height: 44px;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
  padding: 0;
}
.avatar-picker-option:hover {
  transform: scale(1.08);
}
.avatar-picker-option.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.avatar-picker-option:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
