.activity-timeline {
  --working: #555555;
  --waiting: #cdcdcd;
  --human: #424242;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 13px;
  overflow: hidden;
}
.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 24px;
  border-bottom: 1px solid #ededed;
}
.timeline-toolbar h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
}
.timeline-window {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  color: #777777;
}
.timeline-window select {
  font: 11px var(--font);
  color: #444444;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  border-radius: 7px;
  padding: 7px 25px 7px 10px;
  cursor: pointer;
}
.timeline-window select:focus-visible {
  outline: 2px solid #444444;
  outline-offset: 3px;
}
.timeline-body {
  padding: 0 24px;
}
.timeline-axis {
  display: flex;
  justify-content: space-between;
  margin-left: 180px;
  margin-right: 118px;
  padding: 17px 0 12px;
  color: #858585;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.timeline-axis > span:last-child {
  text-align: right;
}
.timeline-axis i {
  font-style: normal;
  color: #999999;
  margin-left: 3px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 98px;
  gap: 20px;
  align-items: center;
  min-height: 67px;
  border-top: 1px solid #ededed;
}
.timeline-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.timeline-agent strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.timeline-agent > div > span {
  display: block;
  font-size: 11px;
  color: #777777;
  margin-top: 4px;
}
.bot-icon {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 27px;
  height: 25px;
  border: 1px solid #e3e3e3;
  background: #fafafa;
  border-radius: 8px;
  color: #666666;
}
.bot-icon::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 5px;
  background: currentColor;
  left: 12px;
  top: -6px;
}
.bot-icon::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  left: 11px;
  top: -7px;
}
.bot-icon i {
  position: absolute;
  width: 3px;
  height: 5px;
  background: currentColor;
  left: 6px;
  top: 8px;
  border-radius: 1px;
  box-shadow: 10px 0 currentColor;
}
.bot-icon i::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1px;
  background: currentColor;
  top: 8px;
  left: 4px;
}
.timeline-track {
  position: relative;
  min-width: 0;
  height: 44px;
  background: repeating-linear-gradient(
    90deg,
    #e9e9e9 0,
    #e9e9e9 1px,
    transparent 1px,
    transparent 25%
  );
  background-size: 100% 21px;
  background-position: 0 8px;
  background-repeat: no-repeat;
}
.timeline-bar {
  position: absolute;
  top: 13px;
  height: 11px;
  min-width: 2px;
  border: 0;
  border-radius: 2px;
  padding: 0;
  transition: filter 0.15s;
  background: var(--working);
}
.timeline-bar::before {
  content: "";
  position: absolute;
  inset: -7px 0;
}
.timeline-bar.input {
  background: var(--waiting);
}
.timeline-bar.wait,
.legend-key.wait {
  background: repeating-linear-gradient(
    135deg,
    #b8b8b8 0,
    #b8b8b8 3px,
    #f6f6f6 3px,
    #f6f6f6 7px
  );
}
.timeline-bar:hover,
.timeline-bar:focus-visible {
  filter: brightness(0.8);
  z-index: 1;
}
.timeline-bar:focus-visible,
.timeline-touchpoint:focus-visible {
  outline: 2px solid #444444;
  outline-offset: 3px;
}
.timeline-touchpoint {
  position: absolute;
  top: 25px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 4px;
}
.timeline-touchpoint > span {
  display: block;
  width: 6px;
  height: 8px;
  transform: rotate(35deg);
  border-radius: 1px;
  background: var(--human);
}
.timeline-touchpoint:hover > span {
  background: #151515;
  transform: rotate(35deg) scale(1.25);
}
.timeline-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.timeline-total strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #333333;
}
.timeline-total strong > span {
  font-weight: 400;
  color: #777777;
}
.timeline-total > span {
  display: block;
  font-size: 10px;
  color: #8a8a8a;
  margin-top: 4px;
}
.timeline-row.delivered .timeline-agent,
.timeline-row.delivered .timeline-total {
  opacity: 0.5;
}
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 21px;
  padding: 17px 0 19px;
  font-size: 10px;
  color: #737373;
  border-top: 1px solid #ededed;
}
.timeline-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.legend-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
}
.legend-key.work {
  background: var(--working);
}
.legend-key.input {
  background: var(--waiting);
}
.legend-key.human {
  background: var(--human);
  width: 6px;
  height: 8px;
  transform: rotate(35deg);
  border-radius: 1px;
  margin-inline: 2px;
}
.timeline-legend .legend-empty {
  color: #999999;
  margin-left: auto;
}
.timeline-detail {
  font-size: 11px;
  color: #555555;
  padding: 13px 24px;
  border-top: 1px solid #e9e9e9;
  background: #ffffff;
  min-height: 42px;
  line-height: 1.6;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .timeline-row {
    grid-template-columns: 135px minmax(0, 1fr) 85px;
    gap: 15px;
  }
  .timeline-axis {
    margin-left: 150px;
    margin-right: 100px;
  }
  .timeline-legend {
    gap: 12px 15px;
  }
  .timeline-legend .legend-empty {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  .timeline-toolbar {
    padding: 16px;
    align-items: flex-start;
    gap: 12px;
  }
  .timeline-toolbar h3 {
    font-size: 12px;
    line-height: 1.5;
    max-width: 120px;
  }
  .timeline-window > span {
    display: none;
  }
  .timeline-window select {
    font-size: 10px;
    padding: 6px;
    max-width: 113px;
  }
  .timeline-body {
    padding: 0 15px;
  }
  .timeline-axis {
    margin: 0;
    padding: 16px 0 10px;
    font-size: 8px;
  }
  .timeline-row {
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 16px 0 8px;
  }
  .timeline-agent {
    gap: 9px;
  }
  .timeline-agent strong {
    font-size: 11px;
  }
  .timeline-agent > div > span {
    font-size: 9px;
    margin-top: 2px;
  }
  .bot-icon {
    transform: scale(0.85);
    transform-origin: left center;
    margin-right: -3px;
  }
  .timeline-track {
    grid-column: 1/-1;
    grid-row: 2;
    height: 40px;
    margin-top: 2px;
  }
  .timeline-total {
    grid-column: 2;
    grid-row: 1;
  }
  .timeline-total strong {
    font-size: 10px;
  }
  .timeline-total > span {
    font-size: 8px;
  }
  .timeline-legend {
    gap: 12px 16px;
    font-size: 8px;
    padding: 16px 0;
  }
  .timeline-detail {
    font-size: 9px;
    padding: 12px 15px;
    min-height: 53px;
  }
  .timeline-row.delivered {
    padding-bottom: 14px;
  }
  .timeline-row.delivered .timeline-track {
    display: none;
  }
}

.demo-tabs button:focus-visible {
  outline-color: #444;
}
