.bg__segment-header {
    border-left: 3px solid transparent;
    padding: 0 30px 0 0;
    font-size: 12px;
    font-family: $fontHeading;
    height: 35px;
    line-height: 35px;
    cursor: pointer;
    background-image: $arrowDownDarkUrl;
    background-position: right 9px center;
    background-repeat: no-repeat;
    background-size: 12px;

    transition: background-color 0.3s ease-out, border-color 0.3s ease-out;

    &:hover {
        background-color: $clGrey;

        .delete {
            display: block;
        }
        .title {
            max-width: calc(100% - 90px);
        }
    }

    &.active {
        background-color: $clGrey;
        background-image: $arrowUpDarkUrl;
        &:hover {
            background-color: mix($clGrey, white, 50%);
        }
    }

    &.highlight {
        border-left: 3px solid $clSecondary;
        background-color: mix($clSecondary, white, 15%) !important;
    }

    .title {
        display: inline-block;
        user-select: none;
        cursor: pointer;
        transition: opacity 0.3s ease-out;
        white-space: nowrap;
        max-width: calc(100% - 60px);
        text-overflow: ellipsis;
        overflow: hidden;

        &:hover {
            opacity: 0.8;
        }
    }

    .delete {
        display: none;
        color: $clPrimary;
        font-size: 0;
        float: right;
        width: 30px;
        height: 35px;
        transition: background-color 0.3s ease-out;
        background-image: $iconTrashUrl;
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 18px;
        &:hover {
            background-color: rgba($clSecondary, 0.2);
        }
    }

    .form {
        display: inline-block;
        // negative margins keep the segment line height intact
        margin-top: -5px;
        margin-left: -5px;
        margin-bottom: -5px;
        line-height: 20px;
        padding: 5px 0;

        &.spatial {
            input {
                display: inline-block;
                margin-left: 5px;
                margin-right: 5px;
                max-width: 40px;
                border: 1px solid $clGreyTint;
                border-radius: 3px;
                padding: 4px;
                font-size: 13px;

                &:focus {
                    border-bottom: 1px dotted $clPrimary;
                    border-left: 0;
                }

                // hide arrow buttons
                /* Chrome, Safari, Edge, Opera */
                &::-webkit-outer-spin-button,
                &::-webkit-inner-spin-button {
                    -webkit-appearance: none;
                    margin: 0;
                }
                // FireFox
                -moz-appearance: textfield;
            }
        }
    }

    > .count {
        float: right;
        margin-top: 7px;
        font-size: 12px;
        line-height: 12px;
        color: $clDark;
        background-color: $clGrey;
        border-radius: 15px;
        padding: 3px;
        min-width: 18px;
        text-align: center;
    }

    .play-segment {
        margin-right: 2px;
        vertical-align: top;
        padding: 8px;
        font-size: 9px;
        &:hover {
            .fa-play {
                color: $clDarkGrey;
            }
        }
    }
}
