.time-picker {
    position: relative;

    &.padding {
        padding: 16px;
    }
    .picker-time-icon {
        position: absolute;
        top: 3px;
        right: 2px;
        cursor: pointer;

        svg {
            @include themify($themes) {
                fill: themed('ChartHistoryPickerIcon');
            }
        }
    }
    #time-picker-input.time-picker-input {
        height: 32px;
        padding: 0 8px;
        border-radius: 4px;
        box-sizing: border-box;
        font-size: 1.4em;
        font-weight: 300;
        margin: 0;
        cursor: pointer;
        @include themify($themes) {
            color: themed('ChartHistoryPickerColor');
            background: themed('ChartHistoryPickerBg');
            border: 1px solid themed('ChartHistoryPickerBorder');
        }

        &.active,
        &:hover {
            @include themify($themes) {
                border-color: themed('ChartHistoryPickerActiveBorder');
            }
        }
    }
    .time-picker-dropdown {
        font-size: 1.4em;
        position: absolute;
        top: 100%;
        display: flex;
        flex-direction: column;
        height: 275px;
        opacity: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: -9;
        transition: all 300ms ease;
        border-radius: 4px;
        pointer-events: none;
        @include themify($themes) {
            color: themed('ChartHistoryPickerColor');
            background: themed('ChartHistoryPickerBg');
            border: 1px solid themed('ChartHistoryPickerBorder');
        }

        &.active {
            opacity: 1;
            z-index: 9;
            top: calc(100% + 10px);
            pointer-events: initial;

            .time-picker-panel {
                .time-picker-clear {
                    display: inline-block;
                }
            }
        }
        &.from-right {
            right: 0;
        }
        .time-picker-panel {
            height: 30px;
            border-radius: 4px 4px 0 0;
            padding: 2px 8px 0 9px;
            line-height: 30px;
            font-weight: 300;
            transition: height 0.3s ease 0.15s;
            @include themify($themes) {
                background: themed('ChartHistoryPickerHeaderBg');
                border-bottom: 1px solid themed('ChartHistoryPickerHeaderBorder');
            }

            .time-picker-clear {
                position: relative;
                float: right;
                display: none;
                top: 1px;
                width: 17px;
                height: 17px;
                cursor: pointer;

                svg {
                    @include themify($themes) {
                        fill: themed('ChartHistoryPickerTopColor');
                    }
                }
            }
        }
        .time-picker-selector {
            display: flex;
            flex-direction: row;

            .time-picker-hours {
                border-radius: 0 0 0 4px;
                width: 150px;
                @include themify($themes) {
                    border-right: 1px solid themed('ChartHistoryPickerBorder');
                }
            }
            .time-picker-minutes {
                width: 80px;
                border-radius: 0 0 4px;
            }
            .time-picker-hours, .time-picker-minutes {
                display: inline-block;
                height: 245px;
                overflow: hidden;
                text-align: center;

                .list-title {
                    margin-top: 10px;
                    @include themify($themes) {
                        color: themed('ChartHistoryPickerHeaderColor');
                    }

                    strong {
                        font-weight: 400;
                    }
                }
                .list-container .list-item {
                    display: inline-block;
                    margin: 3px;
                    padding: 7px;
                    transition: all 0.3s ease;
                    cursor: pointer;
                    border-radius: 4px;
                    @include themify($themes) {
                        color: themed('ChartHistoryPickerBodyColor');
                    }

                    &.selected {
                        @include themify($themes) {
                            background: themed('ChartHistoryPickerBodyActiveBg');
                            color: themed('ChartHistoryPickerBodyActiveColor');
                        }
                    }
                    &.disabled {
                        cursor: default;
                        @include themify($themes) {
                            color: themed('ChartHistoryPickerBodyDisableColor');
                        }
                    }
                }
            }
        }
    }
}
