/*
  Avatar 06 — Activity Ring Avatar — standalone HTML/CSS/JS.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --ring-fg: oklch(0.18 0 0);
  --ring-seen: oklch(0.83 0 0);
  --ring-muted: oklch(0.5 0 0);
  --ring-accent: #39ff14;
}

.avatar06 {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: none;
  padding: 0.375rem 0.25rem 0.25rem;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: inherit;
  cursor: pointer;
  outline: none;
}

.avatar06:focus-visible {
  outline: 2px solid var(--ring-fg);
  outline-offset: 2px;
}

.avatar06__ring {
  position: relative;
  display: flex;
  width: 4rem;
  height: 4rem;
  align-items: center;
  justify-content: center;
}

.avatar06__ring svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.avatar06__segment {
  transition: stroke 260ms ease-out;
}

.avatar06__segment[data-state="unseen"] {
  stroke: var(--ring-fg);
}

.avatar06__segment[data-state="seen"] {
  stroke: var(--ring-seen);
}

/* The update being viewed draws its segment in, once. */
.avatar06__segment[data-state="current"] {
  stroke: var(--ring-accent);
  animation: avatar06-draw 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.avatar06__face {
  position: relative;
  display: flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9999px;
  background-color: oklch(0.93 0.03 160);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  color: oklch(0.38 0.06 160);
  user-select: none;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.avatar06:hover .avatar06__face {
  transform: scale(0.94);
}

.avatar06__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 240ms ease-out;
}

.avatar06__image[data-loaded] {
  opacity: 1;
}

.avatar06__image[data-failed] {
  display: none;
}

.avatar06__caption {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--ring-muted);
}

.avatar06[data-unread] .avatar06__caption {
  font-weight: 500;
  color: var(--ring-fg);
}

.avatar06[aria-pressed="true"] .avatar06__caption {
  font-weight: 600;
  color: var(--ring-fg);
}

.avatar06__marker {
  width: 1rem;
  height: 0.125rem;
  border-radius: 9999px;
  background-color: transparent;
}

.avatar06[aria-pressed="true"] .avatar06__marker {
  background-color: var(--ring-accent);
}

@keyframes avatar06-draw {
  from {
    stroke-dasharray: 0 var(--avatar06-c);
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar06__segment,
  .avatar06__face,
  .avatar06__image {
    transition: none;
  }
  .avatar06__segment[data-state="current"] {
    animation: none;
  }
  .avatar06:hover .avatar06__face {
    transform: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
p {
  margin: 0;
}
.avatar06-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}
.avatar06-layout__card {
  width: 100%;
  max-width: 40rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 16px 40px -16px rgba(0, 0, 0, 0.12);
}
.avatar06-layout__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem 0;
}
.avatar06-layout__heading {
  font-size: 15px;
  font-weight: 600;
  color: oklch(0.205 0 0);
}
.avatar06-layout__date {
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
.avatar06-layout__strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.25rem;
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
  list-style: none;
}
.avatar06-layout__strip li {
  min-width: 0;
}
.avatar06-layout__viewer {
  border-top: 1px solid oklch(0.97 0 0);
  padding: 1rem 1.25rem;
}
.avatar06-layout__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.avatar06-layout__who {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: oklch(0.205 0 0);
}
.avatar06-layout__time {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: oklch(0.556 0 0);
}
.avatar06-layout__count {
  font-size: 0.75rem;
  line-height: 1rem;
  font-variant-numeric: tabular-nums;
  color: oklch(0.556 0 0);
}
.avatar06-layout__bars {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
}
.avatar06-layout__bar {
  height: 0.125rem;
  flex: 1;
  border-radius: 9999px;
  background: oklch(0.922 0 0);
}
.avatar06-layout__bar[data-on] {
  background: oklch(0.205 0 0);
}
.avatar06-layout__text {
  min-height: 2.5rem;
  margin-top: 0.75rem;
  font-size: 15px;
  line-height: 1.25rem;
  color: oklch(0.371 0 0);
}
.avatar06-layout__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.avatar06-layout__prev,
.avatar06-layout__next {
  height: 2.25rem;
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition:
    color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.avatar06-layout__prev {
  border: 1px solid oklch(0.922 0 0);
  background: transparent;
  color: oklch(0.269 0 0);
}
.avatar06-layout__prev:hover {
  background: oklch(0.985 0 0);
}
.avatar06-layout__prev[aria-disabled="true"] {
  cursor: default;
  color: oklch(0.708 0 0);
}
.avatar06-layout__prev[aria-disabled="true"]:hover {
  background: #ffffff;
}
.avatar06-layout__next {
  border: 0;
  background: oklch(0.205 0 0);
  color: #ffffff;
}
.avatar06-layout__next:hover {
  background: oklch(0.371 0 0);
}
.avatar06-layout__prev:focus-visible,
.avatar06-layout__next:focus-visible {
  outline: 2px solid oklch(0.205 0 0);
  outline-offset: 2px;
}
@media (min-width: 40rem) {
  .avatar06-layout {
    padding: 2rem;
  }
  .avatar06-layout__head {
    padding: 1rem 1.5rem 0;
  }
  .avatar06-layout__strip {
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.75rem;
  }
  .avatar06-layout__viewer {
    padding: 1rem 1.5rem;
  }
}
