/* ============================================================
   SOLENIC — EVENTS
   The Upcoming Events list and the event photo popup. Moved out of home.css so the
   homepage panel and the standalone /events/ page share one copy; the markup comes
   from api/_lib/render.js either way. On the homepage this file is linked AFTER
   home.css, which is where these rules used to sit, so the cascade is unchanged.
   The Events page wraps its content in .panel-upcoming-events for the same selectors.
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   UPCOMING EVENTS — dedicated layout (2026-08-24)
   Not the shared News/Publications teaser (.feed-teaser): that component
   hides .feed-excerpt and .feed-dest outright, because they measured as
   overflowing a one-viewport panel deck. This panel needs a real title,
   description and a visible URL per entry, so it gets its own compact
   scale instead. Scoped to .panel-upcoming-events only — none of this
   reaches solenic.feed.css or the News/Publications panels.
   ═══════════════════════════════════════════════════════════ */
.panel-upcoming-events .panel-content.events-teaser {
  max-width: none;
  width: 100%;
  padding: 0 var(--grid-inset, clamp(24px, 5vw, 64px));
}
.panel-upcoming-events .events-masthead {
  padding: 0 0 clamp(14px, 2vh, 24px);
}
.panel-upcoming-events .events-masthead h1 {
  font-family: var(--sol-sans);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--c-ink-strong);
  margin: 0 0 0.5rem;
}
.panel-upcoming-events .events-lede {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(var(--c-ink-rgb), 0.82);
  max-width: 58ch;
  margin: 0;
}
.panel-upcoming-events .events-list {
  display: flex;
  flex-direction: column;
}
.panel-upcoming-events .events-empty {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(var(--c-ink-rgb), 0.68);
  margin: 0;
  padding: clamp(10px, 1.4vh, 16px) 0;
}
.panel-upcoming-events .events-subhead {
  font-family: var(--sol-sans);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--c-ink-strong);
  margin: clamp(20px, 3vh, 32px) 0 0;
  padding-top: clamp(14px, 2vh, 20px);
  border-top: 1px solid rgba(var(--c-ink-rgb), 0.14);
}
.panel-upcoming-events .event-item {
  padding: clamp(10px, 1.4vh, 16px) 0;
  border-bottom: 1px solid rgba(var(--c-ink-rgb), 0.09);
}
.panel-upcoming-events .event-item:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-upcoming-events .event-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--c-ink-rgb), 0.68);
  display: flex; flex-wrap: wrap; gap: 0.4em 0.75em;
  margin: 0 0 0.5rem;
}
.panel-upcoming-events .event-meta .sep { color: rgba(var(--c-ink-rgb), 0.3); }
.panel-upcoming-events .event-title {
  font-family: var(--sol-sans);
  /* 2px above .event-desc's own 0.9375rem — this panel has no Text Size
     control (it's outside the shared feed component), so this stays a
     fixed relationship rather than one tied to --feed-scale. */
  font-size: calc(0.9375rem + 2px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--c-ink-strong);
  margin: 0 0 0.4rem;
}
.panel-upcoming-events .event-desc {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(var(--c-ink-rgb), 0.82);
  max-width: 68ch;
  margin: 0 0 0.5rem;
}
.panel-upcoming-events .event-url {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--c-accent);
  text-decoration: none;
  word-break: break-all;
}
.panel-upcoming-events .event-url:hover { text-decoration: underline; }
.panel-upcoming-events .event-url:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.panel-upcoming-events .event-photos-link {
  display: flex;
  width: fit-content;
  align-items: center;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--c-accent);
  cursor: pointer;
}
.panel-upcoming-events .event-photos-link:hover { text-decoration: underline; }
.panel-upcoming-events .event-photos-link:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENT PHOTOS — popup image carousel (Keen Slider, loaded from a CDN in
   index.html's <head> — the one exception to "no dependencies" here, since
   it's a plain <script>, not a package). Each .event-photos-modal is a
   sibling of the panel deck, not inside it, so this isn't scoped to
   .panel-upcoming-events even though its trigger lives there. Background is
   fixed black and the dots use the accent color, both per the client's ask.
   See initEventPhotos in home.js.
   ═══════════════════════════════════════════════════════════════════════════ */
.event-photos-modal {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}
.event-photos-modal[hidden] { display: none; }
body.event-photos-lock { overflow: hidden; }
.event-photos-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.86);
  cursor: pointer;
}
.event-photos-dialog {
  position: relative;
  /* A flat 1400px (the previous value) is a hard ceiling: on a wide or
     ultrawide monitor it stops growing and reads as small relative to the
     rest of the screen, which is exactly what was reported, 2026-09-27.
     92vw keeps it scaling with the window instead of plateauing; 1800px
     is a much higher ceiling than before, mainly to stop it getting
     absurd on a 4K+ display, not a size anyone should normally hit. */
  width: min(1800px, 92vw);
  /* A real height, not max-height off content — on request 2026-09-27,
     after Chrome and Safari were measured rendering this at visibly
     different sizes for the same window. That was the old max-height +
     aspect-ratio-driven slide fighting itself: with no fixed height, the
     box's real size came from the slide's intrinsic aspect-ratio math,
     which the two engines were resolving differently inside a flex
     parent. Pinning height to 90vh removes that source entirely — every
     engine just fills 90% of the viewport, full stop. */
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-ground-deep);
  border: 1px solid rgba(var(--c-accent-rgb), 0.28);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
}
.event-photos-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--c-accent-rgb), 0.32);
  background: rgba(10, 8, 6, 0.7);
  color: var(--c-ink-strong);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.event-photos-close:hover,
.event-photos-close:focus-visible { border-color: var(--c-accent); color: var(--c-accent); }
/* Same technique as .panel-tech .tc-frame/.tc-thumbs: the dialog is a fixed-
   height flex column, the slider takes the flexible remainder (min-height:0
   is what actually lets a flex child shrink below its content size — Keen
   Slider's own slides would otherwise hold the row open at their intrinsic
   height), and the dots row is flex:0 0 auto, so it always has its own
   reserved space and is never pushed below the fold or fought over with the
   image for room, at any window width or height. */
.event-photos-slider {
  background: var(--c-ground-deep);
  flex: 1 1 auto;
  min-height: 0;
}
.event-photos-slider .keen-slider__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  background: var(--c-ground-deep);
}
.event-photos-slider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.event-photos-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
  background: var(--c-ground-deep);
  flex: 0 0 auto;
}
.event-photos-dots[hidden] { display: none; }
.event-photos-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(var(--c-accent-rgb), 0.35);
  cursor: pointer;
}
.event-photos-dot.is-active { background: var(--c-accent); }
