/* One EPM's page (/epm/event?eventId=…): hero with date tile and sign-up buttons, details, updates,
   venue, who should attend, and more upcoming EPMs. Category colours as on the EPM directory. */

.ev-page { min-height: 100vh; background: #f4f7f6; display: flex; flex-direction: column; }
.ev-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 108px 20px 56px; box-sizing: border-box; flex: 1; }

.ev-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #64748b; margin-bottom: 18px; }
.ev-crumbs button { background: none; border: 0; padding: 0; color: #1f8d5f; font: inherit; font-weight: 600; cursor: pointer; }
.ev-crumbs button:hover { text-decoration: underline; }
.ev-crumbs .ev-crumb-current { color: #334155; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Hero ---- */
.ev-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; padding: 32px; border-radius: 24px;
  background: linear-gradient(135deg, #0f3d2a 0%, #1f6b47 55%, #2c8a5c 100%); color: #fff; overflow: hidden;
  box-shadow: 0 20px 45px -20px rgba(15, 61, 42, 0.55); }
.ev-hero::after { content: ''; position: absolute; inset: 0; background: var(--ev-art) right center / cover no-repeat; opacity: 0.16; pointer-events: none; }
.ev-hero > * { position: relative; z-index: 1; }
.ev-hero.is-cancelled { background: linear-gradient(135deg, #3f1d1d 0%, #6b2a2a 60%, #7f3434 100%); }
.ev-hero.is-past { background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%); }

.ev-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ev-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.ev-badge.tone-green { background: #dcfce7; color: #166534; border-color: transparent; }
.ev-badge.tone-amber { background: #fef3c7; color: #92400e; border-color: transparent; }
.ev-badge.tone-red { background: #fee2e2; color: #991b1b; border-color: transparent; }
.ev-badge.tone-slate, .ev-badge.tone-gray { background: #e2e8f0; color: #334155; border-color: transparent; }

.ev-title { font-family: 'Outfit', sans-serif; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; font-weight: 800; margin: 0 0 18px; letter-spacing: -0.5px; }
.ev-title.is-struck { text-decoration: line-through; text-decoration-thickness: 3px; opacity: 0.85; }

.ev-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0 0 22px; }
.ev-meta-item { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.ev-meta-item svg { flex-shrink: 0; margin-top: 2px; color: #fcd34d; }
.ev-meta-item small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; font-weight: 700; }

.ev-hero .ecn { background: rgba(255, 255, 255, 0.94); border-radius: 14px; padding: 10px 14px; color: #1e293b; margin: -6px 0 20px; }

.ev-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ev-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font: 700 15px 'Inter', sans-serif;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; text-decoration: none; }
.ev-btn:hover { transform: translateY(-1px); }
.ev-btn-primary { background: #fbbf24; color: #1f2937; box-shadow: 0 10px 24px -10px rgba(251, 191, 36, 0.9); }
.ev-btn-primary:hover { background: #f59e0b; }
.ev-btn-light { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.ev-btn-light:hover { background: rgba(255, 255, 255, 0.24); }
.ev-btn-ghost { background: transparent; color: #fff; padding: 13px 10px; }
.ev-btn-outline { background: #fff; color: #1f6b47; border-color: #cfe5d8; }
.ev-btn-outline:hover { border-color: #1f8d5f; }
.ev-mine { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #dcfce7; color: #166534; font-weight: 700; font-size: 14px; }
.ev-note { font-size: 14px; opacity: 0.88; margin: 0; }

/* Date tile + countdown */
.ev-side { display: flex; flex-direction: column; gap: 14px; }
.ev-date-tile { background: #fff; color: #0f172a; border-radius: 20px; text-align: center; overflow: hidden; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6); }
.ev-date-month { background: #d99a18; color: #fff; font: 800 15px 'Outfit', sans-serif; letter-spacing: 0.18em; padding: 10px 0; }
.ev-date-day { font: 800 72px/1 'Outfit', sans-serif; padding: 14px 0 4px; }
.ev-date-rest { font-size: 14px; color: #64748b; padding-bottom: 16px; }
.ev-countdown { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 16px; padding: 14px; text-align: center; }
.ev-countdown strong { display: block; font: 800 28px 'Outfit', sans-serif; }
.ev-countdown span { font-size: 13px; opacity: 0.85; }
.ev-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-count { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 14px; padding: 10px; text-align: center; }
.ev-count strong { display: block; font: 800 22px 'Outfit', sans-serif; }
.ev-count span { font-size: 12px; opacity: 0.85; }

/* Cancelled / held banner */
.ev-banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 16px 18px; margin: 22px 0 0; font-size: 15px; line-height: 1.5; }
.ev-banner svg { flex-shrink: 0; margin-top: 2px; }
.ev-banner.is-cancelled { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.ev-banner.is-past { background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; }
.ev-banner button { background: none; border: 0; padding: 0; color: #1f8d5f; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ---- Body ---- */
.ev-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 24px; align-items: start; }
.ev-card { background: #fff; border-radius: 20px; padding: 24px; border: 1px solid #e7eeea; box-shadow: 0 6px 20px -16px rgba(15, 61, 42, 0.4); }
.ev-card + .ev-card { margin-top: 20px; }
.ev-card h2 { display: flex; align-items: center; gap: 10px; font: 800 20px 'Outfit', sans-serif; color: #10201a; margin: 0 0 14px; }
.ev-card h2 svg { color: #1f8d5f; }
.ev-text { color: #334155; font-size: 15.5px; line-height: 1.7; margin: 0; white-space: pre-line; }

.ev-highlights { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ev-highlights li { display: flex; gap: 10px; align-items: flex-start; background: #f6faf7; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #1e293b; line-height: 1.45; }
.ev-highlights li svg { flex-shrink: 0; color: #1f8d5f; margin-top: 1px; }

.ev-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #e2e8f0; }
.ev-timeline li { position: relative; padding: 0 0 18px 14px; }
.ev-timeline li:last-child { padding-bottom: 0; }
.ev-timeline li::before { content: ''; position: absolute; left: -26px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--tone, #1f8d5f); }
.ev-timeline .ev-tl-tag { font-weight: 700; color: #10201a; font-size: 14px; }
.ev-timeline .ev-tl-when { font-size: 12px; color: #94a3b8; margin-left: 6px; }
.ev-timeline p { margin: 4px 0 0; color: #475569; font-size: 14px; line-height: 1.5; }

.ev-venue-name { font-weight: 700; color: #10201a; font-size: 16px; margin: 0 0 4px; }
.ev-venue-place { color: #64748b; font-size: 14px; margin: 0 0 16px; }
.ev-map { display: block; height: 150px; border-radius: 14px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(135deg, #e8f3ec 0%, #d4e9dc 100%); position: relative; }
.ev-map svg.ev-map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -70%); color: #dc2626; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.ev-map::before { content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(#ffffff 2px, transparent 2px), linear-gradient(90deg, #ffffff 2px, transparent 2px); background-size: 38px 38px; }
.ev-sidebar .ev-btn { width: 100%; box-sizing: border-box; }

.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chip { padding: 7px 12px; border-radius: 999px; background: #f1f7f3; color: #1f6b47; font-size: 13px; font-weight: 600; border: 1px solid #d6eadd; }

.ev-help { font-size: 14px; color: #475569; line-height: 1.6; margin: 0 0 14px; }

/* ---- More EPMs ---- */
.ev-more { margin-top: 36px; }
.ev-more-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ev-more-head h2 { font: 800 24px 'Outfit', sans-serif; color: #10201a; margin: 0; }
.ev-more-head button { background: none; border: 0; color: #1f8d5f; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ev-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ev-mini { background: #fff; border-radius: 18px; border: 1px solid #e7eeea; padding: 18px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  display: flex; gap: 14px; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.ev-mini:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(15, 61, 42, 0.5); border-color: #b9dcc7; }
.ev-mini-date { flex-shrink: 0; width: 56px; border-radius: 12px; background: #f1f7f3; text-align: center; padding: 8px 0; }
.ev-mini-date b { display: block; font: 800 22px 'Outfit', sans-serif; color: #10201a; }
.ev-mini-date span { font-size: 11px; font-weight: 700; color: #1f8d5f; letter-spacing: 0.1em; }
.ev-mini h3 { font: 700 15px 'Inter', sans-serif; color: #10201a; margin: 0 0 6px; line-height: 1.35; }
.ev-mini p { margin: 0; font-size: 13px; color: #64748b; display: flex; gap: 5px; align-items: center; }

/* ---- Loading / not found ---- */
.ev-skeleton { height: 280px; border-radius: 24px; background: linear-gradient(90deg, #e8efeb 25%, #f3f7f5 50%, #e8efeb 75%); background-size: 200% 100%; animation: ev-shimmer 1.4s infinite; }
@keyframes ev-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ev-empty { text-align: center; padding: 70px 20px; background: #fff; border-radius: 24px; border: 1px solid #e7eeea; }
.ev-empty svg { color: #94a3b8; }
.ev-empty h2 { font: 800 24px 'Outfit', sans-serif; margin: 14px 0 8px; color: #10201a; }
.ev-empty p { color: #64748b; margin: 0 0 20px; }

.ev-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #10201a; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 2000; box-shadow: 0 10px 24px rgba(0,0,0,.25); }

/* Grid and flex children may shrink below their content (long titles, venues), so nothing runs off a phone screen */
.ev-hero > *, .ev-body > *, .ev-card, .ev-meta-item > div { min-width: 0; }
.ev-title, .ev-text, .ev-timeline p, .ev-venue-place, .ev-help, .ev-mini h3 { overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .ev-hero { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .ev-side { flex-direction: row; flex-wrap: wrap; }
  .ev-date-tile { flex: 0 0 150px; }
  .ev-date-day { font-size: 52px; }
  .ev-countdown, .ev-counts { flex: 1 1 160px; }
  .ev-body { grid-template-columns: minmax(0, 1fr); }
  .ev-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .ev-wrap { padding: 92px 14px 40px; }
  .ev-hero { padding: 20px; border-radius: 20px; }
  .ev-meta { grid-template-columns: minmax(0, 1fr); }
  .ev-highlights { grid-template-columns: minmax(0, 1fr); }
  .ev-more-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-actions .ev-btn { flex: 1 1 100%; }
  .ev-date-tile { flex: 0 0 120px; }
  .ev-date-day { font-size: 44px; }
  .ev-countdown { flex: 1 1 120px; }
  .ev-counts { flex: 1 1 100%; }
  .ev-card { padding: 18px; }
}
