/* ═══ Event cards, clean (template in eventme-africa.js) ══════════
   Title first, one line for when, one for where, one small category
   chip, a "soon" chip only when it is close, a save heart on the photo.
   Dark glass in the dark theme, white in the light theme. */

#eventsGrid .ev-card .img-hint,
#eventsGrid .ev-card .ev-countdown { display: none !important; }

/* the card */
html:not([data-theme="light"]) #eventsGrid .ev-card {
  /* a step lighter than the page, a visible edge and a soft lift, so each card reads as its own object */
  background: linear-gradient(180deg, #2b2124 0%, #231b1e 100%) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 18px 40px -16px rgba(0,0,0,0.85), 0 2px 6px rgba(0,0,0,0.35) !important;
  color: #f2eaea;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
html:not([data-theme="light"]) #eventsGrid .ev-card:hover { border-color: rgba(255,90,110,0.55) !important; transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 24px 48px -16px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,90,110,0.18) !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .card-actions { border-top-color: rgba(255,255,255,0.1) !important; }
#eventsGrid .ev-card { border-radius: 18px !important; overflow: hidden; }

/* photo: date ticket bottom right (existing), save heart top left */
#eventsGrid .ev-card .ev-img { position: relative; }
.ev2-save { position: absolute; z-index: 5; top: 12px; left: 12px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(12,6,9,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s, color .2s, transform .15s; }
.ev2-save:hover { background: rgba(12,6,9,0.8); }
.ev2-save:active { transform: scale(0.92); }
.ev2-save.is-on { background: #fff; color: #C8102E; }
.ev2-save.is-on svg { fill: currentColor; }
.ev2-save:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* body */
#eventsGrid .ev-card .ev-body { gap: 0 !important; padding: 16px 18px 14px !important; }
.ev2-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; min-height: 24px; }
.ev2-cat { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; color: #ff6b84; background: rgba(200,16,46,0.14); }
.ev2-cat svg, .ev2-cat i { width: 13px; height: 13px; font-size: 13px; }
.ev2-soon { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; color: #f4c44a; background: rgba(244,176,0,0.14); }
.ev2-soon.is-live { color: #2fd07a; background: rgba(47,208,122,0.14); }
.ev2-soon.is-live i { width: 7px; height: 7px; border-radius: 50%; background: #2fd07a; animation: mhPulse 2s infinite; }
#eventsGrid .ev-card .ev-title { margin: 0 0 10px !important; font-size: 1.12rem !important; line-height: 1.3 !important; font-weight: 700 !important; letter-spacing: -0.01em; }
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-title { color: #fff !important; }
.ev2-line { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; font-size: 0.88rem; line-height: 1.45; }
.ev2-line svg, .ev2-line i { flex: none; margin-top: 3px; color: #ff5c78; }
.ev2-line span { min-width: 0; }
html:not([data-theme="light"]) .ev2-line { color: rgba(255,255,255,0.78); }
.ev2-line .ev-map-link { color: inherit; text-decoration: none; font-weight: 600; }
.ev2-line .ev-map-link:hover { text-decoration: underline; }
.ev2-when span { font-weight: 600; }
html:not([data-theme="light"]) .ev2-when span { color: #fff; }

/* attending faces and actions: a quiet footer */
#eventsGrid .ev-card .card-rsvp-row { margin: 10px 0 0 !important; }
#eventsGrid .ev-card .card-actions { margin-top: auto !important; padding-top: 12px !important; border-top: 1px solid rgba(127,127,127,0.18) !important; gap: 6px !important; }
#eventsGrid .ev-card .card-action-btn { border-radius: 999px !important; height: 36px; font-size: 0.8rem !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .card-action-btn { background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.08) !important; color: rgba(255,255,255,0.8) !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .card-action-btn:hover { background: rgba(255,255,255,0.1) !important; color: #fff !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-desc,
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-advice p,
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-artists { color: rgba(255,255,255,0.72) !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-advice { background: rgba(244,176,0,0.08) !important; border-color: rgba(244,176,0,0.25) !important; }
html:not([data-theme="light"]) #eventsGrid .ev-card .ev-ticket-badge { background: rgba(255,255,255,0.06) !important; color: rgba(255,255,255,0.8) !important; border-color: rgba(255,255,255,0.1) !important; }

/* the big featured card: same style, a little more room */
html:not([data-theme="light"]) #eventsGrid .ev-card.card-featured .ev-body { background: transparent !important; }
#eventsGrid .ev-card.fr-slot .ev-title { font-size: 1.6rem !important; }
#eventsGrid .ev-card.fr-slot .ev-body { padding: 24px 26px 18px !important; }
#eventsGrid .ev-card.fr-slot .ev2-line { font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { .ev2-soon.is-live i { animation: none; } html:not([data-theme="light"]) #eventsGrid .ev-card:hover { transform: none; } }
#eventsGrid .ev-card.fr-src .ev2-save { display: none !important; }

/* bigger at first look: a taller featured card, taller photos and larger text on the cards below */
@media (min-width: 1001px) {
  #eventsGrid .card-featured { min-height: 480px; }
  #eventsGrid .card-featured .ev-img { min-height: 480px !important; }
  #eventsGrid .ev-card.fr-slot .ev-title { font-size: 1.9rem !important; }
  #eventsGrid .ev-card.fr-slot .ev2-line { font-size: 1rem; }
}
#eventsGrid .ev-card:not(.card-featured) .ev-img { aspect-ratio: 4 / 3 !important; height: auto !important; }
#eventsGrid .ev-card:not(.card-featured) .ev-title { font-size: 1.25rem !important; }
#eventsGrid .ev-card:not(.card-featured) .ev2-line { font-size: 0.94rem; }
#eventsGrid .ev-card:not(.card-featured) .ev-body { padding: 18px 20px 16px !important; }

/* Publish event, back in the Events header: on the right, level with the title */
#events .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ev-publish-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 22px; margin-bottom: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, rgba(200,16,46,.18) 0%, rgba(139,0,26,.14) 100%); border: 1px solid rgba(200,16,46,.6); color: #fff; font: 600 .88rem var(--font-body, inherit);
  box-shadow: 0 0 16px rgba(200,16,46,.35), 0 3px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.06); transition: background .2s, border-color .2s, box-shadow .2s; }
.ev-publish-btn:hover { background: linear-gradient(135deg, rgba(200,16,46,.3) 0%, rgba(139,0,26,.24) 100%); border-color: rgba(255,90,110,.85); box-shadow: 0 0 22px rgba(200,16,46,.5), 0 3px 12px rgba(0,0,0,.3); }
.ev-publish-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[data-theme="light"] .ev-publish-btn { color: #9b0c24; background: rgba(200,16,46,.06); box-shadow: none; }
@media (max-width: 640px) { .ev-publish-btn { margin-bottom: 0; } }
