/* v1.2: Theme typography mode uses semantic h2–h6/p tags and inherits BeTheme/BeBuilder fonts. */
.hae-events-list,.hae-next-event{--hae-accent:#52634b;--hae-dark:#26372c;--hae-cream:#f5f2e9;--hae-text:#29352e;--hae-muted:#657067;--hae-border:#d6d9d0;--hae-button_text:#fff;--hae-radius:0px;font-family:inherit;color:var(--hae-text)}
.hae-events-list *,.hae-next-event *{box-sizing:border-box}
.hae-event-card{display:grid;grid-template-columns:92px minmax(0,1fr);gap:clamp(18px,3vw,34px);padding:30px 0;border-bottom:1px solid var(--hae-border);align-items:start}
.hae-event-card:first-child{padding-top:0}.hae-event-card:last-child{border-bottom:0}
.hae-date-block{text-align:center;align-self:start;background:var(--hae-cream);border:1px solid var(--hae-border);border-top:4px solid var(--hae-accent);overflow:hidden;border-radius:var(--hae-radius)}
.hae-month{display:block;padding:10px 4px 2px;color:var(--hae-accent);font-size:12px;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
.hae-day{display:block;padding:0 5px 11px;color:var(--hae-dark);font-size:42px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums}
.hae-event-body{display:grid;grid-template-columns:minmax(0,220px) minmax(0,1fr);gap:clamp(16px,2vw,28px);align-items:start}.hae-event-body:not(:has(.hae-event-image)){display:block}
.hae-event-image img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.hae-event-title{margin-top:0;margin-bottom:10px}.hae-event-time,.hae-event-location{margin-top:0;margin-bottom:8px}.hae-event-excerpt{margin:10px 0 18px}
.hae-event-link{display:inline-flex;align-items:center;gap:12px;background:var(--hae-accent);color:var(--hae-button_text)!important;text-decoration:none!important;border-radius:var(--hae-radius);border:1px solid var(--hae-accent);padding:12px 18px;transition:background .2s,color .2s}
.hae-event-link:hover,.hae-event-link:focus-visible{background:var(--hae-dark);border-color:var(--hae-dark);color:#fff!important}
.hae-section-heading{margin-top:0;margin-bottom:20px;padding-bottom:12px;border-bottom:2px solid var(--hae-accent)}
.hae-next-event{background:var(--hae-cream);padding:clamp(20px,3vw,32px)}.hae-compact{grid-template-columns:72px minmax(0,1fr);gap:18px;padding:0;border:0}.hae-compact .hae-event-body{display:block}.hae-compact .hae-date-block{background:#fff}.hae-compact .hae-day{font-size:32px}.hae-compact .hae-event-excerpt{margin:10px 0 15px}.hae-no-events{padding:15px 0}
/* Legacy mode retains the previous plugin-specific type treatment. */
.hae-legacy-type .hae-event-title{font-family:inherit;color:var(--hae-dark);font-size:clamp(22px,2.2vw,30px);line-height:1.16;font-weight:800}
.hae-legacy-type .hae-event-time{font-size:14px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--hae-accent)}
.hae-legacy-type .hae-event-location{font-size:14px;color:var(--hae-muted);line-height:1.5}.hae-legacy-type .hae-event-excerpt{font-size:15px;line-height:1.65}
.hae-legacy-type .hae-event-link{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.hae-legacy-type .hae-section-heading{font-size:13px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;color:var(--hae-accent)}.hae-legacy-type .hae-compact .hae-event-title{font-size:22px}
@media(max-width:700px){.hae-event-card{grid-template-columns:68px minmax(0,1fr);gap:14px;padding:22px 0}.hae-event-body{display:block}.hae-event-image{margin-bottom:16px}.hae-day{font-size:31px}.hae-month{font-size:10px}.hae-next-event{padding:20px}}
@media(prefers-reduced-motion:reduce){.hae-event-link{transition:none}}

.hae-layout-cards:not(.hae-next-event) .hae-event-card{border:1px solid var(--hae-border);padding:24px;margin-bottom:18px;border-radius:var(--hae-radius)}
.hae-next-event{border-radius:var(--hae-radius)}
/* Theme typography mode: use the active BeTheme font and heading/paragraph styles. */
.hae-theme-type .hae-event-title,.hae-theme-type .hae-section-heading,.hae-theme-type .hae-event-time,.hae-theme-type .hae-event-location,.hae-theme-type .hae-event-excerpt{font-family:inherit}
.hae-theme-type .hae-event-title,.hae-theme-type .hae-section-heading{color:inherit}
.hae-theme-type .hae-event-excerpt,.hae-theme-type .hae-event-location{color:inherit}

/* v2.7: Explicit block backgrounds prevent theme color bleed-through. */
.hae-events-list{background:var(--hae-block-bg-list,#ffffff)}
.hae-next-event{background:var(--hae-block-bg-next,var(--hae-cream))}

/* v2.8: Homepage panel and date tiles are independent. */
.hae-events-list .hae-date-block,.hae-next-event .hae-date-block,.hae-next-event .hae-compact .hae-date-block{background:var(--hae-date-bg,var(--hae-cream,#f5f2e9))}


/* v3.0.6: One authoritative responsive layout. Button is a direct child of body. */
.hae-events-list{container:hae-schedule / inline-size;background:var(--hae-block-bg-list,#fff)}
.hae-next-event{container:hae-next / inline-size;background:var(--hae-block-bg-next,var(--hae-cream))}
.hae-events-list .hae-date-block,.hae-next-event .hae-date-block{background:var(--hae-date-bg,var(--hae-cream))}
.hae-events-list .hae-event-card{display:grid;grid-template-columns:92px minmax(0,1fr);gap:24px;align-items:center}
.hae-events-list .hae-event-body{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:24px;min-width:0}
.hae-events-list .hae-event-body:has(.hae-event-image){grid-template-columns:minmax(120px,180px) minmax(0,1fr) max-content}
.hae-events-list .hae-event-image{grid-column:1;grid-row:1;overflow:hidden;border-radius:var(--hae-radius)}
.hae-events-list .hae-event-body:has(.hae-event-image) .hae-event-copy{grid-column:2}
.hae-events-list .hae-event-body:has(.hae-event-image) > .hae-event-link{grid-column:3}
.hae-events-list .hae-event-body:not(:has(.hae-event-image)) .hae-event-copy{grid-column:1}
.hae-events-list .hae-event-body:not(:has(.hae-event-image)) > .hae-event-link{grid-column:2}
.hae-events-list .hae-event-copy{display:block;min-width:0}
.hae-events-list .hae-event-body > .hae-event-link{grid-row:1;justify-self:end;align-self:center;white-space:normal;max-width:190px;text-align:center}
.hae-events-list .hae-event-excerpt{margin-bottom:0}
.hae-event-image img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;object-position:center}
.hae-next-event .hae-event-body:has(.hae-event-image){display:grid;grid-template-columns:minmax(0,160px) minmax(0,1fr);gap:20px;align-items:center}
.hae-next-event .hae-event-body:has(.hae-event-image) .hae-event-copy{grid-column:2;grid-row:1}
.hae-next-event .hae-event-body:has(.hae-event-image) > .hae-event-link{grid-column:2;grid-row:2;justify-self:start}
.hae-next-event .hae-event-body:not(:has(.hae-event-image)) > .hae-event-link{margin-top:12px}
@container hae-schedule (max-width:760px){
 .hae-events-list .hae-event-card,
 .hae-events-list .hae-event-card:has(.hae-event-image){display:grid;grid-template-columns:minmax(0,88px) minmax(0,160px);grid-template-rows:auto auto;justify-content:center;align-items:stretch;gap:16px 12px;text-align:center}
 .hae-events-list .hae-event-card > .hae-date-block{grid-column:1;grid-row:1;width:88px;height:100%;align-self:stretch}
 .hae-events-list .hae-event-body,.hae-events-list .hae-event-body:has(.hae-event-image){display:contents}
 .hae-events-list .hae-event-image{grid-column:2;grid-row:1;width:160px;height:100%;min-height:0;position:relative;margin:0}
 .hae-events-list .hae-event-image img{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
 .hae-events-list .hae-event-body .hae-event-copy,
 .hae-events-list .hae-event-body:has(.hae-event-image) .hae-event-copy{grid-column:1/-1;grid-row:2;text-align:center;width:100%}
 .hae-events-list .hae-event-body > .hae-event-link,
 .hae-events-list .hae-event-body:has(.hae-event-image) > .hae-event-link{grid-column:1/-1;grid-row:3;justify-self:center;align-self:center;margin-top:0}
 .hae-events-list .hae-event-body:not(:has(.hae-event-image)) .hae-event-copy{grid-column:1/-1;grid-row:2}
}
@container hae-next (max-width:550px){
 .hae-next-event .hae-compact{display:grid;grid-template-columns:88px minmax(0,160px);grid-template-rows:auto auto auto;justify-content:center;align-items:stretch;gap:16px 12px;text-align:center}
 .hae-next-event .hae-compact > .hae-date-block{grid-column:1;grid-row:1;width:88px;height:100%}
 .hae-next-event .hae-compact .hae-event-body{display:contents}
 .hae-next-event .hae-event-image{grid-column:2;grid-row:1;position:relative;width:160px;height:100%;margin:0;overflow:hidden}
 .hae-next-event .hae-event-image img{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
 .hae-next-event .hae-event-body .hae-event-copy,.hae-next-event .hae-event-body:has(.hae-event-image) .hae-event-copy{grid-column:1/-1;grid-row:2;text-align:center}
 .hae-next-event .hae-event-body > .hae-event-link,.hae-next-event .hae-event-body:has(.hae-event-image) > .hae-event-link{grid-column:1/-1;grid-row:3;justify-self:center;margin-top:0}
}

/* v3.0.7: Wide next-event action is always beside the description.
   These selectors deliberately override earlier compact display:block rules. */
@container hae-next (min-width:551px) {
 .hae-next-event .hae-compact{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center}
 .hae-next-event .hae-compact > .hae-event-body,
 .hae-next-event .hae-compact > .hae-event-body:has(.hae-event-image) {
   display:grid;grid-template-columns:minmax(0,1fr) max-content;
   align-items:center;gap:20px;min-width:0;
 }
 .hae-next-event .hae-compact > .hae-event-body:has(.hae-event-image){
   grid-template-columns:minmax(110px,160px) minmax(0,1fr) max-content;
 }
 .hae-next-event .hae-compact .hae-event-image{grid-column:1;grid-row:1}
 .hae-next-event .hae-compact .hae-event-copy{grid-column:1;grid-row:1;min-width:0}
 .hae-next-event .hae-compact .hae-event-body:has(.hae-event-image) .hae-event-copy{grid-column:2;grid-row:1}
 .hae-next-event .hae-compact .hae-event-body > .hae-event-link,
 .hae-next-event .hae-compact .hae-event-body:has(.hae-event-image) > .hae-event-link{
   grid-column:-2 / -1;grid-row:1;justify-self:end;align-self:center;margin:0;max-width:190px;text-align:center;
 }
}

/* v3.0.8: Match the full event list to the wide Next Event layout.
   The action has its own column, beside the description, with or without
   a featured image. Mobile rules above remain unchanged. */
@container hae-schedule (min-width:761px) {
  .hae-events-list .hae-event-card {
    display:grid;
    grid-template-columns:92px minmax(0,1fr);
    gap:24px;
    align-items:center;
  }
  .hae-events-list .hae-event-card > .hae-event-body,
  .hae-events-list .hae-event-card > .hae-event-body:not(:has(.hae-event-image)) {
    display:grid;
    grid-template-columns:minmax(0,1fr) max-content;
    align-items:center;
    gap:20px;
    min-width:0;
  }
  .hae-events-list .hae-event-card > .hae-event-body:has(.hae-event-image) {
    grid-template-columns:minmax(110px,160px) minmax(0,1fr) max-content;
  }
  .hae-events-list .hae-event-card .hae-event-image {
    grid-column:1;
    grid-row:1;
  }
  .hae-events-list .hae-event-card .hae-event-copy {
    grid-column:1;
    grid-row:1;
    min-width:0;
  }
  .hae-events-list .hae-event-card .hae-event-body:has(.hae-event-image) .hae-event-copy {
    grid-column:2;
    grid-row:1;
  }
  .hae-events-list .hae-event-card .hae-event-body > .hae-event-link,
  .hae-events-list .hae-event-card .hae-event-body:has(.hae-event-image) > .hae-event-link {
    grid-column:-2 / -1;
    grid-row:1;
    justify-self:end;
    align-self:center;
    margin:0;
    max-width:190px;
    text-align:center;
  }
}

/* v3.0.9: Let the full schedule show the BeTheme section background.
   Only the schedule and individual cards are transparent; date tiles,
   featured images and the separately styled Next Event panel are unchanged. */
.hae-events-list,
.hae-events-list .hae-event-card,
.hae-events-list.hae-layout-cards .hae-event-card {
  background: transparent !important;
  background-color: transparent !important;
}

/* v3.1.1: v3.0.9 schedule stays transparent; only its event cards are editable. */
.hae-events-list .hae-event-card,
.hae-events-list.hae-layout-cards .hae-event-card {
  background:var(--hae-card-bg,transparent) !important;
  background-color:var(--hae-card-bg,transparent) !important;
}

/* v3.1.2: Editable card color and matching Next Event card presentation.
   Keep the outer full-schedule wrapper transparent; apply the color to cards only. */
.hae-events-list { background:transparent !important; background-color:transparent !important; }
.hae-events-list .hae-event-card,
.hae-events-list.hae-layout-cards .hae-event-card {
  background:var(--hae-card-bg,#ffffff) !important;
  background-color:var(--hae-card-bg,#ffffff) !important;
  border-radius:var(--hae-radius,8px);
  padding:20px;
  box-sizing:border-box;
}

/* v3.1.4: Full-length descriptions retain natural paragraph spacing. */
.hae-event-excerpt > :first-child{margin-top:0}
.hae-event-excerpt > :last-child{margin-bottom:0}
.hae-events-list .hae-event-excerpt,.hae-next-event .hae-event-excerpt{max-height:none;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset}

/* v3.1.7: Top-align wide-format featured photos with date and event title.
   Restrict to wide containers so the existing narrow/mobile layout is intact. */
@container hae-next (min-width:551px) {
  .hae-next-event .hae-compact {
    align-items:start;
  }
  .hae-next-event .hae-compact > .hae-date-block {
    align-self:start;
  }
  .hae-next-event .hae-compact > .hae-event-body:has(.hae-event-image) {
    align-items:start;
  }
  .hae-next-event .hae-compact .hae-event-image {
    align-self:start;
    margin-top:0;
  }
  .hae-next-event .hae-compact .hae-event-body:has(.hae-event-image) .hae-event-copy {
    align-self:start;
  }
}
@container hae-schedule (min-width:761px) {
  .hae-events-list .hae-event-card {
    align-items:start;
  }
  .hae-events-list .hae-event-card > .hae-event-body:has(.hae-event-image) {
    align-items:start;
  }
  .hae-events-list .hae-event-card .hae-event-image,
  .hae-events-list .hae-event-card .hae-event-body:has(.hae-event-image) .hae-event-copy {
    align-self:start;
    margin-top:0;
  }
}

/* v3.2.5: Full weekday and abbreviated month share the top date line. */
.hae-events-list .hae-event-card,
.hae-next-event .hae-compact {grid-template-columns: minmax(116px, max-content) minmax(0, 1fr);}
.hae-events-list .hae-date-block, .hae-next-event .hae-date-block {min-width:116px; width:100%;}
.hae-events-list .hae-month, .hae-next-event .hae-month {white-space:nowrap;letter-spacing:.035em;padding-inline:7px;font-size:11px;}
@media(max-width:700px){
 .hae-events-list .hae-event-card,.hae-next-event .hae-compact{grid-template-columns:116px minmax(0,1fr);}
}
/* Narrow card layouts with a thumbnail: preserve the date/photo arrangement. */
@media(max-width:550px){
 .hae-events-list .hae-event-card:has(.hae-event-image){grid-template-columns:116px minmax(0,160px);}
 .hae-events-list .hae-event-card > .hae-date-block,
 .hae-next-event .hae-compact > .hae-date-block {width:116px;max-width:100%;}
 .hae-next-event .hae-compact {grid-template-columns:116px minmax(0,160px);}
}
