/* events styles (keep small; shared styles live in ../style.css) */

/* list rows on /events, the home box and community pages */
a.topic-title { color: var(--text); text-decoration: none; }
a.topic-title:hover { color: var(--link); text-decoration: underline; }
.event-teaser {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
/* rows on /events and the home box: status sits on the right */
.agenda-row { align-items: center; border-top: 0; }
.agenda-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 42%; }
.agenda-side .chip { white-space: nowrap; }
.agenda-side .chip .ms { vertical-align: -3px; margin-right: 3px; }
.agenda-side .ms { font-size: 15px; }
.event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.event-mine[data-rsvp="going"] {
  background: transparent; border-color: var(--line); color: var(--text); font-weight: 700;
}
.event-mine[data-rsvp="maybe"] { background: var(--pink-soft); border-color: transparent; color: var(--pink); font-weight: 700; }
.event-empty { text-align: center; padding: 18px 16px; }
.event-empty p { margin: 0 0 10px; }
.event-empty p:last-child { margin-bottom: 0; }

/* event page */
.event-head { display: flex; gap: 12px; align-items: center; }
.event-head-main { flex: 1; min-width: 0; }
.event-head-main p { margin: 2px 0 0; }
.event-title { margin: 0; font-size: 1.35rem; line-height: 1.25; overflow-wrap: anywhere; }
.event-facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.event-facts li { display: flex; gap: 10px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.event-facts li > :last-child { min-width: 0; }
.event-fact-icon { flex: none; width: 1.4em; text-align: center; }
.event-description {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
}
.event-actions { margin-top: 14px; }
.event-rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.event-rsvp .btn { justify-content: center; min-width: 0; padding-left: 6px; padding-right: 6px; white-space: normal; }
.event-maybe { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.event-maybe-person { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; min-width: 0; }

/* create form */
.check-row { display: flex; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.check-row input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

@media (max-width: 420px) {
  .event-title { font-size: 1.2rem; }
  .event-rsvp { gap: 6px; }
  .event-rsvp .btn { font-size: .85rem; }
}

/* place picker in the event form, and the map */
.place-picker { display: grid; gap: 4px; }
.place-list {
  list-style: none; margin: 0; padding: 4px;
  background: var(--card-alt); border-radius: 16px; box-shadow: var(--shadow);
}
.place-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: grid; gap: 1px; }
.place-list li span { font-size: .82rem; color: var(--muted); }
.place-list li.is-active { background: var(--title-bg); }
.map-frame { display: block; width: 100%; height: 260px; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.event-place { margin-top: 12px; }

.chip-now { background: var(--pc); color: var(--on-pc); border-color: transparent; font-weight: 700; }

/* an event shown outside its own community: the tag linking to where it comes from */
.chip-from { background: var(--sc); color: var(--on-sc); border-color: transparent; white-space: normal; max-width: 100%; }
.chip-from a { color: inherit; text-decoration: underline; }
.chip-from::first-letter { text-transform: none; }
/* sharing on the event page */
.event-shares { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-alt); display: grid; gap: 10px; }
.event-shared-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.event-shared-in .chip { display: inline-flex; align-items: center; gap: 4px; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; font-weight: 700; padding: 0 2px; line-height: 1; border-radius: 6px; }
.chip-x:hover { background: color-mix(in srgb, var(--on-sc) 14%, transparent); }
.event-share > summary { list-style: none; cursor: pointer; width: max-content; }
.event-share > summary::-webkit-details-marker { display: none; }
.event-share[open] > summary { margin-bottom: 10px; }
.event-share-row { display: flex; gap: 8px; }
.event-share-row select { flex: 1; min-width: 0; }
