:root {
    --fc-neutral-bg-color: none;
    --fc-now-indicator-color: var(--brand-danger);
    --fc-border-color: var(--calendar-border);
    --fc-today-bg-color: var(--calendar-today-bg);
    --fc-page-bg-color: var(--body-bg);
}

.date-title {
    text-align: center !important;
    user-select: none;
}

.date-title h4 {
    margin: var(--10px) 0 0;
}

.dashlet-body div.calendar-container {
    height: 100% !important;
}

.calendar.fc {
    user-select: none;
}

//-----

@media screen and (max-width: @screen-xs-max) {
    .fc {
        font-size: 85%;
    }
}

.fc {
    overflow: hidden;

    @supports not selector(::-webkit-scrollbar) {
        .fc-scroller {
            scrollbar-width: thin;
        }

        .fc-timegrid {
            table.fc-col-header th:last-child,
            table.fc-scrollgrid-sync-table td:last-child {
                .fc-scrollgrid-sync-inner {
                    border-right: var(--1px) solid var(--calendar-border);
                }
            }

            table[role="presentation"] td.fc-day:last-child > div.fc-timegrid-col-frame {
                border-right: var(--1px) solid var(--calendar-border);
            }
        }
    }

    th {
        font-weight: normal;
    }

    .fc-daygrid-event-harness {
        .fc-event-main-frame > .fc-event-time {
            overflow: unset;
        }
    }

    .fc-daygrid-block-event .fc-event-time {
        font-weight: 400;
    }

    .fc-event-main > .user > .avatar {
        position: relative;
        top: -1px;
    }

    .fc-col-header {
        user-select: none;

        .fc-event {
            border-radius: var(--border-radius) !important;
            min-height: var(--19px) !important; // ?
        }

        a.fc-col-header-cell-cushion,
        a.fc-timegrid-axis-cushion {
            &,
            &:hover {
                text-decoration: none;
                color: var(--text-color);
            }
        }
    }

    .fc-timegrid-now-indicator-container {
        overflow: visible; // ?
    }

    .fc-bg-event {
        opacity: 0.5;
    }

    .fc-event-selected,
    .fc-event:focus {
        box-shadow: none;

        &::after {
            background: transparent;
        }
    }

    .fc-event.event-canceled {
        &,
        .fc-event-title,
        .fc-event-main {
            text-decoration: line-through !important;
        }
    }

    .fc-daygrid-event,
    .fc-timegrid-event,
    .fc-timegrid-more-link {
        border-radius: var(--border-radius);
    }

    .fc-day-today.fc-timegrid-col {
        background-color: transparent;
    }

    .fc-day-today {
        .fc-col-header-cell-cushion,
        .fc-daygrid-day-number {
            &,
            &:hover {
                color: var(--state-warning-text);
            }
        }
    }

    .fc-timegrid-now-indicator-line {
        opacity: 0.9;

        height: var(--2px);
        border-top: var(--1px) solid var(--brand-danger);
        border-bottom-width: 0;
        background-color: var(--brand-danger);

        &:before {
            content: "";
            position: inherit;
            left: var(--minus-4px);
            border-radius: 50%;
            height: var(--8px);
            width: var(--8px);
            background-color: var(--brand-danger);
            display: inline-block;
            top: var(--minus-4px);
            opacity: 0.9;
        }
    }

    .fc-timegrid-now-indicator-arrow {
        display: none;
    }

    .fc-timegrid-slot-minor {
        border-top-style: none;
    }

    .fc-timegrid-slot-label-cushion,
    a.fc-daygrid-day-number {
        &,
        &:hover {
            color: var(--text-color);
            text-decoration: none;
            cursor: default;
        }
    }

    a.fc-daygrid-week-number {
        &,
        &:hover {
            color: var(--gray-soft);
            text-decoration: none;
            cursor: default;
        }

        padding-left: var(--4px);
    }

    border-style: none;

    .fc-scrollgrid {
        border: 0;

        td:last-of-type {
            border-right-color: transparent;
            border-right-width: 0;
        }
    }

    th[role='presentation'] {
        border-right-color: transparent !important;
        border-right-width: 0;
    }

    .fc-scrollgrid-section-body td[role='presentation'] {
        border-bottom-color: transparent;
        border-bottom-width: 0;
    }

    tr[role="presentation"]:first-child:not(:last-child) > td {
        border-bottom: var(--1px) solid var(--calendar-border);
    }

    [role='row']:last-of-type td {
        border-bottom-color: transparent !important;
        border-bottom-width: 0;
    }
}
