/* Duidelijke datumweergave voor evenementen */
#events .listing__meta,
body[data-category="events"] .listing__meta,
.category-events .listing__meta,
.listing[data-category="events"] .listing__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem .65rem;
    width: 100%;
    margin: 0 0 .7rem;
}

#events .listing__meta > time:first-child,
body[data-category="events"] .listing__meta > time:first-child,
.category-events .listing__meta > time:first-child,
.listing[data-category="events"] .listing__meta > time:first-child {
    grid-column: 1 / -1;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: .42rem .68rem;
    border: 1px solid #c9dff4;
    border-radius: 10px;
    background: #edf6ff;
    color: #0b4f88;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

#events .listing__meta .source-flag,
body[data-category="events"] .listing__meta .source-flag,
.category-events .listing__meta .source-flag,
.listing[data-category="events"] .listing__meta .source-flag {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

#events .listing__meta .freshness,
body[data-category="events"] .listing__meta .freshness,
.category-events .listing__meta .freshness,
.listing[data-category="events"] .listing__meta .freshness {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    min-width: 0;
}

/* Voorkom een tweede losse timestamp onder de badges. */
#events .listing__meta .freshness-time,
body[data-category="events"] .listing__meta .freshness-time,
.category-events .listing__meta .freshness-time,
.listing[data-category="events"] .listing__meta .freshness-time {
    white-space: normal;
}

/* Houd de kaarttekst voldoende breed. */
#events .listing__body,
body[data-category="events"] .listing__body,
.category-events .listing__body,
.listing[data-category="events"] .listing__body {
    min-width: 0;
}

@media (max-width: 700px) {
    #events .listing__meta > time:first-child,
    body[data-category="events"] .listing__meta > time:first-child,
    .category-events .listing__meta > time:first-child,
    .listing[data-category="events"] .listing__meta > time:first-child {
        width: 100%;
        box-sizing: border-box;
        font-size: .82rem;
    }
}
