@import "variables";

:host {
    display: block;

    &:first-of-type {
        .timeline {
            &:before {
                border-left-color: $color-grey-100;
            }
        }
        .entry-body {
            max-height: initial;
        }
    }
}
.entry {
    display: flex;
}
.timeline {
    border-left: 2px solid $color-primary-100;
    padding-bottom: 8px;
    position: relative;

    &:before {
        content: '';
        position: absolute;
        width: 2px;
        height: 32px;
        left: -2px;
        border-left: 2px solid $color-primary-100;
    }
    &:after {
        content: '';
        display: block;
        border-radius: 50%;
        width: 8px;
        height: 8px;
        background-color: $color-grey-200;
        border: 1px solid $color-grey-400;
        position: absolute;
        left: -5px;
        top: 32px;
        transition: top 0.2s;
        cursor: pointer;
    }

    .custom-icon {
        position: absolute;
        width: 32px;
        height: 32px;
        left: -17px;
        top: 32px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: $color-primary-600;
        background-color: $color-grey-100;
        border: 1px solid $color-grey-300;
        display: none;
    }
}
.entry.has-custom-icon {
    .timeline:after {
        display: none;
    }
    .custom-icon {
        display: flex;
    }
}
.entry.last {
    .timeline {
        border-left-color: transparent;
    }
}

.entry-body {
    flex: 1;
    padding-top: 24px;
    padding-left: 12px;
    line-height: 16px;
    margin-left: 12px;
    color: $color-grey-500;
    overflow: visible;
    max-height: 100px;
    transition: max-height 0.2s, padding-top 0.2s, opacity 0.2s 0.2s;
}

.featured-entry ::ng-deep {
    .title {
        color: $color-grey-800;
        font-size: 16px;
        line-height: 26px;
    }
    .note-text {
        color: $color-grey-800;
        white-space: pre-wrap;
    }
}

.detail {
    display: flex;
    color: $color-grey-400;
    font-size: 12px;
    .time {
    }
    .name {
        margin-left: 12px;
    }
}


.muted {
    .timeline, .timeline .custom-icon {
        color: $color-grey-400;
    }
}

.success {
    .timeline, .timeline .custom-icon {
        color: $color-success-400;
    }
    .timeline:after {
        background-color: $color-success-200;
        border: 1px solid $color-success-400;
    }
}

.error {
    .timeline, .timeline .custom-icon {
        color: $color-error-400;
    }
    .timeline:after {
        background-color: $color-error-200;
        border: 1px solid $color-error-400;
    }
}

.warning {
    .timeline, .timeline .custom-icon {
        color: $color-warning-400;
    }
    .timeline:after {
        background-color: $color-warning-200;
        border: 1px solid $color-warning-400;
    }
}

.collapsed {
    .entry-body {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding-top: 0;
    }
    .timeline {
        border-left-color: transparent;
    }
    .timeline:after {
        top: 0;
    }
}
