/* ================================================================
   20. EVENT RESULT CARD (.evcard)
   ---------------------------------------------------------------
   Used by __events_results_card.php on the events listing page.
   Cards are direct children of .rp-grid (CSS Grid, §08).
   The existing .rp-grid responsive rules (§18) apply without change.

   DOES NOT DUPLICATE:
     - .rp-grid layout and responsive breakpoints    -> §08 and §18
     - .rp-load-more / .rp-load-more-btn            -> §13
     - .filter-bar / .fpill / .filter-search        -> §05
     - Design tokens and font stacks                -> custom-v4.css §01

   BADGE PLACEMENT:
     .evcard-badge--featured  top-left  (star / promoted)
     .evcard-badge--free       top-right (free entry)
     .evcard-datebox           bottom-left (day + month, above gradient)
     When both featured and free are present, badges do not overlap.
================================================================ */


/* ── Base card ── */
.evcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s, box-shadow .3s;
  position: relative;
}

/* Top accent bar — events blue token */
.evcard::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--events), #0056b3);
  flex-shrink: 0;
}

.evcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(35,15,66,.12);
}


/* ── Image container ── */
.evcard-img {
  height: 210px;
  overflow: hidden;
  position: relative;
  background: var(--wh2);
  flex-shrink: 0;
}

.evcard-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .5s ease;
}

.evcard:hover .evcard-photo {
  transform: scale(1.05);
}

/* Gradient — lower portion of image, behind date box */
.evcard-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(35,15,66,.78) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Placeholder for events without an image */
.evcard-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, var(--dv) 0%, var(--mv) 60%, #034872 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.evcard-img-placeholder::after {
  content: '\f073';
  font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free', sans-serif;
  font-weight: 300;
  font-size: 2.8rem;
  color: rgba(246,238,39,.18);
}


/* ── Badges — positioned over the image ── */
.evcard-badge {
  position: absolute;
  top: 12px;
  z-index: 3;
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.evcard-badge--featured {
  left: 12px;
  background: var(--ye);
  color: var(--dv);
}

.evcard-badge--free {
  right: 12px;
  background: var(--gr);
  color: var(--dv);
}


/* ── Date box — bottom-left, above image gradient ── */
.evcard-datebox {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: var(--dv);
  border: 1px solid rgba(246,238,39,.22);
  border-radius: 3px;
  padding: 6px 10px;
  text-align: center;
  min-width: 44px;
}

.evcard-day {
  font-family: var(--ff-h);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ye);
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
}

.evcard-mon {
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.52);
  display: block;
  margin-top: 2px;
}


/* ── Card body ── */
.evcard-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* ── Category tag ── */
.evcard-cat {
  font-family: var(--ff-h);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--events);
  background: rgba(0,123,255,.08);
  padding: 2px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 8px;
  align-self: flex-start;
}


/* ── Title ── */
.evcard-title {
  font-family: var(--ff-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dv);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}


/* ── Description snippet (2-line clamp) ── */
.evcard-desc {
  font-size: 13px;
  color: var(--mu);
  line-height: 1.6;
  font-weight: 300;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ── Meta footer ── */
.evcard-meta {
  font-size: 10.5px;
  color: var(--mu);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.evcard-meta i {
  font-size: 10px;
  color: var(--mv);
  flex-shrink: 0;
}

.evcard-loc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evcard-meta-sep {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--rule);
  flex-shrink: 0;
}

/* Multi-day label */
.evcard-multiday {
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mu);
  background: var(--wh2);
  border: 1px solid var(--rule);
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
}

/* View link — pushed to right via margin-left auto */
.evcard-view-link {
  font-family: var(--ff-h);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mv);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .18s;
  flex-shrink: 0;
  white-space: nowrap;
}

.evcard:hover .evcard-view-link {
  color: var(--dv);
}


/* ================================================================
   FILTER BAR ADDITIONS — events listing
   ---------------------------------------------------------------
   .fpill--clear: visible on the white filter-bar background.
   Replaces fpill--sm (which is scoped to the dark sidebar header
   and would be invisible on a white background).

   PLACE: append after the existing §05 filter-bar rules.
================================================================ */

.fpill--clear {
  color: var(--mv);
  border-color: rgba(89,45,140,.25);
  background: rgba(89,45,140,.05);
}

.fpill--clear:hover,
.fpill--clear.active {
  background: var(--mv);
  border-color: var(--mv);
  color: #fff;
}


/* ================================================================
   21. HERO MONTH TAB STRIP (.evt-month-tabs / .evt-month-tab)
   ---------------------------------------------------------------
   Sits inside .rp-statsbar (§03, result-pages-addon-v4.css) at the
   base of .rp-hero--events on the events listing page
   (_events_results.php). Populated from itrvl_events_stats_v4 —
   current month + next 2, plus an "All Events" catch-all summing
   every month the SP returns.

   Plain anchor links to in-page month-group headers further down
   the page — deliberately NOT role="tab"/aria-selected, so every
   month stays independently crawlable rather than hidden behind a
   tabpanel switch.

   DOES NOT DUPLICATE:
     - .rp-statsbar background/blur/border-top -> result-pages-addon-v4.css §03
================================================================ */

.evt-month-tabs {
  display: flex;
  flex-wrap: wrap;
}

.evt-month-tab {
  flex: 1;
  min-width: 140px;
  padding: 14px 18px;
  text-align: center;
  text-decoration: none;
  border-right: 1px solid rgba(246,238,39,.08);
  transition: background .2s, color .2s;
}
.evt-month-tab:last-child { border-right: none; }
.evt-month-tab:hover { background: rgba(89,45,140,.3); }

.evt-month-tab-label {
  display: block;
  font-family: var(--ff-h);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 2px;
}
.evt-month-tab-count {
  display: block;
  font-family: var(--ff-h);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.evt-month-tab-sub {
  display: block;
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-top: 1px;
}

/* "All Events" catch-all — visually distinct via the yellow accent already
   used for the events-page eyebrow/border-top elsewhere on this hero */
.evt-month-tab--all {
  background: rgba(246,238,39,.08);
}
.evt-month-tab--all .evt-month-tab-label,
.evt-month-tab--all .evt-month-tab-count { color: var(--ye); }
.evt-month-tab--all:hover { background: rgba(246,238,39,.16); }

@media (max-width: 767px) {
  .evt-month-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .evt-month-tab  { min-width: 110px; }
}


/* ================================================================
   22. MONTH GROUP LIST (.evt-month-group / .evt-row)
   ---------------------------------------------------------------
   Chronological, month-grouped events list — used on the events
   listing page in place of the .evcard grid-card pattern. Events
   are primarily a "when" axis rather than a "where" axis, so a
   grouped list communicates that better than a grid.

   Two row-card variants driven by BLN_LANDING_PAGE
   (itrvl_events_results_v4):
     .evt-row--full      Paid/subscriber TSP listing — image,
                          category, description, price/free-entry.
     .evt-row--courtesy  Free/courtesy submission — deliberately
                          narrower: date, title, location only.

   Sits inside .rp-wrap (result-pages-addon-v4.css §04), below
   .rp-hero--events, in _events_results.php.
================================================================ */

.evt-month-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 16px;
}
.evt-month-group:first-child .evt-month-group-head { margin-top: 0; }

.evt-month-group-label {
  font-family: var(--ff-h);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dv);
  text-transform: uppercase;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.evt-month-group-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.evt-month-group-count {
  font-family: var(--ff-h);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mu);
  white-space: nowrap;
}

/* ── Row card — base (.evt-row--full defaults) ── */
.evt-row {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  transition: transform .2s, box-shadow .2s;
}
.evt-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35,15,66,.1);
}

.evt-row-date {
  flex-shrink: 0;
  width: 64px;
  background: var(--dv);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 6px;
}
.evt-row-day {
  font-family: var(--ff-h);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ye);
  line-height: 1;
  letter-spacing: -.02em;
}
.evt-row-mon {
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}

.evt-row-img {
  width: 100px;
  flex-shrink: 0;
  overflow: hidden;
}
.evt-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.evt-row:hover .evt-row-img img { transform: scale(1.06); }

.evt-row-body {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.evt-row-cat {
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--events);
  background: rgba(var(--events-rgb), .08);
  padding: 2px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 5px;
  align-self: flex-start;
}

.evt-row-title {
  font-family: var(--ff-h);
  font-size: .95rem;
  font-weight: 700;
  color: var(--dv);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}

.evt-row-desc {
  font-size: 12.5px;
  color: var(--mu);
  line-height: 1.55;
  font-weight: 300;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evt-row-meta {
  font-size: 11px;
  color: var(--mu);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.evt-row-meta i { color: var(--mv); font-size: 10px; margin-right: 2px; }

.evt-row-multiday {
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mu);
  background: var(--wh2);
  border: 1px solid var(--rule);
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
}

.evt-row-price {
  font-family: var(--ff-h);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--dv);
  white-space: nowrap;
}

.evt-row-arrow {
  flex-shrink: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: rgba(89,45,140,.2);
  transition: color .2s, transform .2s;
}
.evt-row:hover .evt-row-arrow { color: var(--mv); transform: translateX(3px); }

/* ── Courtesy variant — deliberately narrower, less information ──
   Business decision (paid listings get a richer card; free/courtesy
   submissions get a compact one) — not a fallback for missing data. */
.evt-row--courtesy {
  background: var(--wh2);
}
.evt-row--courtesy .evt-row-date {
  width: 52px;
  background: rgba(35,15,66,.55);
}
.evt-row--courtesy .evt-row-day { font-size: 1.15rem; }
.evt-row--courtesy .evt-row-body { padding: 9px 14px; }
.evt-row--courtesy .evt-row-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--mv);
}

@media (max-width: 575px) {
  .evt-row-img { display: none; }
}

/* ── Cancelled — stays visible and indexable (Google penalises pages that
   just disappear; visitors need to know a planned event was called off),
   just visually deprioritised. Not filtered out at the SP level — see
   itrvl_events_results_v4. Red matches the existing .cancelled text-colour
   utility in custom-v4.css §"Text colour shortcuts". ── */
.evt-row--cancelled {
  opacity: .65;
  filter: grayscale(.5);
}
.evt-row--cancelled:hover { opacity: .85; }

.evt-row-badge {
  display: inline-block;
  font-family: var(--ff-h);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 5px;
  margin-right: 5px;
}
.evt-row-badge--cancelled {
  color: #fff;
  background: red;
}


/* ================================================================
   23. SIDEBAR FILTERS (.evt-sidebar / .evt-sidebar-panel)
   ---------------------------------------------------------------
   Left sidebar on the events listing page — category pills (route-
   based, /events/{slug}/) and city pills (query-string ?city=).
   Reuses .fpill verbatim (result-pages-addon-v4.css §05) for the
   pills themselves; only the panel chrome is new.

   top:84px matches the sticky offset already established for
   .tsp-map-panel (clears .gt-nav height) — see custom-v4.css.
================================================================ */

.evt-sidebar {
  position: sticky;
  top: 84px;
}

.evt-sidebar-panel {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}

.evt-sidebar-head {
  background: var(--dv);
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ff-h);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
.evt-sidebar-head i { color: var(--ye); }

.evt-sidebar-body {
  padding: 14px;
}

.evt-sidebar-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.evt-sidebar-pills .fpill {
  width: 100%;
  justify-content: space-between;
  border-radius: 4px;
}

.evt-sidebar-count {
  font-size: 10px;
  font-weight: 800;
  background: rgba(89,45,140,.1);
  border-radius: 10px;
  padding: 1px 7px;
  color: var(--mv);
}
.evt-sidebar-pills .fpill:hover .evt-sidebar-count,
.evt-sidebar-pills .fpill.active .evt-sidebar-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}

@media (max-width: 991px) {
  .evt-sidebar { position: static; margin-bottom: 24px; }
}

/* City pills nest visually under their state — indent + slightly smaller,
   no accordion/collapse (current volume doesn't need it). */
.evt-sidebar-pill--city {
  margin-left: 14px;
  width: calc(100% - 14px);
  font-size: 9.5px;
  padding: 4px 11px;
  color: var(--mu);
  border-color: transparent;
  background: var(--wh2);
}
.evt-sidebar-pill--city:hover,
.evt-sidebar-pill--city.active {
  background: var(--mv);
  color: #fff;
}
