.nano-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;

  .nano-timeline__item {
    position: relative;
    display: flex;
    gap: var(--space-3);
    padding-bottom: var(--space-4);

    &:last-child {
      padding-bottom: 0;

      .nano-timeline__line {
        display: none;
      }
    }
  }

  .nano-timeline__marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.125rem;
    border-radius: var(--radius-full);
    background-color: hsl(var(--color-muted));
    color: hsl(var(--color-muted-foreground));
    border: 2px solid hsl(var(--color-background));
    box-shadow: 0 0 0 2px hsl(var(--color-border));

    svg {
      width: 0.75rem;
      height: 0.75rem;
    }
  }

  .nano-timeline__line {
    position: absolute;
    left: 0.6875rem;
    top: 1.75rem;
    bottom: -0.25rem;
    width: 2px;
    background-color: hsl(var(--color-border));
    z-index: 0;
  }

  .nano-timeline__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-0-5);
    flex: 1;
    min-width: 0;
    padding-bottom: var(--space-2);
  }

  .nano-timeline__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
    flex-wrap: wrap;
  }

  .nano-timeline__title {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: hsl(var(--color-foreground));
    line-height: var(--leading-tight);
  }

  .nano-timeline__time {
    font-size: var(--text-xs);
    color: hsl(var(--color-muted-foreground));
    white-space: nowrap;
  }

  .nano-timeline__description {
    font-size: var(--text-sm);
    color: hsl(var(--color-muted-foreground));
    line-height: var(--leading-normal);
  }

  .nano-timeline__meta {
    display: inline-flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: hsl(var(--color-muted-foreground));
    font-family: var(--font-mono);
  }

  .nano-timeline__item--success .nano-timeline__marker {
    background-color: hsl(var(--color-success));
    color: hsl(var(--color-success-foreground));
  }

  .nano-timeline__item--warning .nano-timeline__marker {
    background-color: hsl(var(--color-warning));
    color: hsl(var(--color-warning-foreground));
  }

  .nano-timeline__item--destructive .nano-timeline__marker {
    background-color: hsl(var(--color-destructive));
    color: hsl(var(--color-destructive-foreground));
  }

  .nano-timeline__item--info .nano-timeline__marker {
    background-color: hsl(var(--color-primary));
    color: hsl(var(--color-primary-foreground));
  }

  &.nano-timeline--compact {
    .nano-timeline__item {
      padding-bottom: var(--space-3);
    }

    .nano-timeline__marker {
      width: 1rem;
      height: 1rem;

      svg {
        width: 0.625rem;
        height: 0.625rem;
      }
    }

    .nano-timeline__line {
      left: 0.4375rem;
      top: 1.25rem;
    }
  }
}
