/*
 * Event page sections that the static event design (event-details-pdd2026.css)
 * did not have: speaker line, quote, recap (takeaways, themes, why it matters,
 * learn more), speakers, "Propose a Monthly Talk". Built from the same tokens
 * and component patterns (mist panels, cyan rail, pill chips); orange stays
 * reserved for the primary call to action.
 */

/* Events archive: source filter row under each list's heading (the Upcoming /
   Past switch is in the hero). */
.event-switch.source-filter {
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
}

/* Filter pills, as in Events.dc.html. */
.event-switch.source-filter a {
  display: inline-flex;
  align-items: center;
  min-height: var(--ds-button-md);
  padding: 0 18px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--ink-strong);
  font-family: var(--font-ui);
  font-size: var(--text-ui-sm);
  font-weight: 700;
  transition: border-color .15s ease, color .15s ease;
}

.event-switch.source-filter a:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.event-switch.source-filter a.current {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

/* Past list: topic (event type) row under the source pills, smaller and
   lighter, the chosen one in soft purple (as on the News & Media page). */
.event-switch.source-filter:has(+ .ev-topics) {
  margin-bottom: 12px;
}

.event-switch.source-filter.ev-topics {
  gap: 6px;
}

.event-switch.source-filter.ev-topics a {
  min-height: var(--ds-button-sm);
  padding: 0 14px;
  border-color: var(--line-soft);
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: var(--text-ui-xs);
}

.event-switch.source-filter.ev-topics a:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.event-switch.source-filter.ev-topics a.current {
  border-color: var(--purple);
  background: var(--purple-wash-hover);
  color: var(--purple);
}

/* "Slides & recordings": a toggle at the end of the topic row, set apart by its icon and a gap. */
.event-switch.source-filter.ev-topics a.ev-media-toggle {
  gap: 6px;
  margin-left: 10px;
}

.ev-media-toggle svg {
  width: 16px;
  height: 16px;
}

.event-switch.source-filter.ev-topics a.ev-media-toggle:first-child {
  margin-left: 0;
}

/* Tablets: the types row as on phones, one row that scrolls sideways under a fade at the right edge (UI/UX review:
   it wrapped, one pill alone on a second row). components.css styles it the same way on phones. */
@media (min-width: 768px) and (max-width: 1180px) {
  main .event-switch.source-filter.ev-topics {
    flex-wrap: nowrap;
    margin-inline: -21px;
    padding: 2px 48px 2px 21px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 21px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  }

  main .event-switch.source-filter.ev-topics::-webkit-scrollbar {
    display: none;
  }

  main .event-switch.source-filter.ev-topics a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .event-switch.source-filter a {
    padding: 0 16px;
    font-size: var(--text-ui-xs);
  }

  .event-switch.source-filter.ev-topics a {
    padding: 0 14px;
  }
}

/* event-details-pdd2026.css positions the lightbox's ".next" arrow with a
   bare .next rule, which also shifts the pager's "Next event" link up by half
   its height. Undo it for the pager only. */
.event-pager .pager-link.next {
  transform: none;
}

/* Hero: who is speaking */
.detail .event-people {
  margin-top: 4px;
  color: var(--on-dark);
  font-size: var(--text-base);
}

.detail .event-people b {
  color: #fff;
}

/* Story column: several labelled blocks */
.event-block + .event-block {
  margin-top: 38px;
}

.event-block h2 {
  margin-top: 7px;
}

.event-rich > :first-child {
  margin-top: 0;
}

.event-rich p,
.event-rich li {
  color: var(--muted);
}

.event-rich ul {
  margin: 12px 0;
  padding-left: 1.2em;
}

.event-rich li {
  margin: 6px 0;
}

.event-rich strong {
  color: var(--purple-deep);
}

/* Featured image in the story column (fills the space beside the info panel).
   Capped in height so portrait posters stay compact. */
.event-feature-image {
  margin: 32px 0 0;
}

.event-feature-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Highlighted quote */
.event-quote {
  margin: 34px 0;
  padding: 22px 26px;
  border-left: 7px solid var(--cyan);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--mist);
}

.event-quote p {
  margin: 0;
  color: var(--purple-deep);
  font-size: var(--text-lg);
  font-style: italic;
  font-weight: 700;
  line-height: 1.4;
}

.event-quote cite {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 700;
}

/* Recap: takeaways, themes, why it matters, learn more */
.event-recap .wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.event-recap .wrap > :only-child {
  grid-column: 1 / -1;
}

.event-card-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--cyan);
  border-radius: var(--radius-lg);
  background: #fff;
}

.event-card-panel h2,
.event-section-title {
  margin: 7px 0 14px;
  color: var(--purple-deep);
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
}

.event-card-panel ul {
  margin: 0;
  padding-left: 1.2em;
}

.event-card-panel ul + h2 {
  margin-top: 26px;
}

.event-card-panel + .event-card-panel {
  margin-top: 24px;
}

.event-card-panel li {
  margin: 8px 0;
  color: var(--muted);
}

.event-card-panel li::marker {
  color: var(--cyan-deep);
}

.event-card-panel.is-dark {
  border: 0;
  background: var(--purple-deep);
  color: #fff;
}

.event-card-panel.is-dark h2,
.event-card-panel.is-dark .eyebrow {
  color: #fff;
}

.event-card-panel.is-dark p {
  color: var(--on-dark);
}

.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theme-chips li {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: 700;
}

.event-card-panel .theme-chips li::marker {
  content: none;
}

/* Speakers */
.event-speakers {
  background: var(--mist);
}

.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  align-items: start; /* An expanded card grows alone; its neighbour keeps its height. */
  margin-top: 8px;
}

.speaker-grid > .speaker-card {
  /* Same default height for every card: the tallest collapsed card, measured
     by event-speakers.js. */
  min-height: var(--speaker-card-height, auto);
}

.speaker-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.speaker-card img {
  align-self: start;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-round);
  object-fit: cover;
  object-position: center top; /* An upright portrait shows from the top: the head is never cut. */
}

.speaker-card h3 {
  margin: 0;
  color: var(--purple-deep);
  font-size: var(--text-lead);
}

.speaker-role {
  display: block;
  margin-top: 3px;
  color: var(--purple);
  font-size: var(--text-sm);
  font-weight: 700;
}

.speaker-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--purple-deep);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.speaker-card .event-rich {
  margin-top: 10px;
  font-size: var(--text-md);
}

/* Card content as a column so "Connect on LinkedIn" lines up at the bottom
   of every card in a row. */
.speaker-card > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

/* Reuse the sidebar's initials avatar at the card's portrait size. */
.speaker-card .speaker-portrait-initials {
  --photo: 96px;
  grid-column: 1;
  align-self: start;
  margin-bottom: 0;
}

.speaker-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  color: var(--purple);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Long bios: collapsed to 4 lines by event-speakers.js, which cuts the text on
   a word with an ellipsis (no fade, to keep text contrast) and puts "Read more"
   at the end of the last line. .is-clamped only measures the 4-line height. */
.speaker-bio.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.speaker-bio.is-clamped > *,
.speaker-bio.is-collapsed > * {
  margin-bottom: 0;
}

.speaker-more {
  padding: 0;
  white-space: nowrap;
  border: 0;
  background: none;
  color: var(--purple);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.speaker-more:hover {
  color: var(--purple-deep);
}

.speaker-more:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.speaker-session {
  margin: 10px 0 0;
  color: var(--purple-deep);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
}

.speaker-session span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

/* Event partners: co-organizers and sponsors (one grid per group) */
.partner-group-title {
  margin: 26px 0 4px;
  color: var(--purple-deep);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.event-section-title + .partner-group-title {
  margin-top: 8px;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin-top: 8px;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--cyan);
  border-radius: var(--radius-lg);
  background: #fff;
}

/* Text links in the info panel. */
.info a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info a:hover {
  color: var(--purple-deep);
}

.sponsor-card,
.speaker-card {
  scroll-margin-top: calc(var(--nav-height) + 24px); /* clear the sticky header */
}

/* #speakers (the newsletter's "and N more speakers" link): clear the header and keep the section heading above in view. */
.speaker-grid {
  scroll-margin-top: calc(var(--nav-height) + 140px);
}

.sponsor-card:target,
.speaker-card:target {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.event-partners),
  html:has(.event-speakers) {
    scroll-behavior: smooth;
  }
}

/* Info panel with speakers: photos instead of the facts already in the hero
   chips. Columns fill the panel (auto-fill), so the wider single-column panel
   on tablets fits more per row instead of stretching the photos. */
.info-people-grid {
  --photo: 64px;
  --tile: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr));
  gap: 16px 12px;
  margin: 12px 0 4px;
  padding: 0;
  list-style: none;
}

.info-people--1 { --photo: 120px; --tile: 100%; }
.info-people--2 { --photo: 96px; --tile: 120px; }
.info-people--4 { --photo: 80px; --tile: 120px; }

.info-people-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--purple-deep);
  text-align: center;
  text-decoration: none;
}

.info-person-photo {
  display: grid;
  place-items: center;
  width: var(--photo);
  height: var(--photo);
  margin-bottom: 6px;
  border-radius: var(--radius-round);
  object-fit: cover;
  object-position: center top; /* An upright portrait shows from the top: the head is never cut. */
  background: var(--purple);
  color: #fff;
  font-size: calc(var(--photo) * .34);
  font-weight: 700;
  transition: box-shadow .15s;
}

.info-person-photo.is-more {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--purple);
}

.info-people-grid a:hover .info-person-photo {
  box-shadow: 0 0 0 3px var(--orange);
}

.info-people-grid .speaker-tag {
  margin: 0 0 2px;
}

/* A partner role's tag (Partner roles), e.g. "Gold sponsor": as wide as its text in the card. */
.sponsor-card .sponsor-tag {
  align-self: flex-start;
  width: fit-content;
}

.info-person-name {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
}

.info-people-grid a:hover .info-person-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-people--many .info-person-name {
  font-size: var(--text-xs);
}

/* Info panel: co-organizer and sponsor logos on white tiles (logos are made
   for light backgrounds), two per row in the panel, more on tablets. */
.info-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.info-logos a,
.info-logos li > span {
  display: grid;
  place-items: center;
  height: 64px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--purple-deep);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

/* White logos ("Light logo" on the organization). */
.info-logos .is-dark > a,
.info-logos .is-dark > span {
  border-color: var(--purple-deep);
  background: var(--purple-deep);
  color: #fff;
}

.info-logos a:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.info-logos img {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.info-person-role {
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.3;
}

.sponsor-logo {
  display: flex;
  align-items: center;
  height: 64px;
  margin-bottom: 14px;
}

.sponsor-logo.is-dark {
  width: fit-content;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--purple-deep);
}

.sponsor-logo img {
  max-width: 180px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sponsor-card .sponsor-name {
  margin: 0;
  color: var(--purple-deep);
  font-size: var(--text-lg);
}

.sponsor-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
}

.sponsor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
}

.sponsor-links a {
  color: var(--purple);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Agenda: a real table; stacked rows on phones */
.event-agenda {
  padding-top: 0;
}

.agenda-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: var(--text-md);
}

.agenda-table thead th {
  padding: 12px 16px;
  background: var(--purple-deep);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-align: left;
  text-transform: uppercase;
}

.agenda-table td,
.agenda-table tbody th {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.agenda-table td:first-child {
  width: 9.5rem;
  color: var(--purple);
  font-weight: 700;
  white-space: nowrap;
}

.agenda-table tbody th {
  color: var(--purple-deep);
  font-weight: 700;
}

.agenda-table td:last-child {
  width: 30%;
  color: var(--muted);
}

.agenda-table tbody tr:nth-child(even) {
  background: var(--mist);
}

.agenda-table tr.is-break th,
.agenda-table tr.is-break td {
  color: var(--muted);
  font-style: italic;
  font-weight: 600;
}

@media (max-width: 620px) {
  .agenda-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .agenda-table,
  .agenda-table tbody,
  .agenda-table tr,
  .agenda-table td,
  .agenda-table tbody th {
    display: block;
    width: 100%;
  }

  .agenda-table tr {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
  }

  .agenda-table tbody tr:first-child {
    border-top: 0;
  }

  .agenda-table td,
  .agenda-table tbody th {
    padding: 2px 0;
    border: 0;
  }

  .agenda-table td:first-child,
  .agenda-table td:last-child {
    width: auto;
  }

  .agenda-table td:empty {
    display: none;
  }
}

/* Gallery: justified rows on wider screens, swipe strip on phones; every
   picture at its own shape (single-event.php sets --ar = width / height on
   each item and groups the rows). In a row, each item grows in proportion to
   its --ar from a zero basis and keeps that aspect ratio, so all the items of
   the row get the same height and nothing is cropped. Spacers (--grow) keep a
   short row at the normal height, centred; a break item starts a new row. */
.event-gallery {
  background: var(--mist);
}

.mosaic {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.mosaic > li {
  min-width: 0;
  margin: 0;
}

.mosaic-item {
  flex: var(--ar) 1 0;
  aspect-ratio: var(--ar);
}

.mosaic-spacer {
  flex: var(--grow) 1 0;
}

.mosaic > .mosaic-break {
  flex-basis: 100%;
  height: 0;
  /* Outrank the list-item reset so rows have the same breathing room as columns. */
  margin: 20px 0 0;
}

.mosaic-item.is-extra {
  display: none;
}

.mosaic-tile {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--purple-deep);
  cursor: zoom-in;
}

.mosaic-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.mosaic-tile:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.mosaic-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(50, 16, 109, .74);
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 700;
}

.mosaic-count {
  display: none;
}

@media (max-width: 760px) {
  /* One strip of every image at its own shape: 300px tall, or less for a wide picture that
     reaches the width limit (86% of the strip, so the next one peeks in). */
  .mosaic {
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .mosaic::-webkit-scrollbar {
    display: none;
  }

  .mosaic-break,
  .mosaic-spacer {
    display: none;
  }

  .mosaic-item,
  .mosaic-item.is-extra {
    display: block;
    flex: 0 0 auto;
    width: min(calc(300px * var(--ar)), 86%);
    height: auto;
    aspect-ratio: var(--ar);
    scroll-snap-align: start;
  }

  /* A single image takes the whole width, at its own shape. */
  .mosaic.is-single .mosaic-item {
    width: 100%;
    height: auto;
    aspect-ratio: var(--ar);
  }

  .mosaic-more {
    display: none;
  }

  .mosaic-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 700;
  }

  .mosaic-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mosaic-dots i {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-round);
    background: var(--line);
  }

  .mosaic-dots i.is-current {
    background: var(--purple);
  }
}

/* Propose a Monthly Talk */
.propose-talk {
  padding: 0 0 72px;
}

.event-speakers + .propose-talk {
  padding-top: 0;
  background: var(--mist);
}

.propose-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border-left: 7px solid var(--cyan);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: #fff;
}

.propose-box b {
  display: block;
  color: var(--purple-deep);
  font-size: var(--text-lead);
}

.propose-box p {
  margin: 4px 0 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .event-recap .wrap {
    grid-template-columns: 1fr;
  }

  .speaker-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }

  .speaker-card img {
    width: 72px;
    height: 72px;
  }

  .speaker-card .speaker-portrait-initials {
    --photo: 72px;
  }

  .propose-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Phones: speakers two per row, so longer names ("Judge Mohammad Abdallah") wrap onto two lines at most. */
@media (max-width: 767px) {
  .info-people-grid {
    --tile: 120px;
  }
}
