$active_color: #3388FF;
$light_blue: #DDEEFF;
$light_grey: #f2f2f2;
$disable_color: #999;
$disable_cell_color: #e5e5e5;
$disable_bg: #f8f8f8;
$border_color: #CACACA;
$disable_border_color: #e5e5e5;
$disable_input_text_color: #CACACA;
$default_input_width: 183px;
$default_width: 240px;
$double_default_width: 480px;
.zent-datetime-picker {
    box-sizing: border-box;
    display: inline-block;
    width: $default_input_width;
    background: #fff;
    line-height: normal;
    .picker-wrapper {
        position: relative;
        width: 100%;
        display: inline-block;
    }
    .picker-input {
        color: #999;
        position: relative;
        box-sizing: border-box;
        width: 100%;
        height: 30px;
        line-height: 30px;
        padding: 0 10px;
        font-size: 12px;
        border: 1px solid $border_color;
        border-radius: 2px;
        .zenticon {
            line-height: 30px;
            position: absolute;
            right: 10px;
            top: 0;
            color: #bbb;
        }
        .zenticon-calendar-o {
            display: block;
        }
        .zenticon-close-circle {
            display: none;
        }
        &--range {
            width: 240px;
        }
        &--showTime {
            width: 320px;
        }
        &--filled {
            color: #333;
            &:hover {
                .zenticon-close-circle {
                    display: block;
                }
                .zenticon-calendar-o {
                    display: none;
                }
            }
        }
        &--disabled {
            background: $disable_bg;
            color: $disable_input_text_color;
            cursor: not-allowed;
            &:hover {
                .zenticon-close-circle {
                    display: none;
                }
                .zenticon-calendar-o {
                    display: block;
                }
            }
        }
    }
    .date-picker,
    .month-picker,
    .time-picker,
    .range-picker {
        background: #fff;
        position: absolute;
        top: 32px;
        width: $default_width;
        font-size: 12px;
        border-radius: 2px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
        z-index: 10;
    }
    .grid-cell {
        vertical-align: middle;
        padding: 0;
    }
    .range-picker {
        width: $double_default_width;
        .date-picker {
            position: static;
            display: inline-block;
            vertical-align: top;
            box-shadow: none;
            &+.date-picker {
                left: $default_width;
            }
            .month-panel {
                .grid-cell {
                    height: 41.5px;
                }
            }
            .year-panel {
                .grid-cell {
                    height: 41.5px;
                }
            }
        }
        &--showTime {
            .date-picker {
                height: 265px;
                .month-panel {
                    .grid-cell {
                        height: 56.5px;
                    }
                }
                .year-panel {
                    .grid-cell {
                        height: 56.5px;
                    }
                }
                .time-panel {
                    .hour-panel,
                    .minute-panel,
                    .second-panel {
                        height: 265px;
                    }
                }
            }
        }
    }
    .date-panel,
    .month-panel,
    .year-panel {
        position: relative;
        width: $default_width;
        background: #fff;
        color: #333;
    }
    .date-picker {
        .date-panel {
            .grid-cell {
                padding: 2px 0;
            }
        }
        .month-panel {
            position: absolute;
            top: 0;
            left: 0;
            .grid-cell {
                height: 55.5px;
                vertical-align: middle;
                padding: 0;
            }
        }
        .year-panel {
            .grid-cell {
                height: 55.5px;
                vertical-align: middle;
                padding: 0;
            }
        }
    }
    .month-picker {
        .month-panel {
            .month-table {
                margin: 10px 0;
            }
            .year-panel {
                .grid-cell {
                    height: 58px;
                    padding: 0;
                }
            }
        }
    }
    .panel__header {
        box-sizing: border-box;
        text-align: center;
        height: 36px;
        line-height: 36px;
        border-bottom: 1px solid $border_color;
        .link--prev {
            cursor: pointer;
            float: left;
            margin-left: 25px;
            font-size: 8px;
            .zenticon {
                transform: rotate(180deg)
            }
        }
        .link--next {
            cursor: pointer;
            float: right;
            margin-right: 25px;
            font-size: 8px;
        }
        .panel__title {
            cursor: pointer;
        }
    }
    .panel__footer {
        box-sizing: border-box;
        height: 54px;
        line-height: 54px;
        padding-right: 10px;
        text-align: right;
        border-top: 1px solid $border_color;
        .btn--confirm {
            line-height: normal;
            background: $active_color;
            color: #fff;
            border: none;
            border-radius: 2px;
            padding: 10px 10px;
            margin-left: 15px;
        }
        .link--current {
            color: $active_color;
            cursor: pointer;
        }
        .link--disabled {
            color: $disable_color;
        }
    }
    .panel__table {
        width: 100%;
        text-align: center;
        td,
        th {
            padding: 5px 0;
            width: 14.28%;
            text-align: center;
            margin-bottom: 4px;
        }
        .panel__cell {
            display: inline-block;
            box-sizing: border-box;
            text-align: center;
            vertical-align: middle;
            border-radius: 2px;
            cursor: pointer;
            position: relative;
            &:hover {
                background: $light_blue;
            }
            &--in-range {
                background: $light_blue;
                border-color: $light_blue;
                &:before {
                    content: '';
                    display: block;
                    width: 8px;
                    height: 20px;
                    background: $light_blue;
                    position: absolute;
                    right: -8px;
                    top: 0;
                }
                &:after {
                    content: '';
                    display: block;
                    width: 8px;
                    height: 20px;
                    background: $light_blue;
                    position: absolute;
                    left: -8px;
                    top: 0;
                }
            }
            &--current {
                color: $active_color;
            }
            &--disabled {
                cursor: not-allowed;
                color: $disable_cell_color;
                &:hover {
                    background: #fff;
                }
                &:before,
                &:after {
                    display: none;
                }
            }
            &--selected {
                background: $active_color;
                color: #fff;
                &:hover {
                    background: $active_color;
                }
            }
            &--different {
                color: $disable_color;
                background: none;
                &:before,
                &:after {
                    display: none;
                }
            }
            &.date-panel__cell {
                width: 20px;
                height: 20px;
                line-height: 20px;
            }
            &.month-panel__cell {
                width: 30px;
                height: 30px;
                line-height: 30px;
            }
            &.year-panel__cell {
                width: 50px;
                height: 30px;
                line-height: 30px;
            }
        }
    }
    .year-panel {
        position: absolute;
        top: 0;
        left: 0;
    }
    .time-panel {
        &__cell {
            padding: 3px;
        }
        .hour-panel,
        .minute-panel,
        .second-panel {
            position: absolute;
            top: 0;
            left: 0;
            height: 319px;
            width: $default_width;
            background: #fff;
        }
        &__preview {
            margin: 12px 10px;
            height: 31px;
            line-height: 31px;
            border: 1px solid #bbb;
            border-radius: 2px;
            text-align: center;
            display: flex;
            .time__number {
                flex: 1;
                cursor: pointer;
                border-right: 1px solid #bbb;
                &:last-child {
                    border-right: none;
                }
            }
        }
    }
}