/* =============================================================================
   amadee CRM - module Kalender (calendar/index.xhtml, p:schedule = FullCalendar)
   ============================================================================= */

.cm-cal-toolbar {
    margin-bottom: var(--cm-space-3);
}

.cm-cal-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--cm-space-1) var(--cm-space-2);
    color: var(--text-color-secondary);
    font-size: var(--cm-font-size-sm);
}

.cm-cal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-left: var(--cm-space-2);
    background: var(--cm-cal-color);
}

.cm-cal--mine { --cm-cal-color: var(--cm-cal-mine); }
.cm-cal--global { --cm-cal-color: var(--cm-cal-global); }
.cm-cal--other { --cm-cal-color: var(--cm-cal-other); }
.cm-cal--ticket { --cm-cal-color: var(--cm-cal-ticket); }
.cm-cal--todo { --cm-cal-color: var(--cm-cal-todo); }
.cm-cal--holiday { --cm-cal-color: var(--cm-cal-holiday); }

.cm-cal {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--cm-radius-lg);
    padding: var(--cm-space-3);
}

/* entries: coloured bar like in TecArt, white text */
body .cm-cal .fc-event.cm-cal--mine,
body .cm-cal .fc-event.cm-cal--global,
body .cm-cal .fc-event.cm-cal--other,
body .cm-cal .fc-event.cm-cal--ticket,
body .cm-cal .fc-event.cm-cal--todo,
body .cm-cal .fc-event.cm-cal--holiday {
    background: var(--cm-cal-color);
    border-color: var(--cm-cal-color);
    color: var(--cm-cal-text);
}

body .cm-cal .fc-daygrid-dot-event {
    background: var(--cm-cal-color);
    color: var(--cm-cal-text);
}

body .cm-cal .fc-daygrid-dot-event .fc-daygrid-event-dot {
    border-color: var(--cm-cal-text);
}

body .cm-cal .fc-event .fc-event-title,
body .cm-cal .fc-event .fc-event-time {
    color: var(--cm-cal-text);
    font-size: var(--cm-font-size-xs);
}

/* read-only follow-ups: dashed border as a hint that they belong to a ticket/TODO */
body .cm-cal .fc-event.cm-cal--ticket,
body .cm-cal .fc-event.cm-cal--todo {
    border-style: dashed;
    border-color: var(--cm-cal-followup-border);
}

body .cm-cal .fc-day-today {
    background: var(--cm-brand-tint) !important;
}

body .cm-cal .fc-daygrid-week-number {
    color: var(--text-color-secondary);
    background: transparent;
}

body .cm-cal .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 600;
}

/* header buttons in the CRM style instead of the PrimeFaces blue (the theme styles
   .fc .fc-toolbar .fc-button with its own colours, hence the specific selectors) */
body .cm-cal .fc-toolbar .fc-button {
    background: var(--surface-card) !important;
    border-color: var(--surface-border) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
}

body .cm-cal .fc-toolbar .fc-button.fc-button-active,
body .cm-cal .fc-toolbar .fc-button:not(:disabled):active {
    background: var(--cm-brand) !important;
    border-color: var(--cm-brand) !important;
    color: var(--cm-cal-text) !important;
}

body .cm-cal .fc-toolbar .fc-button:disabled {
    opacity: .5;
}

body .cm-cal-users {
    min-width: 13rem;
}
