/*
 * Grelha mensal sem o FullCalendar.
 *
 * O FullCalendar 6 desenha a vista de mes com tabelas dentro de tabelas, e o
 * AccessMonitor (WCAG 2.1) chumba-as: tabelas aninhadas, sem <caption>, sem
 * cabecalhos. O calendar.js desenha agora a vista de mes numa so tabela, com
 * as mesmas classes `fc-*`, para que o aspecto continue a vir das mesmas regras.
 *
 * Estas regras sao as do FullCalendar 6.1.21 (MIT, (c) Adam Shaw) de que essa
 * grelha precisa, copiadas tal e qual, com os mesmos seletores: sem o
 * FullCalendar carregado ja ninguem as injeta. Este ficheiro carrega antes do
 * calendar.css, que continua a sobrepor-se a elas como antes.
 *
 * Unica diferenca: a tabela e' uma so, com bordas colapsadas
 * (.mod-calendar__grid), no lugar do par .fc-scrollgrid + tabelas internas.
 * Comparada ao pixel com a do FullCalendar no site: as linhas da grelha, as
 * barras e a altura coincidem.
 */

:root {
    --fc-small-font-size: .85em;
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: hsla(0, 0%, 82%, .3);
    --fc-border-color: #ddd;
    --fc-button-text-color: #fff;
    --fc-button-bg-color: #2c3e50;
    --fc-button-border-color: #2c3e50;
    --fc-button-hover-bg-color: #1e2b37;
    --fc-button-hover-border-color: #1a252f;
    --fc-button-active-bg-color: #1a252f;
    --fc-button-active-border-color: #151e27;
    --fc-event-bg-color: #3788d8;
    --fc-event-border-color: #3788d8;
    --fc-event-text-color: #fff;
    --fc-event-selected-overlay-color: rgba(0, 0, 0, .25);
    --fc-today-bg-color: rgba(255, 220, 40, .15);
    --fc-daygrid-event-dot-width: 8px;
}

.fc { display: flex; flex-direction: column; font-size: 1em; }
.fc, .fc *, .fc :after, .fc :before { box-sizing: border-box; }
.fc table { border-collapse: collapse; border-spacing: 0; font-size: 1em; }
.fc th { text-align: center; }
.fc td, .fc th { padding: 0; vertical-align: top; }
.fc-direction-ltr { direction: ltr; text-align: left; }
.fc-theme-standard td, .fc-theme-standard th { border: 1px solid var(--fc-border-color); }

.fc .fc-button { border-radius: 0; font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; overflow: visible; text-transform: none; }
.fc .fc-button { -webkit-appearance: button; }
.fc .fc-button:not(:disabled) { cursor: pointer; }
.fc .fc-button { background-color: transparent; border: 1px solid transparent; border-radius: .25em; display: inline-block; font-size: 1em; font-weight: 400; line-height: 1.5; padding: .4em .65em; text-align: center; user-select: none; vertical-align: middle; }
.fc .fc-button:hover { text-decoration: none; }
.fc .fc-button:focus { box-shadow: 0 0 0 .2rem rgba(44, 62, 80, .25); outline: 0; }
.fc .fc-button:disabled { opacity: .65; }
.fc .fc-button-primary { background-color: var(--fc-button-bg-color); border-color: var(--fc-button-border-color); color: var(--fc-button-text-color); }
.fc .fc-button-primary:hover { background-color: var(--fc-button-hover-bg-color); border-color: var(--fc-button-hover-border-color); color: var(--fc-button-text-color); }
.fc .fc-button-primary:disabled { background-color: var(--fc-button-bg-color); border-color: var(--fc-button-border-color); color: var(--fc-button-text-color); }
.fc .fc-button-primary:focus { box-shadow: 0 0 0 .2rem rgba(76, 91, 106, .5); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background-color: var(--fc-button-active-bg-color); border-color: var(--fc-button-active-border-color); color: var(--fc-button-text-color); }
.fc .fc-button-primary:not(:disabled).fc-button-active:focus, .fc .fc-button-primary:not(:disabled):active:focus { box-shadow: 0 0 0 .2rem rgba(76, 91, 106, .5); }
.fc .fc-button-group { display: inline-flex; position: relative; vertical-align: middle; }
.fc .fc-button-group > .fc-button { flex: 1 1 auto; position: relative; }
.fc .fc-button-group > .fc-button.fc-button-active, .fc .fc-button-group > .fc-button:active, .fc .fc-button-group > .fc-button:focus, .fc .fc-button-group > .fc-button:hover { z-index: 1; }
.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) { border-bottom-left-radius: 0; border-top-left-radius: 0; margin-left: -1px; }
.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) { border-bottom-right-radius: 0; border-top-right-radius: 0; }

.fc .fc-toolbar { align-items: center; display: flex; justify-content: space-between; }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 1.5em; }
.fc .fc-toolbar-title { font-size: 1.75em; margin: 0; }
.fc-direction-ltr .fc-toolbar > * > :not(:first-child) { margin-left: .75em; }

.fc .fc-view-harness { flex-grow: 1; position: relative; }
.fc .mod-calendar__grid { table-layout: fixed; width: 100%; }

/*
 * O <caption> existe para leitores de ecra (e para o AccessMonitor). Nao usa o
 * .visually-hidden do Bootstrap: o Chrome mantem a legenda no fluxo da tabela
 * e a margem de -1px em cima e em baixo encolhia o calendario 1px. Aqui a
 * margem soma zero.
 */
.fc .mod-calendar__caption { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; margin: 0 0 -1px; overflow: hidden; padding: 0; white-space: nowrap; width: 1px; }
.fc .fc-col-header-cell-cushion { display: inline-block; padding: 2px 4px; }

a.fc-event, a.fc-event:hover { text-decoration: none; }
.fc-event[href] { cursor: pointer; }
.fc-event .fc-event-main { position: relative; z-index: 2; }
.fc-event:focus { box-shadow: 0 2px 5px rgba(0, 0, 0, .2); }
.fc-event:focus:before { bottom: 0; content: ""; left: 0; position: absolute; right: 0; top: 0; z-index: 3; }
.fc-event:focus:after { background: var(--fc-event-selected-overlay-color); bottom: -1px; content: ""; left: -1px; position: absolute; right: -1px; top: -1px; z-index: 1; }
.fc-h-event { background-color: var(--fc-event-bg-color); border: 1px solid var(--fc-event-border-color); display: block; }
.fc-h-event .fc-event-main { color: var(--fc-event-text-color); }
.fc-h-event .fc-event-title { display: inline-block; left: 0; max-width: 100%; overflow: hidden; right: 0; vertical-align: top; }
.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start) { border-bottom-left-radius: 0; border-left-width: 0; border-top-left-radius: 0; }
.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end) { border-bottom-right-radius: 0; border-right-width: 0; border-top-right-radius: 0; }

.fc-daygrid-day-events:after, .fc-daygrid-day-events:before, .fc-daygrid-day-frame:after, .fc-daygrid-day-frame:before, .fc-daygrid-event-harness:after, .fc-daygrid-event-harness:before { clear: both; content: ""; display: table; }
.fc .fc-daygrid-body { position: relative; z-index: 1; }
.fc .fc-daygrid-day.fc-day-today { background-color: var(--fc-today-bg-color); }
.fc .fc-daygrid-day-frame { min-height: 100%; position: relative; }
.fc .fc-daygrid-day-top { display: flex; flex-direction: row-reverse; }
.fc .fc-day-other .fc-daygrid-day-top { opacity: .3; }
.fc .fc-daygrid-day-number { padding: 4px; position: relative; z-index: 4; }
.fc .fc-daygrid-day-events { margin-top: 1px; }
.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events { min-height: 2em; position: relative; }
.fc .fc-daygrid-body-natural .fc-daygrid-day-events { margin-bottom: 1em; }
.fc .fc-daygrid-event-harness { position: relative; }
.fc .fc-daygrid-event-harness-abs { left: 0; position: absolute; right: 0; top: 0; }
.fc .fc-daygrid-event { margin-top: 1px; z-index: 6; }
.fc .fc-daygrid-day-bottom { font-size: .85em; margin: 0 2px; }
.fc .fc-daygrid-day-bottom:after, .fc .fc-daygrid-day-bottom:before { clear: both; content: ""; display: table; }
.fc-direction-ltr .fc-daygrid-event.fc-event-start { margin-left: 2px; }
.fc-direction-ltr .fc-daygrid-event.fc-event-end { margin-right: 2px; }
.fc-daygrid-event { border-radius: 3px; font-size: var(--fc-small-font-size); position: relative; white-space: nowrap; }
.fc-daygrid-block-event .fc-event-title { padding: 1px; }
.fc-daygrid-dot-event { align-items: center; display: flex; padding: 2px 0; }
.fc-daygrid-dot-event .fc-event-title { flex-grow: 1; flex-shrink: 1; font-weight: 700; min-width: 0; overflow: hidden; }
