[data-component="project-avatar-v2"] {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

[data-component="project-avatar-v2"][data-unread] {
  overflow: visible;
}

[data-slot="project-avatar-surface"] {
  --project-avatar-bg: var(--v2-avatar-bg-gray);
  --project-avatar-border: var(--v2-avatar-border-gray);
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(180deg, var(--v2-alpha-light-16) 0%, var(--v2-alpha-light-0) 100%), var(--project-avatar-bg);
  box-shadow: inset 0 0 0 0.5px var(--project-avatar-border);
  font-weight: 530;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.05px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  color: var(--v2-avatar-fg);
  text-shadow: 0 0 4px var(--v2-alpha-dark-20);
  user-select: none;
  -webkit-user-select: none;
}

[data-slot="project-avatar-surface"][data-variant="orange"] {
  --project-avatar-bg: var(--v2-avatar-bg-orange);
  --project-avatar-border: var(--v2-avatar-border-orange);
}

[data-slot="project-avatar-surface"][data-variant="yellow"] {
  --project-avatar-bg: var(--v2-avatar-bg-yellow);
  --project-avatar-border: var(--v2-avatar-border-yellow);
}

[data-slot="project-avatar-surface"][data-variant="cyan"] {
  --project-avatar-bg: var(--v2-avatar-bg-cyan);
  --project-avatar-border: var(--v2-avatar-border-cyan);
}

[data-slot="project-avatar-surface"][data-variant="green"] {
  --project-avatar-bg: var(--v2-avatar-bg-green);
  --project-avatar-border: var(--v2-avatar-border-green);
}

[data-slot="project-avatar-surface"][data-variant="red"] {
  --project-avatar-bg: var(--v2-avatar-bg-red);
  --project-avatar-border: var(--v2-avatar-border-red);
}

[data-slot="project-avatar-surface"][data-variant="pink"] {
  --project-avatar-bg: var(--v2-avatar-bg-pink);
  --project-avatar-border: var(--v2-avatar-border-pink);
}

[data-slot="project-avatar-surface"][data-variant="blue"] {
  --project-avatar-bg: var(--v2-avatar-bg-blue);
  --project-avatar-border: var(--v2-avatar-border-blue);
}

[data-slot="project-avatar-surface"][data-variant="purple"] {
  --project-avatar-bg: var(--v2-avatar-bg-purple);
  --project-avatar-border: var(--v2-avatar-border-purple);
}

[data-slot="project-avatar-surface"][data-variant="gray"] {
  --project-avatar-bg: var(--v2-avatar-bg-gray);
  --project-avatar-border: var(--v2-avatar-border-gray);
}

[data-slot="project-avatar-surface"][data-has-image] {
  background: var(--project-avatar-bg);
}

[data-slot="project-avatar-surface"] [data-slot="project-avatar-image"] {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

[data-slot="project-avatar-surface"] [data-slot="project-avatar-loader"] {
  position: absolute;
  inset: -3px;
  z-index: 2;
  border-radius: 0;
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--v2-grey-100) 0deg,
    var(--v2-grey-1200) 0.04deg,
    var(--v2-alpha-dark-50) 90deg,
    var(--v2-grey-100) 360deg
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
  animation: project-avatar-v2-loader-spin 1.2s linear infinite;
}

@keyframes project-avatar-v2-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

[data-component="project-avatar-v2"][data-unread] [data-slot="project-avatar-surface"] {
  -webkit-mask-image: radial-gradient(circle 4.5px at calc(100% - 1px) 1px, transparent 4.5px, black 4.5px);
  mask-image: radial-gradient(circle 4.5px at calc(100% - 1px) 1px, transparent 4.5px, black 4.5px);
}

[data-slot="project-avatar-unread-dot"] {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 6px;
  right: -2px;
  top: -2px;
  border-radius: 9999px;
  background: var(--v2-background-bg-accent);
  pointer-events: none;
}

[data-slot="project-avatar-slot"] {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  overflow: visible;
}
