/* FullCalendar renders its root classes, which set display, onto the component element itself.
   Without this rule setVisible(false) (the hidden attribute) would not hide the calendar. The selector
   uses "fc", which the add-on always puts on that element, so it also holds for subclasses that remove
   the "vaadin-full-calendar" class to opt out of the fixes below. */
.fc[hidden] {
    display: none !important;
}

/* FIXES AND WORKAROUNDS */
/* we use the class name selector here to allow subclasses to easily remove it if these styles should not be applied.
Also these styles automatically are applied to any subclasses and do not bleed into other elements also using "fc"
as a classname. */

/* Fixes a color issue, where otherwise day numbers would appear as the disabled text color (Idk why)*/
.vaadin-full-calendar.fc {
    a:not(:any-link) {
        color: var(--vaadin-text-color);
    }

    /* Fix for https://github.com/stefanuebe/vaadin_fullcalendar/issues/108*/
    :is(.fc-scrollgrid-section-sticky, .fc-scroller-harness) > * {
        z-index: 1;
    }

    /* fixes for background colors */
    thead tr.fc-scrollgrid-section-header th {
        background: transparent;
    }

    .fc-multimonth-multicol .fc-daygrid-more-link {
        --fc-event-border-color: transparent; /* otherwise the multimonth shows a border around the + x more link*/
    }

    /* to have some visual feedback on hovering, inspired by buttons, not realizable the same way*/
    .fc-event:not(.fc-bg-event):hover {
        filter: brightness(90%) contrast(1.2);
    }
}
