/* Events & Konvois (pages/events.html) und Event-Karten auf der Startseite */

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ev-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ev-grid.is-empty { display: block; }
.ev-grid .empty { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-xl); }

.ev-card {
  position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: 1fr auto;
  gap: 14px 16px; padding: 18px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.ev-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.ev-card.is-running { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.ev-card.is-cancelled { opacity: .62; }
.ev-card.is-cancelled .ev-title a { text-decoration: line-through; text-decoration-color: var(--bad); }
.ev-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start;
  width: 58px; height: 64px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.ev-date-mon { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); line-height: 1.2; }
.ev-date b { font: 400 26px/1 var(--font-display); color: var(--text); }
.ev-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-when, .ev-route, .ev-count { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 13.5px; min-width: 0; }
.ev-when .icon, .ev-route .icon, .ev-count .icon { width: 15px; height: 15px; flex: none; }
.ev-route { flex-wrap: wrap; color: var(--text-2); }
.ev-place { font-weight: 600; overflow-wrap: anywhere; }
.ev-arrow { color: var(--accent); font-weight: 700; }
.ev-title { margin: 0; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.ev-title a { color: var(--text); text-decoration: none; }
.ev-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* ganze Karte klickbar */
.ev-title a:focus-visible { outline: none; }
.ev-card:has(.ev-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ev-foot {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.ev-by { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ev-actions { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; }

/* Detail */
.ev-d-when { margin: 0 0 4px; color: var(--accent-text); font-weight: 650; font-size: 14px; }
.ev-d-route {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin: 6px 0 16px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.ev-d-route .icon { color: var(--accent); }
.ev-d-route strong { overflow-wrap: anywhere; }
.ev-d-route .ev-line { flex: 1; min-width: 30px; height: 2px; background: repeating-linear-gradient(90deg, var(--faint) 0 8px, transparent 8px 14px); }
.ev-d-desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); margin: 16px 0 0; padding: 14px 16px; background: var(--bg-2); border-radius: var(--radius); }
.ev-d-desc:empty { display: none; }
.ev-d-sub { margin: 20px 0 10px; font-size: 15px; }
.ev-participants { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ev-participants li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.ev-participants li.maybe { color: var(--muted); font-style: italic; }
.ev-participants li.creator { border-color: var(--accent-line); background: var(--accent-soft); }
.ev-participants li a { color: inherit; text-decoration: none; }
.ev-participants li a:hover { text-decoration: underline; }
.ev-coords summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* Seitenleiste */
.ev-help { margin-top: 20px; }
.check-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.check-list li { position: relative; padding-left: 22px; }
.check-list li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* Konvoi */
.cv-form { display: grid; gap: 8px; }
.cv-inline { display: flex; gap: 8px; }
.cv-inline input { flex: 1; min-width: 0; }
.mono-input { font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.cv-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 16px 0; }
.cv-or::before, .cv-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cv-name { margin: 0 0 2px; font-size: 19px; overflow-wrap: anywhere; }
.cv-code-box { display: grid; gap: 8px; margin: 16px 0; padding: 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px dashed var(--accent-line); }
.cv-code-box code { font-size: 22px; letter-spacing: .2em; background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 700; }
.cv-members { list-style: none; margin: 0 0 16px; padding: 0; }
.cv-members li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cv-members li:last-child { border-bottom: 0; }
.cv-member-name { font-weight: 650; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cv-member-info { grid-column: 2 / -1; color: var(--muted); font-size: 13px; }
.cv-member-actions { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 960px) { .ev-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ev-grid-3, .ev-grid { grid-template-columns: 1fr; } }
