/* Events (public/events.js). Colours from the site's tokens, so light and dark both follow them. */
.ev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ev-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; color: var(--fg); min-width: 0; }
.ev-card:hover { border-color: var(--accent); }
.ev-card.cancelled .ev-title { text-decoration: line-through; color: var(--muted); }
/* The date as a small calendar leaf: month above, day below. */
.ev-date { flex: none; width: 52px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); text-align: center; background: var(--surface); }
.ev-date span { display: block; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; line-height: 22px; }
.ev-date b { display: block; font-size: 22px; line-height: 32px; font-weight: 800; }
.ev-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.ev-kind { font-size: 13px; font-weight: 600; color: var(--accent); margin: 0; }
.ev-n { color: var(--fg); }
.ev-tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ev-tag.off { color: var(--danger); }
.ev-tag.wait { color: var(--warn); }

.ev-back { margin: 0 0 10px; }
.ev-head { margin-bottom: 6px; }
.ev-head h1 { margin: 0; }
.ev-lede { margin: 0 0 12px; }
.ev-head-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.ev-page { max-width: 680px; }
.ev-page h1 { margin: 4px 0 14px; overflow-wrap: anywhere; }
.ev-page h2 { font-size: 19px; margin: 0 0 10px; }
.ev-page h3 { font-size: 15px; margin: 14px 0 8px; }
.ev-hn { color: var(--muted); font-weight: 600; margin-left: 4px; }
.ev-page .note { margin: 0 0 14px; }
.ev-off { border-color: var(--danger); color: var(--danger); font-weight: 600; }
.ev-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 14px 16px; margin: 0 0 16px; border-radius: var(--radius); background: var(--surface-2); }
.ev-facts dt { font-weight: 700; } .ev-facts dd { margin: 0; overflow-wrap: anywhere; }
.ev-details { margin: 0 0 18px; }
.ev-reply, .ev-going, .ev-admin { padding: 16px; margin: 0 0 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.ev-reply { border: 2px solid var(--accent); display: flex; flex-direction: column; gap: 12px; }
.ev-reply h2 { margin: 0; }
.ev-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ev-answers button { min-height: 44px; font-weight: 700; }
.ev-answers button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.ev-guests { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.ev-guests[hidden] { display: none; }
.ev-step { display: inline-flex; align-items: center; gap: 4px; }
.ev-step button { width: 40px; min-height: 40px; padding: 0; font-size: 18px; line-height: 1; }
.ev-step output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-people { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.ev-people li { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.ev-people a { color: var(--fg); text-decoration: none; }
.ev-people a:hover { text-decoration: underline; }
.ev-admin p { margin: 0 0 4px; }
.ev-admin .savebar { flex-wrap: wrap; margin-top: 12px; }
.ev-note .icon { flex: none; }
.ev-note > span { flex: 1; min-width: 0; }
.ev-note .ev-note-go { flex: none; margin-left: auto; padding-left: 6px; }

/* The form. Date and time boxes drawn like the site's other boxes (styles.css styles text inputs only). */
.ev-form input[type=date], .ev-form input[type=time] { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); width: 100%; height: calc(1.55em + 20px); box-sizing: border-box; }
[data-look="new"] .ev-form input[type=date], [data-look="new"] .ev-form input[type=time] { border-radius: 12px; padding: 11px 14px; height: calc(1.55em + 24px); }
.ev-form #evReply { max-width: 220px; }
.ev-form .ev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ev-form .ev-row > span { display: flex; flex-direction: column; min-width: 0; }
.ev-who { border: 0; padding: 0; margin: 16px 0 4px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-who legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.ev-opt { align-items: center; }
.ev-opt > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex: 1; min-width: 0; }
.ev-opt input[type=text] { flex: 1 1 180px; min-width: 0; margin: 0; }
.ev-span { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-span select { width: auto; margin: 0; }
#evCount { margin: 2px 0 0; min-height: 1.5em; }

@media (max-width: 480px) {
  .ev-list { grid-template-columns: 1fr; }
  .ev-form .ev-row { grid-template-columns: 1fr; gap: 0; }
  .ev-head-acts .btn { white-space: nowrap; }
}
