/* stylelint-disable declaration-no-important */
@mixin calendar-size {
    height: 300px;
    width: 308px;
    float: left;
    position: relative;
}

@mixin calendar-position {
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    position: unset;
}

@mixin calendar-dropdown-width {
    width: 215px;
    float: left;
}

@-webkit-keyframes rotating /* Safari and Chrome */ {
    from {
        -webkit-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes rotating {
    from {
        -ms-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    to {
        -ms-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

#wdm-edwiserreports {
    #activeusersblock {
        .dropdown-menu {
            .dropdown-body {
                @include calendar-dropdown-width;
            }
            .dropdown-item.custom {
                background: #fff;
            }
        }
        .dropdown-menu.withcalendar {
            width: 540px;
            display: flex;
            .dropdown-calendar {
                @include calendar-size;
                .flatpickr-calendar {
                    @include calendar-position;
                }
            }
        }
        .refresh {
            cursor: pointer;
        }
        .refresh.refresh-spin {
            cursor: pointer;
            -webkit-animation: rotating 2s linear infinite;
            -moz-animation: rotating 2s linear infinite;
            -ms-animation: rotating 2s linear infinite;
            -o-animation: rotating 2s linear infinite;
            animation: rotating 2s linear infinite;
        }
    }
}

#wdm-activeusers-individual {
    input.dropdown-item {
        background-color: transparent;
        color: inherit;
    }
    input.dropdown-item:hover {
        cursor: pointer;
        background-color: #f8f9fa;
    }
    input.dropdown-item.custom:focus {
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .dropdown-menu {
        &[aria-labelledby="cohortfilter"] {
            max-height: 400px;
        }
        &[aria-labelledby="filter-dropdown"] {
            right: 0;
            left: auto;
        }
    }
    .dropdown-menu.withcalendar {
        width: 540px;
        display: flex;
        .dropdown-calendar {
            @include calendar-size;
            .flatpickr-calendar {
                @include calendar-position;
            }
        }
    }
    // Fixing header background glitch because of block configurable_rerport plugin.
    .dataTable {
        .sorting_asc,
        .sorting_desc,
        .sorting {
            background-image: none !important;
        }
    }
}
