.timeMeter {
    position: relative;
    height: 15rem;
    width: 100%;

    &:before {
        display: block;
        width: 100%;
        height: 1rem;
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        background: $color--white;
        border: 1px solid $color--grayforms-border;
        border-radius: 0.5rem;
    }
}

.timeMeter__item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    background: $color--white;
    border: 1px solid $color--grayforms-border;
    box-shadow: 0 0 5px -1px rgba($color--black, 0.2);
    border-radius: 3px;

    cursor: default;

    &:hover {
        z-index: 13;
    }

}

.timeMeter__item--today {
    z-index: 12;
}

.timeMeter__item--start:first-child {
    z-index: 12;
}

.timeMeter__item--end {
    left: auto !important;
    right: 0;
}

.timeMeter__itemText {
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    line-height: 1.3rem;
    font-size: 1.2rem;
    transform: translateX(-50%);
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba($color--white, 0.8);
    box-shadow: 0 0 10px -1px rgba($color--black, 0.1);
    transition: all 0.2s ease;

    &:before {
        content: '';
        display: none;
        position: absolute;
        top: calc(100% - 1px);
        left: 50%;
        transform: translateX(-50%);
        border-top: 6px solid $color--white;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        width: 0;
        height: 0;
        opacity: 0.7;
        display: block;
        transition: all 0.2s ease;
    }

    .timeMeter__item--end & {
        text-align: right;
        left: auto;
        right: -1rem;
        transform: none;

        &:before {
            left: calc(100% - 1.5rem);
        }
    }

    .timeMeter__item--start & {
        text-align: right;
        left: -1rem;
        transform: none;

        &:before {
            left: 1.5rem;
        }
    }

    .timeMeter__item:hover & {
        background: $color--white;
        box-shadow: 0 0 10px -1px rgba($color--black, 0.2);
        z-index: 14;

        &:before {
            opacity: 1;
        }
    }
}


.timeMeter__itemDate{
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    line-height: 1.3rem;
    font-size: 1.2rem;
    transform: translateX(-50%);
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba($color--white, 0.8);
    box-shadow: 0 0 10px -1px rgba($color--black, 0.1);
    transition: all 0.2s ease;

    &:before {
        content: '';
        display: none;
        position: absolute;
        bottom: calc(100% - 1px);
        left: 50%;
        transform: translateX(-50%);
        border-bottom: 6px solid $color--white;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        width: 0;
        height: 0;
        opacity: 0.7;
        displaY: block;
        transition: all 0.2s ease;
    }

    .timeMeter__item--end & {
        text-align: right;
        left: auto;
        right: -1rem;
        transform: none;

        &:before {
            left: calc(100% - 1.5rem);
        }
    }

    .timeMeter__item--start & {
        text-align: right;
        left: -1rem;
        transform: none;

        &:before {
            left: 1.5rem;
        }
    }

    .timeMeter__item:hover & {
        z-index: 12;
        background: $color--white;
        box-shadow: 0 0 10px -1px rgba($color--black, 0.2);

        &:before {
            opacity: 1;
        }
    }
}

.timeMeter__banner {
    position: absolute;
    height: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;

    &.red {
        background: $color--error;
    }

    &.green {
        background: $color--ok;
    }
}