.c-datepicker {
    @extend $input-field;

    &:focus {
        & ~ .c-datepicker__popover {
            display: block;
        }
    }

    &__popover {
        @extend $popover;
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        z-index: 1;
        margin-top: 10px;
        width: 100%;

        @media (min-width: $screen--sm) {
            width: 300px;
        }
    }

    &__nav {
        flexbox();
        align-items: center;
        margin-bottom: 10px;

        &-btn {
            color: $color--main;
        }  
    }

    &__month {
        flex: 1 0 0;
        text-align: center;
    }

    &__cal {
        width: 100%;
        border-spacing: 0;

        th, td {
            padding: 0;
            text-align: center;
        }

        th {
            padding: .7em .3em;
            font-weight: $font--weight;
            line-height: 1.5;
        }

        td {
            border-top: solid 1px transparent;
            border-bottom: @border-top;

            &:first-child {
                border-radius: 15px 0 0 15px;
                border-left: @border-top;
            }

            &:last-child {
                border-radius: 0 15px 15px 0;
                border-right: @border-top;
            }
        }

        &--weekly {
            .c-datepicker__week {
                cursor: pointer;

                &:hover {
                    td {
                        border-color: $color--main;
                    }

                    .c-datepicker__day {
                        color: $color--main;
                    }
                }

                &.is-active {
                    background-color: $color--main;

                    .c-datepicker__day {
                        color: #fff;
                    }
                }
            }

            .c-datepicker__day {
                &:hover {
                    border-color: transparent;
                    color: inherit;
                }
            }
        }
    }

    &__day {
        width: 30px;
        height: 30px;
        padding: 0;
        border: solid 1px transparent;
        border-radius: 50em;
        color: #7f7f7f;
        text-align: center;
        line-height: 28px;
        transition: .4s ease-out;

        &:hover {
            border-color: currentColor;
            color: $color--main;
        }

        &.is-active {
            background-color: $color--main;
            border-color: transparent;
            color: #fff;
        }

        &--out {
            color: #bfbfbf;
        }
    }
}