/* =========================================
   MEETING MINI CALENDAR — web/js/meeting-calendar.js
   IDENTICAL in etv_backend and etv-yii2-project; each app can tint it
   through --mcal-accent on the host. Ported from BDS (read-only part).
========================================= */
.mcal {
    --mcal-accent: var(--dk-primary-fill, #1e3a8a);
    border: 1px solid var(--dk-line, #e2e8f0);
    border-radius: 12px;
    padding: 10px;
    background: var(--dk-surface, #fff);
    font-size: .8rem;
    transition: box-shadow .3s;
}
.mcal.is-updated {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .35);
}
.mcal.is-updated .mcal-info::after {
    content: 'Updated';
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--dk-success-soft, #dcfce7);
    color: var(--dk-success-ink, #166534);
    font-size: .7rem;
    font-weight: 700;
}
.mcal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.mcal-month {
    font-weight: 700;
    color: var(--dk-text, #0f172a);
}
.mcal-nav {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: var(--dk-surface-3, #f1f5f9);
    color: var(--dk-text-2, #334155);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.mcal-nav:hover { background: var(--dk-surface-4, #e2e8f0); }
.mcal-grid {
    display: grid;
    /* minmax(0, 1fr): seven equal columns that never push past the edge. */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    text-align: center;
}
.mcal-dow {
    font-size: .65rem;
    font-weight: 700;
    color: var(--dk-text-subtle, #94a3b8);
    padding: 2px 0;
}
.mcal-day {
    padding: 4px 0;
    border-radius: 6px;
    color: var(--dk-text-2, #334155);
    line-height: 1.3;
}
.mcal-day.is-today { box-shadow: inset 0 0 0 1px var(--dk-text-subtle, #94a3b8); }
/* The office calendar around the meeting (data-office). Before .is-meeting,
   so the meeting's own day keeps its colour; the tooltip still says what
   else is on it. */
.mcal-day.is-closed { color: var(--dk-text-faint, #cbd5e1); }
.mcal-day.is-holiday { background: var(--dk-warning-soft, #ffedd5); color: var(--dk-warning-ink, #9a3412); }
.mcal-day.is-blocked { background: var(--dk-danger-soft, #fee2e2); color: var(--dk-danger-ink, #b91c1c); }
.mcal-day.is-reopened { position: relative; }
.mcal-day.is-reopened::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: #16a34a;
}
.mcal-day.is-meeting {
    background: var(--mcal-accent);
    color: #fff;
    font-weight: 700;
}
.mcal-day.is-meeting-cancelled {
    background: var(--dk-danger-soft, #fee2e2);
    color: var(--dk-danger-ink, #b91c1c);
    text-decoration: line-through;
}
/* What the colours mean. */
.mcal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    margin-top: 6px;
    font-size: .66rem;
    color: var(--dk-text-muted, #64748b);
}
.mcal-key {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mcal-swatch {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
}
.mcal-key-meeting .mcal-swatch { background: var(--mcal-accent); }
.mcal-key-holiday .mcal-swatch { background: var(--dk-warning-soft, #ffedd5); box-shadow: inset 0 0 0 1px var(--dk-warning-line, #fdba74); }
.mcal-key-closed .mcal-swatch { background: var(--dk-surface-3, #f1f5f9); box-shadow: inset 0 0 0 1px var(--dk-line-strong, #cbd5e1); }
.mcal-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--dk-line-soft, #f1f5f9);
    color: var(--dk-text-2, #334155);
    line-height: 1.45;
}
.mcal-sub { color: var(--dk-text-muted, #64748b); }
.mcal-none { color: var(--dk-text-subtle, #94a3b8); }
.mcal-cancelled { color: var(--dk-danger-ink, #b91c1c); font-weight: 600; }
.mcal-link {
    display: inline-block;
    margin-top: 4px;
    font-weight: 700;
    color: var(--mcal-accent);
    text-decoration: underline;
}
