.event-popup,
.event-popup-preview {
  --popup-edge: 24px;
  --popup-footer-height: 62px;
  --popup-available-image-height: calc(100dvh - 2 * var(--popup-edge) - var(--popup-footer-height));
  background: #fff;
  color: var(--brand-ink);
}
.event-popup {
  width: min(480px, calc(100vw - 2 * var(--popup-edge)), max(290px, calc(.8 * var(--popup-available-image-height))));
  max-width: none;
  max-height: calc(100dvh - 2 * var(--popup-edge));
  inset: 0 clamp(24px, 5vw, 100px) 0 auto;
  margin: auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 65px rgb(12 24 23 / 20%);
  overflow: hidden;
  container: event-popup / inline-size;
}
.event-popup[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.event-popup-panels { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.event-popup::backdrop { background: rgb(17 25 25 / 40%); }
html:has(.event-popup[open]) { overflow: hidden; }
.event-popup-content { container-type: inline-size; display: block; color: inherit; text-decoration: none; }
.event-popup-content:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.event-popup-visual {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #1e302c;
  color: #fff;
}
.event-popup-image {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: cover;
  z-index: -2;
}
.event-popup-visual[data-image-layout="photo"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgb(12 23 23 / 90%) 0%, rgb(12 23 23 / 42%) 23%, transparent 50%),
              linear-gradient(180deg, rgb(12 23 23 / 36%), transparent 20%);
}
.event-popup-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  position: absolute;
  inset: 30px 76px auto 30px;
}
.event-popup-date { margin: 0; font: 500 1rem / 1.45 var(--font-sans); letter-spacing: -.025em; }
.event-popup-signature { flex: none; font: 400 .75rem / 1.5 var(--font-serif); letter-spacing: .04em; }
.event-popup-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: absolute;
  inset: auto 0 0;
  padding: 70px 30px 30px;
}
.event-popup-kicker { margin: 0 0 10px; font: 400 .9rem / 1.5 var(--font-sans); }
.event-popup-title {
  margin: 0;
  color: inherit;
  font: 500 clamp(1.7rem, 3.6vw, 2.9rem) / 1.28 var(--font-serif);
  letter-spacing: -.055em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.event-popup-discover {
  align-self: flex-start;
  margin-top: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font: 400 .8125rem / 1.5 var(--font-sans);
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) {
  display: flex;
  flex-direction: column;
  aspect-ratio: auto;
  min-height: min(125cqi, var(--popup-available-image-height));
  background: #f4f3ee;
  color: #18382f;
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo])::before { content: none; }
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-topline {
  position: static;
  min-height: 72px;
  box-sizing: border-box;
  padding: 25px 76px 18px 30px;
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-image {
  position: static;
  height: auto;
  z-index: 0;
  flex: none;
  max-height: min(36dvh, 300px);
  object-fit: contain;
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-copy {
  position: static;
  flex: 1;
  padding: 23px 30px 28px;
  justify-content: center;
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-title {
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  max-width: 100%;
  text-wrap: balance;
}
.event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-discover { margin-top: 14px; }
.event-popup-close {
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 3;
  inset: 18px 18px auto auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #24352f;
  font: 300 25px / 1 var(--font-sans);
  cursor: pointer;
}
.event-popup-close:hover { background: #e9ede7; }
.event-popup-close:focus-visible { outline: 2px solid #24352f; outline-offset: -5px; }
.event-popup-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  box-sizing: border-box;
  min-height: var(--popup-footer-height);
  padding-inline: 22px;
  background: #fff;
}
.event-popup-today {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font: 400 .8125rem / 1.5 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
.event-popup-today input { width: 17px; height: 17px; margin: 0; accent-color: var(--green-ink); cursor: pointer; }
.event-popup-controls { display: flex; align-items: center; max-width: 100%; margin-inline-start: auto; }
.event-popup-rotation {
  display: grid; place-items: center; flex: 0 0 32px; height: 44px;
  border: 0; padding: 0; background: none; color: #435e4e; cursor: pointer;
}
.event-popup-rotation::before {
  content: ""; width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor;
}
.event-popup-rotation[data-playing="true"]::before {
  width: 7px; height: 10px; box-sizing: border-box; border: solid currentColor; border-width: 0 2px;
}
.event-popup-rotation:focus-visible { outline: 1px solid currentColor; outline-offset: -3px; }
.event-popup-navigation { min-width: 0; display: flex; align-items: center; gap: 0; }
.event-popup-navigation button { display: grid; place-items: center; width: 18px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.event-popup-navigation [data-event-slide] span { width: 6px; height: 6px; border-radius: 50%; background: #d2d5cf; transition: background-color .15s; }
.event-popup-navigation [data-event-slide][aria-current="true"] span { background: #435e4e; }
.event-popup-navigation [data-event-slide]:hover span { background: #81927d; }
.event-popup-navigation button:focus-visible { outline: 1px solid #435e4e; outline-offset: -3px; }
.event-popup-navigation [data-event-step] {
  width: auto; min-width: 44px; padding-inline: 5px;
  font: 500 .875rem / 1.4 var(--font-sans); color: #264e3d; white-space: nowrap;
}
.event-popup-navigation [data-event-step]:hover { background: #f1f4ef; }
.event-popup-count { min-width: 48px; text-align: center; white-space: nowrap; font: 400 .875rem / 1.4 var(--font-sans); font-variant-numeric: tabular-nums; color: #40564a; }
.event-popup-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.event-popup-visual[data-image-layout="poster"] { aspect-ratio: auto; }
.event-popup-visual[data-image-layout="poster"] .event-popup-image { position: static; height: auto; max-height: var(--popup-available-image-height); object-fit: contain; }
.event-popup-visual[data-image-layout="poster"] :is(.event-popup-copy, .event-popup-topline) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.event-popup-visual[data-image-layout="poster"][data-managed-program] { background: #fff; color: #18382f; }
.event-popup-visual[data-image-layout="poster"][data-managed-program] .event-popup-image { max-height: max(120px, calc(var(--popup-available-image-height) - 120px)); }
.event-popup-visual[data-image-layout="poster"][data-managed-program] .event-popup-copy {
  position: static; width: auto; height: auto; padding: 16px 22px;
  overflow: visible; clip-path: none; white-space: normal;
}
.event-popup-visual[data-managed-program] .event-popup-title { font-size: clamp(1.25rem, 3vw, 1.65rem); }
.event-popup-visual[data-managed-program] .event-popup-discover { margin-top: 8px; }
.event-popup-visual[data-image-layout="text"] .event-popup-copy { inset: 0; }
.event-popup [hidden] { display: none; }
.event-popup-preview { max-width: 480px; }
.event-popup-preview .temple-preview-affordance { margin-top: 10px; }
.hero-visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.hero-visit-actions button { min-height: 36px; }
@media (max-width: 700px) {
  .event-popup { --popup-edge: 14px; inset: 0; margin: auto; }
  .event-popup-topline { inset: 23px 64px auto 24px; }
  .event-popup-signature { display: none; }
  .event-popup-copy { padding: 60px 24px 25px; }
  .event-popup-close { inset: 14px 14px auto auto; }
  .event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-topline { padding: 22px 64px 16px 24px; min-height: 65px; }
  .event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-copy { padding: 21px 24px 24px; }
  .event-popup-footer { padding-inline: 18px; }
}
@media (max-width: 450px) {
  .event-popup:has([data-event-step]) { --popup-footer-height: 90px; }
}
@container event-popup (max-width: 375px) {
  .event-popup-footer { min-height: 44px; }
  .event-popup-controls:has([data-event-step]) { width: 100%; border-top: 1px solid #e0e5df; justify-content: space-between; }
}
@media (max-height: 550px) {
  .event-popup {
    --popup-edge: 10px;
    width: min(440px, calc(100% - 2 * var(--popup-edge)));
    inset: 0;
    margin: auto;
  }
  .event-popup-visual:is([data-image-layout="text"], [data-image-layout="photo"]:not([data-photo-shape="landscape"], [data-archive-photo])) {
    aspect-ratio: auto;
    min-height: min(var(--popup-available-image-height), 285px);
  }
  .event-popup-visual:is([data-image-layout="text"], [data-image-layout="photo"]:not([data-photo-shape="landscape"], [data-archive-photo])) .event-popup-copy {
    position: relative;
    min-height: inherit;
    padding: 62px 20px 18px;
  }
  .event-popup-visual[data-image-layout="photo"]:is([data-photo-shape="landscape"], [data-archive-photo]) .event-popup-copy {
    padding-block: 14px 16px;
  }
}
@media (prefers-reduced-motion: reduce) { .event-popup-navigation [data-event-slide] span { transition: none; } }

.event-popup-subtitle { display: block; margin-top: 8px; font-size: .52em; line-height: 1.5; letter-spacing: -.025em; }
.event-popup-title > span:first-child { display: block; }

.event-popup-context { margin: 12px 0 0; font: 400 .875rem / 1.6 var(--font-sans); opacity: .88; overflow-wrap: anywhere; word-break: keep-all; white-space: pre-line; }

.event-popup-caption {
  margin: 0; padding: 8px clamp(20px, 6cqi, 30px) 0;
  font: 400 .8125rem / 1.5 var(--font-sans);
  color: #4c5c52; overflow-wrap: anywhere;
}
