/* The AI team panel, live dots, chips and text that cycles between jobs. */

.members {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--panel-line);
}

.avatar {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--panel-fg);
  color: var(--panel-bg);
  font-weight: 600;
}

.avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--panel-bg);
}

.member-text {
  min-width: 0;
}

.member-name b {
  font-weight: 600;
}

.member-name span {
  color: var(--panel-label);
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

.member-text .cycle {
  color: var(--panel-label);
}

.member:nth-child(2) .cycle span {
  animation-delay: -1.5s;
}

.member:nth-child(2) .cycle span:nth-child(2) {
  animation-delay: 1.5s;
}

.member:nth-child(2) .cycle span:nth-child(3) {
  animation-delay: 4.5s;
}

.member:nth-child(3) .cycle span {
  animation-delay: -6s;
}

.member:nth-child(3) .cycle span:nth-child(2) {
  animation-delay: -3s;
}

.member:nth-child(3) .cycle span:nth-child(3) {
  animation-delay: 0s;
}

.team-message {
  margin-top: 1rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--sheet);
}

.msg-sender {
  display: block;
  color: var(--mist);
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
}

.msg-sender b {
  color: var(--yellow);
  font-weight: 600;
}

.team-message .chip-ok {
  margin-top: 0.75rem;
  color: var(--ink);
  background: var(--yellow-light);
  border-color: var(--yellow-light);
}

@media (prefers-reduced-motion: no-preference) {
  .team-message {
    animation: message-in 0.6s var(--ease) 1.2s backwards;
  }

  @keyframes message-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.live::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--panel-fg);
  box-shadow: 0 0 0 0 rgba(12, 14, 19, 0.45);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  to {
    box-shadow: 0 0 0 0.6rem rgba(12, 14, 19, 0);
  }
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  white-space: nowrap;
}

.chip-ok {
  color: var(--sheet);
  background: var(--ink);
  border-color: var(--ink);
}

.cycle {
  position: relative;
  display: inline-grid;
}

.cycle span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: cycle 9s infinite;
}

.cycle span:nth-child(2) {
  animation-delay: 3s;
}

.cycle span:nth-child(3) {
  animation-delay: 6s;
}

@keyframes cycle {
  0%,
  30% {
    opacity: 1;
  }
  36%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live::before,
  .cycle span {
    animation: none;
  }

  .cycle span:first-child {
    opacity: 1;
  }
}
