@import "../style-scss/import";

// calendar
.mu-calendar {
    color: $textColor;
    user-select: none;
    width: 310px;
}

.mu-calendar-landspace{
    width: 479px;
}

.mu-calendar-container{
    display: flex;
    flex-direction: column;
}

.mu-calendar-monthday-container {
    display: flex;
    align-content: space-between;
    justify-content: space-between;
    flex-direction: column;
    font-size: 12px;
    font-weight: 400;
    padding: 0px 8px;
    transition: all .45s $easeOutFunction;
}

.mu-calendar-week {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-weight: 500;
    height: 20px;
    line-height: 15px;
    opacity: 0.5;
    text-align: center;
}

.mu-calendar-week-day {
    width: 42px;
}

.mu-calendar-monthday{
    position: relative;
    overflow: hidden;
    height: 214px;
}

.mu-calendar-monthday-slide{
    height: 100%;
    width: 100%;
}

.mu-calendar-actions{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin: 0px;
    max-height: 48px;
    padding: 0px;
    .mu-flat-button {
        min-width: 64px;
        margin: 4px 8px 8px 0px;
    }
}
.mu-calendar-slide-next-enter-active,
.mu-calendar-slide-next-leave-active,
.mu-calendar-slide-prev-enter-active,
.mu-calendar-slide-prev-leave-active {
    transition: transform 450ms $easeOutFunction, opacity 450ms $easeOutFunction;
    backface-visibility: hidden;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.mu-calendar-slide-next-enter {
    transform: translate3d(100%, 0, 0);
}
.mu-calendar-slide-next-leave-active {
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
}

.mu-calendar-slide-prev-enter {
    transform: translate3d(-100%, 0, 0);
}
.mu-calendar-slide-prev-leave-active {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
}

// month
.mu-calendar-monthday-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-weight: 400;
    height: 228px;
    line-height: 2;
    position: relative;
    text-align: center;
}

.mu-calendar-monthday-row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    height: 34px;
    margin-bottom: 2px;
}

// toolbar
.mu-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    height: 48px;
}

.mu-calendar-toolbar-title-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

.mu-calendar-toolbar-title {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0px;
    left: 0px;
    line-height: 48px;
}

.mu-calendar-svg-icon {
    display: block;
    fill: currentColor;
    height: 24px;
    width: 24px;
    user-select: none;
}

// year
.mu-calendar-year-container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    margin-top: 10px;
    width: 310px;
    height: 272px;
    overflow: hidden;
}

.mu-calendar-year {
    background-color: $dialogBackgroundColor;
    height: inherit;
    line-height: 35px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.mu-calendar-year-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

// date display
.mu-date-display{
    width: 100%;
    font-weight: 700;
    display: block;
    background-color: $primaryColor;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    border-bottom-left-radius: 0;
    color: $alternateTextColor;
    padding: 20px;
    .mu-calendar-landspace & {
        width: 165px;
        height: 330px;
        float: left;
        border-top-right-radius: 0;
        border-bottom-left-radius: 2px;
    }
}

.mu-date-display-year {
    position: relative;
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    height: 16px;
    opacity: 0.7;
    transition: all .45s $easeOutFunction;
    margin-bottom: 10px;
    .mu-date-display.selected-year &{
        opacity: 1;
    }
}


.mu-date-display-year-title {
    cursor: pointer;
    .mu-date-display-year.disabled &{
        cursor: not-allowed;
    }
    .mu-date-display.selected-year {
        cursor: default;
    }

}

.mu-date-display-monthday {
    position: relative;
    display: block;
    overflow: hidden;
    font-size: 36px;
    line-height: 36px;
    height: 38px;
    transition: all .45s $easeOutFunction;
    width: 100%;
    font-weight: 500;
    .mu-date-display.selected-year &{
        opacity: 0.7;
    }
    .mu-calendar-landspace & {
        height: 100%;
    }
}

.mu-date-display-slideIn-wrapper {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0px;
    left: 0px;
}

.mu-date-display-monthday-title {
    cursor: default;
    width: 100%;
    display: block;
    .mu-date-display.selected-year &{
        cursor: pointer;
    }
}

.mu-date-display-next-enter-active,
.mu-date-display-next-leave-active,
.mu-date-display-prev-enter-active,
.mu-date-display-prev-leave-active {
    transition: transform 450ms $easeOutFunction, opacity 450ms $easeOutFunction;
    backface-visibility: hidden;
}

.mu-date-display-next-enter {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
}
.mu-date-display-next-leave-active {
    transform: translate3d(0, 100%, 0);
    opacity: 0;
}

.mu-date-display-prev-enter {
    transform: translate3d(0, 100%, 0);
    opacity: 0;
}
.mu-date-display-prev-leave-active {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
}

// date picker
.mu-date-picker{
    display: inline-block;
    position: relative;
    width: 256px;
    &.fullWidth {
        width: 100%
    }
}

// date picker dialog
.mu-date-picker-dialog {
    width: 310px;
    &.landscape {
        width: 479px;
        .mu-dialog-body {
            min-height: 330px;
            min-width: 479px;
        }
    }
    .mu-dialog-body {
        padding: 0;
        min-height: 434px;
        min-width: 310px;
    }
}

// date button
.mu-day-button {
    display: inline-block;
    background: none;
    user-select: none;
    outline: none;
    text-decoration: none;
    cursor: pointer;
    margin: 0px;
    padding: 4px 0px;
    font-size: inherit;
    font-weight: 400;
    position: relative;
    border: 10px;
    width: 42px;
    &.disabled{
        opacity: .4;
    }
}

.mu-day-empty {
    font-weight: 400;
    padding: 4px 0px;
    position: relative;
    width: 42px;
}
.mu-day-button-bg {
    position: absolute;
    top: 0;
    left: 4px;
    height: 34px;
    background-color: $primaryColor;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all .45s $easeOutFunction;
    width: 34px;
    .mu-day-button.hover &,
    .mu-day-button.selected &{
        transform: scale(1);
    }
    .mu-day-button.hover &{
        opacity: 0.6;
    }
    .mu-day-button.selected &{
        opacity: 1;
    }
}

.mu-day-button-text{
    font-weight: 400;
    position: relative;
    color: $textColor;
    .mu-day-button.now &{
        color: $primaryColor;
    }
    .mu-day-button.hover &,
    .mu-day-button.selected &{
        color: $alternateTextColor;
    }
}

// year button
.mu-year-button{
    position: relative;
    display: block;
    background: none;
    cursor: pointer;
    outline: none;
    text-decoration: none;
    margin: 0px auto;
    padding: 0px;
    border: 10px;
    font-size: 14px;
    font-weight: inherit;
    text-align: center;
    line-height: inherit;
}

.mu-year-button-text {
    align-self: center;
    color: $textColor;
    font-size: 17px;
    font-weight: 400;
    position: relative;
    top: -1px;
    .mu-year-button.selected &{
        color: $primaryColor;
        font-size: 26px;
        font-weight: 500;
    }
    .mu-year-button.hover &{
        color: $primaryColor;
    }
}
