/* ── D4 Agenda ─────────────────────────────────────────────────────────── */

/* Header */
.d4-agenda .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid #edf0f7;
}

.d4-agenda .calendar-header .header-left { flex: 1; }

.d4-agenda .calendar-header .monthYear {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--vz-heading-color, #2d3748);
    line-height: 1.3;
}

.d4-agenda .calendar-header .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.d4-agenda .calendar-header .filters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.d4-agenda .calendar-header .filters label {
    font-size: 13px;
    color: #6b7fa3;
    cursor: pointer;
}

/* Body */
.d4-agenda .calendar-body {
    background: #fff;
    padding: 0;
}

.d4-agenda .hidden { display: none; }

/* Table */
.d4-agenda .agenda-table {
    width: 100%;
    border-collapse: collapse;
}

.d4-agenda .agenda-table tbody tr {
    border-bottom: 1px solid #f3f5fb;
    transition: background .15s ease;
}

.d4-agenda .agenda-table tbody tr:last-child {
    border-bottom: none;
}

.d4-agenda .agenda-table tbody tr:hover {
    background: #fafbfe;
}

/* Day cell */
.d4-agenda .day-cell {
    width: 52px;
    min-width: 52px;
    text-align: center;
    vertical-align: middle;
    padding: 10px 8px;
    border-right: 1px solid #f0f3f9;
}

.d4-agenda .short-day {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ba9c3;
}

.d4-agenda .day-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #3a4a6b;
    line-height: 1.1;
    margin-top: 2px;
}

.d4-agenda .day-number--today {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #0ab39c;
    color: #fff !important;
    display: inline-block;
    font-size: 1rem;
}

/* Events cell */
.d4-agenda .events-cell {
    vertical-align: middle;
    padding: 7px 10px;
}

.d4-agenda .no-events {
    font-size: 12px;
    color: #c5cfe0;
    font-style: italic;
    padding: 2px 0;
}

/* ── Event bubbles ─────────────────────────────────────────────────────── */
.d4-agenda .event {
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    margin: 2px 4px 2px 0;
    overflow: hidden;
    font-size: 12.5px;
    vertical-align: middle;
}

.d4-agenda .agenda-event__body {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    width: 100%;
}

.d4-agenda .agenda-event__main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.d4-agenda .agenda-event__location {
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
}

.d4-agenda .agenda-event__sublocation {
    font-size: 11px;
    opacity: .78;
    white-space: nowrap;
}

.d4-agenda .agenda-event__time {
    font-size: 11px;
    opacity: .85;
    white-space: nowrap;
}

.d4-agenda .agenda-event__duration {
    font-weight: 600;
    margin-left: 4px;
    opacity: .9;
}

.d4-agenda .agenda-event__note {
    font-size: 13px;
    opacity: .75;
    flex-shrink: 0;
    cursor: default;
}

.d4-agenda .agenda-event__employee-comment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-style: italic;
    margin-top: 2px;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid currentColor;
    background: #fff;
    white-space: normal;
}

/* Comment-only event */
.d4-agenda .event-comment {
    background: #f5f7fc;
    border: 1px solid #dde6f2;
    color: #5a7bb5;
    padding: 5px 10px;
    gap: 6px;
    align-items: center;
    font-size: 12.5px;
    border-radius: 6px;
    display: inline-flex;
}

.d4-agenda .agenda-event__icon {
    font-size: 13px;
    flex-shrink: 0;
    opacity: .7;
}

.d4-agenda .agenda-event__comment-text {
    font-style: italic;
    color: #5a7bb5;
}

/* ── Event type colours ─────────────────────────────────────────────────── */
.d4-agenda .event-work {
    background: #e8f3fd;
    color: #1a6aad;
    border-left: 3px solid #2f80ed;
    width: 100%;
}

.d4-agenda .event-leave {
    background: #e8f8f2;
    color: #1a7a52;
    border-left: 3px solid #0ab39c;
    width: 100%
}

.d4-agenda .event-sick-leave {
    background: #fef3e8;
    color: #a05a1a;
    border-left: 3px solid #f0925a;
}

.d4-agenda .event-holiday {
    background: #f3f0fb;
    color: #5a3a9a;
    border-left: 3px solid #8b5cf6;
    width: 100%
}

.d4-agenda .event-duty {
    background: #fff8e8;
    color: #7a5a1a;
    border-left: 3px solid #f0c040;
    width: 100%
}

.d4-agenda .event-absence {
    background: #fdeaea;
    color: #9a2a2a;
    border-left: 3px solid #e05252;
}

.d4-agenda .event-event {
    background: #e8f5ec;
    color: #14532d;
    border-left: 3px solid #07b39c;
    width: 100%;
}

/* ── Row state variants ─────────────────────────────────────────────────── */
.d4-agenda tr.current {
    background: #f6fff8;
}

.d4-agenda tr.current .day-cell {
    border-right-color: #c8f0e8;
}

.d4-agenda tr.saturday {
    background: #f8fbff;
}

.d4-agenda tr.saturday .short-day,
.d4-agenda tr.saturday .day-number {
    color: #5a7bb5;
}

.d4-agenda tr.sunday {
    background: #fff8f8;
}

.d4-agenda tr.sunday .short-day,
.d4-agenda tr.sunday .day-number {
    color: #c0554a;
}

.d4-agenda tr.holiday .short-day,
.d4-agenda tr.holiday .day-number {
    color: #8b5cf6;
}

.d4-agenda-overlap-header {
    font-size: 1rem;
    line-height: 1;
}

.d4-agenda-overlap-day {
    font-size: 0.85rem;
    line-height: 1;
}

/* ── Legend ─────────────────────────────────────────────────────────────── */
.agenda-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 18px 14px;
    font-size: 12px;
    color: #6b7fa3;
    border-top: 1px solid #f0f3f9;
}

.agenda-legend div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}
