/* ============================================
   KALENDER STIJLEN – passend bij huisstijl
============================================ */

/* ─────────────────────────────────────────────
   BLOCK VIEW (block.html.twig)
   Alleen tekst, geen afbeelding
──────────────────────────────────────────── */
.mx_calendar_block_item {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid #e0eed6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mx_calendar_block_item:last-child { border-bottom: 0; }
.mx_calendar_block_content { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.mx_calendar_block_item h3 {
    font-family: "Gluten", cursive;
    font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
    font-weight: 600;
    color: var(--blauw);
    margin: 0; padding: 0; line-height: 1.3;
}
.mx_calendar_block_item h3 a { color: var(--blauw); text-decoration: none; transition: color 0.2s ease; }
.mx_calendar_block_item h3 a:hover { color: var(--groen); text-decoration: underline; }
.mx_calendar_block_item p { font-size: 0.9rem; color: var(--zwart); margin: 0; padding: 0; line-height: 1.5; }
.mx_calendar_block_item em { font-style: normal; font-size: 0.78rem; font-weight: 600; color: var(--blauw); opacity: 0.75; }
.mx_calendar_block_image { display: none !important; }


/* ============================================
   NAVIGATIEBALK
   ============================================ */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px 12px;
    gap: 12px;
}
.cal-month-label {
    font-family: "Gluten", cursive;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blauw);
    text-transform: capitalize;
    text-align: center;
    flex: 1;
}
.cal-nav-btn {
    background: none;
    border: 2px solid var(--blauw, #1a73e8);
    color: var(--blauw, #1a73e8);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease;
    flex-shrink: 0;
}
.cal-nav-btn:hover {
    background: var(--blauw, #1a73e8);
    color: #fff;
}


/* ============================================
   MAAND-GRID (CATEGORY 338)
   ============================================ */

/* Scroll-wrapper: altijd horizontaal scrollen als het grid niet past */
#mx_cal_root {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
}

.mx_calendar_month .calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
       /* Minimale breedte zodat cellen niet te smal worden */
    min-width: 560px;
}

/* WEEK HEADERS */
.cal-head {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: #f6f8fc;
    border-bottom: 1px solid #e6e6e6;
    font-size: 0.85rem;
}

/* DAY CELL */
.cal-day {
    min-height: 120px;
    border: 1px solid #f0f0f0;
    padding: 6px;
    background: #fff;
    transition: background 0.2s ease;
    vertical-align: top;
}
.cal-day:hover { background: #f9fbff; }

/* Lege cellen */
.cal-day--empty {
    background: #fafafa;
    min-height: 120px;
}

/* Vandaag */
.cal-day--today { background: #f0f7ff; }
.cal-day--today .cal-date {
    background: var(--blauw, #1a73e8);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* DATE NUMBER */
.cal-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

/* ── EVENT BLOCK ── */
.cal-event {
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
    padding: 4px 6px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    line-height: 1.3;
}
.cal-event--multiday {
    background: #e6f4ea;
    border-left-color: var(--groen, #34a853);
}
.cal-event-title {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-event-title:hover { text-decoration: underline; }
.cal-time {
    display: block;
    font-size: 0.68rem;
    color: #555;
    margin-bottom: 2px;
}

/* ── AGENDA EXPORTKNOPPEN ── */
.cal-export {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.cal-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    line-height: 1.4;
}
.cal-export-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.cal-export-btn svg { width: 10px; height: 10px; flex-shrink: 0; }
.cal-export-btn--google { background: #e8f0fe; color: #1967d2; border: 1px solid #c5d8fb; }
.cal-export-btn--google:hover { background: #d2e3fc; }
.cal-export-btn--outlook { background: #e3f0fb; color: #0067b8; border: 1px solid #b8d6f5; }
.cal-export-btn--outlook:hover { background: #cce4f8; }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .cal-day { min-height: 90px; padding: 4px; }
    .cal-export { display: none; }
}
@media (max-width: 600px) {
    /* Grid scrollt horizontaal – geen kolommen verminderen */
    .mx_calendar_month .calendar-month-grid {
        min-width: 480px; /* iets compacter op kleine schermen */
    }
    .cal-head { font-size: 0.72rem; padding: 7px 3px; }
    .cal-day { min-height: 70px; padding: 4px 3px; }
    .cal-date { font-size: 0.72rem; margin-bottom: 4px; }
    .cal-event { padding: 3px 4px; margin-bottom: 3px; }
    .cal-event-title { font-size: 0.67rem; }
    .cal-time { display: none; }
    /* Kleine scroll-hint: subtiele schaduw aan de rechterkant */
    #mx_cal_root::after {
        content: "";
        position: absolute;
        top: 0; right: 0;
        width: 24px;
        height: 100%;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.85));
        pointer-events: none;
        border-radius: 0 8px 8px 0;
    }
}


/* ============================================
   ITEM DETAILPAGINA – Agenda exportknoppen
   ============================================ */
.cal-item-export {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 20px;
}
.cal-item-export-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blauw, #1a73e8);
    margin-right: 4px;
}
.cal-export-btn--lg {
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 6px;
    gap: 7px;
}
.cal-export-btn--lg svg {
    width: 18px;
    height: 18px;
}