/* Calendar & Events (templates/event/index.html.twig): month grid + "Coming up" with details. */
.ev-layout { align-items: start; }
.ev-back { text-align: center; margin: -6px 0 10px; }

.ev-cal { border: 1px solid var(--sh-line); border-radius: 10px; overflow: hidden; }
.ev-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ev-row + .ev-row { border-top: 1px solid var(--sh-line); }
.ev-head { background: #f7f9fb; }
.ev-head div { padding: 7px 4px; text-align: center; font-size: 11px; font-weight: 700; color: var(--sh-muted); text-transform: uppercase; letter-spacing: .3px; }
.ev-day { min-height: 104px; padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: #fff; }
.ev-day + .ev-day { border-left: 1px solid var(--sh-line); }
.ev-day.is-out { background: #fafbfc; }
.ev-day.is-out .ev-num { color: #b4bfcb; }
.ev-num { font-size: 12px; font-weight: 600; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.ev-day.is-today .ev-num { background: var(--sh-blue); color: #fff; }
.ev-holiday { font-size: 10px; font-weight: 600; color: #b91c1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip { display: block; font-size: 11px; line-height: 1.35; padding: 2px 5px; border-radius: 4px; background: var(--ev-bg); color: var(--ev-fg); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.ev-chip:hover { color: var(--ev-fg); filter: brightness(.96); }
.ev-chip-time { font-weight: 700; }
.ev-more { font-size: 11px; color: var(--sh-muted); text-decoration: none; padding: 0 5px; }

.ev-list { position: sticky; top: 82px; max-height: calc(100vh - 100px); overflow-y: auto; }
.ev-item { display: flex; gap: 12px; padding: 12px 10px 12px 12px; border-bottom: 1px solid var(--sh-line); border-left: 4px solid var(--ev-bg); scroll-margin-top: 90px; transition: background .4s; }
.ev-item:last-child { border-bottom: 0; }
.ev-item:target { background: #f2f7ff; }
.ev-item .ui-event-date { border-color: var(--ev-bg); }
.ev-item-body { min-width: 0; flex: 1; }
.ev-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ev-item-head h4 { font-size: 14px; font-weight: 700; margin: 2px 0 6px; overflow-wrap: anywhere; }
.ev-edit { padding: 4px 10px; font-size: 12px; }
.ev-facts { display: grid; gap: 3px; margin: 0; font-size: 12px; }
.ev-facts div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px; }
.ev-facts dt { color: var(--sh-muted); font-weight: 600; }
.ev-facts dd { margin: 0; overflow-wrap: anywhere; }
.ev-desc { margin: 8px 0 0; font-size: 12px; color: #4a5868; white-space: pre-line; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
    .ev-list { position: static; max-height: none; }
}
/* Phones: dates with colored dots; the details are in the list below. */
@media (max-width: 720px) {
    .ev-day { min-height: 54px; padding: 3px; align-items: center; flex-flow: row wrap; align-content: flex-start; justify-content: center; }
    .ev-num { margin-inline: calc((100% - 22px) / 2); } /* alone on its line, centered */
    .ev-holiday { width: 6px; height: 6px; border-radius: 50%; background: #fecaca; font-size: 0; }
    .ev-chip { width: 7px; height: 7px; padding: 0; border-radius: 50%; font-size: 0; background: var(--ev-fg); }
    .ev-more { font-size: 9px; padding: 0; }
    .ev-head div { font-size: 10px; padding: 6px 0; }
}
