/* Events Display Widget — GLOBAL / SHARED styles only.
   Upload to T4 as media item #1058328 */

/* ── Wrapper / grid / header ─────────────────────────────────────── */
.events-listing-wrap {
  --event-gold: #ffb300;
  --event-text: #111;
  --event-muted: #4f4f4f;
  --event-line: #ddd;
  max-width: 1100px;
  margin: 24px auto 36px;
}

.events-listing-wrap .events-grid {
  margin-top: 16px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols-desktop, 1), minmax(0, 1fr));
  gap: 0 28px;
}

.events-listing__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--event-line);
}

.events-listing-wrap--list .events-listing__header,
.events-listing-wrap--calendar .events-listing__header {
  margin-bottom: 0;
}

.events-listing__heading {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--event-text);
}

.events-listing__heading-spacer {
  display: block;
  flex: 1 1 auto;
  min-width: 1px;
}

.events-listing__actions {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  margin-left: auto;
}

.events-listing__more {
  display: inline-block;
  color: #444;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  white-space: nowrap;
}

.events-listing__more:hover,
.events-listing__more:focus-visible {
  color: #111;
  border-bottom-style: solid;
}

/* ── Filter bar ───────────────────────────────────────────────────── */
.events-filter-bar {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.events-filter-control {
  position: relative;
  display: flex;
  min-width: 0;
}

.events-filter-select {
  box-sizing: border-box;
  width: 145px;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font: 600 12px/32px Arial, sans-serif;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.events-filter-select:hover {
  border-color: #888;
}

.events-filter-select:focus {
  border-color: #111;
  outline: 2px solid rgba(255, 179, 0, 0.55);
  outline-offset: 1px;
}

.events-filter-clear {
  display: inline-block;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #555;
  font: 600 11px/20px Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.events-filter-clear:hover,
.events-filter-clear:focus-visible {
  color: #111;
}

.events-filter-empty {
  display: block;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--event-line);
  background: #f7f7f7;
  color: var(--event-muted);
  font-size: 14px;
}

/* ── Utility ──────────────────────────────────────────────────────── */
.events-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.events-listing-wrap [hidden] {
  display: none !important;
}

.events-empty {
  max-width: 1100px;
  margin: 16px auto;
  padding: 14px 16px;
  border: 1px solid var(--event-line);
  background: #f7f7f7;
  color: var(--event-muted);
}

/* Link inside the "no events" empty-state card's message
   (.event-card__summary, from buildEmptyStateCardHtml() in 6246) -- was
   unstyled and fell back to the browser's default blue/underline. */
.event-card__summary a {
  color: #212121;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--event-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.event-card__summary a:hover,
.event-card__summary a:focus-visible {
  color: #000;
  text-decoration-thickness: 3px;
}

.events-list-cards {
  display: block;
}

/* ── Shared date-card primitive (used by card/vertical's no-image state
     and documented as the shared component in Display Component Style
     descriptions.md, section "Calendar layout") ─────────────────────── */
.event-datebox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 66px;
  min-height: 66px;
  background: #f7f7f7;
  border-top: 6px solid var(--event-gold);
  line-height: 1;
}

.event-datebox__day {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 27px;
  font-weight: 700;
  color: #111;
}

.event-datebox__month {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #555;
}

/* ── Base .event-card family — used ONLY by the aggregator's own
     "no events" empty-state card (buildEmptyStateCardHtml() in 6246).
     None of the four card/* layouts use these unscoped classes anymore —
     each has its own self-scoped equivalent. Do not treat this as the
     "default" card design; it is scoped to the empty state only by virtue
     of nothing else referencing it.

     NOTE: matches the treatment that was actually winning in production
     (writeEventsStyles()'s version, which loaded after this file and after
     the older plain 220px/1fr rules that used to live here — so this is
     what site visitors have actually been seeing, not a new look). ───── */
.event-card {
  background: #fff;
  border-top: 1px solid #e6e6e6;
  color: var(--event-text);
}

.event-card:first-child {
  border-top: 0;
}

.event-card__link,
.event-card__link:visited {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  column-gap: 40px;
  align-items: center;
  min-height: 188px;
  padding: 18px 14px;
  color: var(--event-text) !important;
  text-decoration: none;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.event-card__link:hover,
.event-card__link:focus-visible {
  background: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.event-card__link:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.event-card__media {
  position: relative;
  align-self: center;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: #f7f7f7;
  overflow: hidden;
}

.event-card__media img,
.event-card__image {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  background: #222;
  transition: transform 0.35s ease;
}

.event-card__link:hover .event-card__media img,
.event-card__link:focus-visible .event-card__media img,
.event-card__link:hover .event-card__image,
.event-card__link:focus-visible .event-card__image {
  transform: scale(1.035);
}

.event-card__content {
  min-width: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: 0;
}

.event-card__title {
  margin: 0;
  color: var(--event-text);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}

.event-card__summary {
  margin: 0;
  color: var(--event-text);
  font-size: 15px;
  line-height: 23px;
  font-weight: 400;
  padding-top: 0 !important;
}

.event-card--empty {
  cursor: default;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(var(--cols-tablet, 1), minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: repeat(var(--cols-mobile, 1), minmax(0, 1fr));
  }

  .event-card__link {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 12px;
  }

  .event-card__title {
    font-size: 21px;
    line-height: 27px;
  }

  .event-card__media {
    max-width: 520px;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}
