@use "../../wwwroot/scss/variables" as *;

.timeline {
    --bb-timeline-item-padding: #{$bb-timeline-item-padding};
    --bb-timeline-line-width: #{$bb-timeline-line-width};
    --bb-timeline-node-bg: #{$bb-timeline-node-bg};
    --bb-timeline-timestamp-color: #{$bb-timeline-timestamp-color};
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline .time-line-item {
    position: relative;
}

.timeline .time-line-item:not(:last-child) {
    padding: var(--bb-timeline-item-padding);
}

.timeline .time-line-item .time-line-item-tail {
    position: absolute;
    left: 4px;
    height: 100%;
    border-left: var(--bb-timeline-line-width) solid var(--bs-border-color);
}

.timeline .time-line-item:last-child .time-line-item-tail {
    display: none
}

.timeline .timeline-item-node-normal {
    left: -1px;
    width: 12px;
    height: 12px;
}

.timeline .timeline-item-node {
    position: absolute;
    background-color: var(--bb-timeline-node-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timeline .timeline-item-node.is-icon {
    background-color: transparent;
}

.timeline .timeline-item-wrapper {
    position: relative;
    padding-left: 1.5rem;
    top: -4px;
}

.timeline .timeline-item-timestamp {
    margin-block-start: 0.5rem;
    color: var(--bb-timeline-timestamp-color);
}

.timeline.is-alternate .time-line-item-tail,
.timeline.is-alternate .timeline-item-node {
    left: 50%;
}

.timeline.is-alternate .timeline-item-node {
    margin-left: -5px;
}

.timeline.is-alternate .time-line-item:nth-child(odd) .timeline-item-wrapper {
    left: calc(50% - 5px);
    width: calc(50% - 1rem);
    text-align: left;
}

.timeline.is-alternate .time-line-item:nth-child(even) .timeline-item-wrapper {
    width: calc(50% - 1rem);
    margin: 0;
    text-align: right;
}

.timeline.is-left .time-line-item-tail,
.timeline.is-left .timeline-item-node {
    left: 100%;
}

.timeline.is-left .timeline-item-node {
    margin-left: -5px;
}

.timeline.is-left .time-line-item .timeline-item-wrapper {
    width: calc(100% - 1rem);
    margin: 0;
    text-align: right;
}
