.events-page {
  padding-top: 28px;
}

.event-feed {
  display: grid;
  gap: 32px;
}

.feed-status {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.event-feed-filter-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.event-feed-filter-block .event-date-from-bar {
  margin-bottom: 12px;
}

.event-search-pill {
  min-width: 0;
  max-width: 100%;
}

.event-search-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.event-date-from-bar {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.event-date-from-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--accent);
}

.event-date-from-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-date-from-value {
  color: var(--accent);
}

.event-date-from-clear {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--pill-radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

/* Use the header's inset hover highlight; clearing a filter is immediate. */
@media (hover: hover) {
  .event-date-from-clear::after {
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: var(--pill-hover);
    content: '';
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
  }

  .event-date-from-clear:hover::after {
    opacity: 1;
  }

  /* Keep its inset hover without the generic full-action hover gradient. */
  .event-date-from-clear.shuka-pill-action:hover {
    background-image: none;
  }
}

.event-date-from-clear-icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .event-date-from-clear::after {
    transition: none;
  }
}

.event-day {
  min-width: 0;
}

.event-day-heading {
  position: sticky;
  inset-block-start: 77px;
  z-index: 10;
  margin: 0;
  padding: 10px 12px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0;
  background: var(--day-heading-bg);
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
}

.event-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-row {
  --event-row-padding-block: 18px;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  text-align: start;
  cursor: pointer;
}

.event-row--ranked {
  padding-inline-start: 56px;
}

.event-rank {
  position: absolute;
  inset-inline-start: 2px;
  inset-block-start: var(--event-row-padding-block);
  display: grid;
  width: 48px;
  height: 50px;
  place-items: start center;
  color: var(--muted);
  font-size: 30px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  direction: inherit;
}

.event-rank--gold {
  color: var(--rank-gold);
}

.event-rank--silver {
  color: var(--rank-silver);
}

.event-rank--bronze {
  color: var(--rank-bronze);
}

.event-rank-medal {
  width: 44px;
  height: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-rank-medal text {
  fill: currentColor;
  stroke: none;
  font-size: 21px;
  font-weight: 700;
}

.event-date-value {
  direction: ltr;
  unicode-bidi: isolate;
}

.event-row--birthday {
  isolation: isolate;
}

/* Only the decorative layer is clipped; row actions and focus outlines stay intact. */
.event-birthday-balloons {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.2;
}

.event-birthday-balloon {
  position: absolute;
  top: 0;
  width: var(--balloon-size);
  height: calc(var(--balloon-size) * 1.2 + 18px);
  color: var(--balloon-color);
  transform: translate3d(0, -100px, 0);
}

.event-birthday-balloon::before {
  position: absolute;
  top: 0;
  width: 100%;
  height: calc(var(--balloon-size) * 1.2);
  border-radius: 50% 50% 48% 48%;
  background: currentColor;
  content: '';
}

.event-birthday-balloon::after {
  position: absolute;
  top: calc(var(--balloon-size) * 1.2);
  left: 50%;
  width: 6px;
  height: 18px;
  border-left: 1px solid currentColor;
  border-radius: 50%;
  content: '';
}

@media (prefers-reduced-motion: reduce) {
  .event-birthday-balloons {
    display: none;
  }
}

.event-row-content {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: var(--event-row-padding-block) 2px;
  color: inherit;
  text-decoration: none;
  transition: padding-bottom 160ms cubic-bezier(0.2, 0, 0, 1);
}

.event-link {
  cursor: pointer;
}

/* The full event is the click target, including its revealed information. */
@media (hover: hover) {
  .event-row:hover {
    background: var(--event-row-hover);
  }

  /* Action pills have their own hover; loading does not alter event feedback. */
  .event-row:has(
      .event-inline-action:hover,
      .event-benefit-code:hover,
      .event-benefit-contact:hover,
      .event-filterable-value:hover
    ):hover {
    background: transparent;
  }
}

/* Paint a pill behind the text without changing its inline layout. */
.event-filterable-value {
  position: relative;
  isolation: isolate;
  cursor: pointer;
}

.event-filterable-value:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--pill-radius);
}

@media (hover: hover) {
  .event-filterable-value:hover::before {
    position: absolute;
    z-index: -1;
    inset: -2px -5px;
    border: 1px solid var(--pill-border);
    border-radius: var(--pill-radius);
    background: var(--pill-background);
    box-shadow: var(--pill-shadow);
    pointer-events: none;
    content: '';
  }
}

.event-like-button {
  padding: 0;
  cursor: pointer;
}

.event-like-icon {
  transition:
    fill 200ms ease,
    color 200ms ease;
}

.event-like-button[aria-pressed='true'] .event-like-icon {
  color: var(--accent);
  fill: currentColor;
}

/* One independent marker per occurrence, including its expanded content. */
.event-like-indicator {
  position: absolute;
  z-index: 3;
  inset-block: 4px;
  inset-inline-end: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

.event-like-indicator[data-selected='true'] {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .event-like-icon {
    transition: none;
  }
}

.event-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.event-time,
.event-detail {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
}

.event-time {
  column-gap: 16px;
  row-gap: 3px;
  padding: var(--event-row-padding-block) 2px 0;
  font-variant-numeric: tabular-nums;
}

.event-time-main,
.event-time-line {
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
}

.event-time-line,
.event-benefit-code-action {
  position: relative;
}

.event-wrap-separator {
  position: absolute;
  inset-inline-start: -16px;
  inset-block-start: 50%;
  width: 16px;
  transform: translateY(-50%);
  text-align: center;
  visibility: hidden;
  pointer-events: none;
}

.event-time + .event-row-content {
  padding-block-start: 0;
}

.event-time-value {
  direction: ltr;
  unicode-bidi: isolate;
}

.event-time-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.4em;
  width: 1.4em;
  margin-inline: 0;
}

.event-separator {
  flex: 0 0 auto;
  margin-inline: 6px;
}

.event-meta {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 7px;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
}

.event-emoji {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.event-display-name,
.event-line-name,
.event-detail-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-display-name {
  flex: 1 1 0;
}

.event-display-name {
  direction: inherit;
  text-align: start;
}

.event-detail {
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-top: 3px;
}

.event-detail-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-block-start: 2px;
  margin-inline-end: 6px;
}

.event-detail-content,
.event-benefit-content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
}

.event-benefit-content {
  column-gap: 16px;
  row-gap: 3px;
}

.event-ticketing-status {
  flex-wrap: wrap;
}

.event-ticketing-status[hidden] {
  display: none;
}

.event-status-group {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.event-status-group .event-detail-icon {
  margin-block-start: 0;
}

.event-ticketing-free,
.event-ticketing-sold-out {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.event-ticketing-free {
  color: var(--ticket-free);
}

.event-ticketing-sold-out {
  color: var(--ticket-sold-out);
}

.event-benefit {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  margin-top: 3px;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.3;
}

.event-benefit-code-action {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.event-benefit-code,
.event-benefit-contact {
  min-height: 0;
  flex: 0 0 auto;
  gap: 5px;
  padding: 2px 7px;
  font-size: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.event-benefit-code-action .event-benefit-extra {
  flex: 0 0 auto;
  white-space: nowrap;
}

.event-benefit-code-action .event-benefit-code,
.event-benefit-code-action .event-benefit-contact {
  min-width: 0;
  flex: 0 1 auto;
  white-space: normal;
}

.event-benefit-code-action bdi {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-benefit-code-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-benefit-contact-brand-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: currentColor;
}

.event-benefit-code-icon--check,
.event-benefit-code[data-copied='true'] .event-benefit-code-icon--copy {
  display: none;
}

.event-benefit-code[data-copied='true'] .event-benefit-code-icon--check {
  display: block;
}

.event-detail-value,
.event-benefit-text,
.event-benefit-extra {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Inline event information shares the feed's typography and icon alignment. */
/* Override the later mobile padding-block rule as well: expanded details
   should continue directly after the existing feed content. */
.event-row-content.event-row-content--expanded {
  padding-bottom: 0;
  transition-duration: 200ms;
}

.event-inline-info {
  display: grid;
  min-width: 0;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 160ms cubic-bezier(0.2, 0, 0, 1),
    opacity 160ms ease-out;
}

.event-inline-info--expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  transition-duration: 200ms;
}

/* Clip the growing row, without changing the spacing of the feed lines. */
.event-inline-info-reveal {
  min-height: 0;
  overflow: hidden;
}

.event-inline-info-content {
  min-width: 0;
  padding: 0 2px 18px;
}

/* Reserve a small gutter for the marker regardless of selection. */
.event-time,
.event-row-content,
.event-inline-info-content {
  padding-inline-end: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .event-inline-info,
  .event-row-content {
    transition: none;
  }
}

/* Let inline details use the same 3px .event-detail margin as the feed,
   including the first detail after the existing event content. */
.event-inline-details {
  display: grid;
}

.event-inline-details .event-info-lines {
  flex: 1 1 auto;
  justify-items: start;
  gap: 3px;
}

.event-inline-details .event-info-line {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.3;
  text-align: start;
  text-wrap: initial;
}

.event-inline-details .event-info-ticket-line {
  white-space: normal;
}

.event-inline-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.event-inline-image-container {
  display: grid;
  min-width: 0;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 300ms cubic-bezier(0.2, 0, 0, 1),
    opacity 300ms ease-out;
}

.event-inline-image-container--loaded {
  grid-template-rows: 1fr;
  opacity: 1;
}

.event-inline-image-reveal {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .event-inline-image-container {
    transition: none;
  }
}

.event-inline-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  margin: 8px auto 0;
  border-radius: 8px;
}

.event-inline-image[hidden] {
  display: none;
}

.event-inline-actions[hidden] {
  display: none;
}

.event-inline-like-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.event-inline-link-pills {
  display: flex;
  min-width: min(50px, 100%);
  flex: 1 1 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  animation: event-inline-links-reveal 180ms ease-out;
}

@keyframes event-inline-links-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-inline-link-pills {
    animation: none;
  }
}

.event-inline-links-pill {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 2px;
}

.event-inline-action {
  overflow: hidden;
}

.event-inline-action > * {
  position: relative;
  z-index: 1;
}

.event-inline-action:focus-visible {
  outline-offset: -3px;
}

.event-inline-action .event-links-icon,
.event-inline-brand-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.event-inline-brand-icon {
  fill: currentColor;
  pointer-events: none;
}

.event-inline-ticket-benefit {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.event-inline-ticket-benefit > .event-detail-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
}

.event-inline-ticket-benefit > .event-inline-gift-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  margin: 0;
  stroke: var(--accent);
}

/* Shared inline participant and price typography. */
.event-info-lines {
  display: grid;
  min-width: 0;
  max-width: 100%;
  justify-items: start;
  gap: 3px;
}

.event-info-line {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.event-links-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

/* The announcement dialog temporarily locks background scrolling. */
html.announcement-dialog-open {
  overflow: hidden;
}

.announcement-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--container-radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--dialog-shadow);
}

.announcement-dialog[open] {
  display: flex;
  flex-direction: column;
}

.announcement-dialog::backdrop {
  background: var(--dialog-backdrop);
}

.announcement-header {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 8px 8px 0;
}

.announcement-close {
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.announcement-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 24px 16px;
  overflow-wrap: anywhere;
  line-height: 1.5;
  text-align: start;
}

/* Focus the announcement text on open, without a ring around non-interactive content. */
.announcement-content:focus {
  outline: none;
}

.announcement-content > :first-child {
  margin-top: 0;
}

.announcement-content > :last-child {
  margin-bottom: 0;
}

.announcement-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.announcement-dismiss {
  min-height: 44px;
  padding: 8px 18px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .events-page {
    padding-top: 24px;
  }

  .event-day-heading {
    inset-block-start: 69px;
  }

  .event-row {
    --event-row-padding-block: 16px;
  }
}
