.event-catalog-tile {
  min-width: 0;
  align-self: start;
}

.event-catalog-panel {
  display: grid;
  aspect-ratio: 1;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}

.event-catalog-panel > * {
  grid-area: 1 / 1;
}

.event-catalog-panel > [hidden],
.event-flyer-toggle > [hidden] {
  display: none;
}

.event-flyer-toggle {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: #0d0f10;
  color: var(--text);
  cursor: pointer;
}

.event-flyer-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.event-flyer-toggle:hover .event-flyer-image {
  filter: brightness(1.05);
}

.event-flyer-loading {
  display: grid;
  place-items: center;
  padding: 20px;
}

.event-catalog-tile .event-catalog-card {
  min-height: 0;
}

/* Long details scroll inside the square so the ticket and actions stay put. */
.event-catalog-tile .event-catalog-card > .card-top {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 16px 16px 10px;
  border-bottom: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.event-catalog-tile .event-catalog-card > .card-top > * {
  flex-shrink: 0;
}

.event-catalog-tile .event-place-row {
  flex-wrap: wrap;
  gap: 6px 10px;
}

.event-catalog-tile .event-place {
  flex: 1 1 120px;
}

.event-catalog-tile .event-venue-name {
  font-size: 18px;
}

.event-catalog-tile .event-catalog-card h2 {
  margin-bottom: 0;
}

.event-catalog-tile .event-date {
  margin-top: 8px;
}

.event-flyer-back {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--card-font-small);
}

.event-flyer-back:hover {
  color: var(--text);
}

.event-catalog-tile .event-catalog-card > .card-body {
  flex: none;
  padding: 0 16px;
  border-top: 0;
}

.event-catalog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 41px;
  padding-block: 4px;
  border-top: 1px solid var(--line);
}

.event-catalog-meta .event-source-links {
  margin: 0;
}

.event-catalog-meta .event-company-count {
  margin: 0 0 0 auto;
  font-size: var(--card-font-small);
}

.event-catalog-tile > .event-catalog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  container-type: inline-size;
  border-top: 1px solid var(--line);
  background: linear-gradient(#292d31, #202428);
}

.event-catalog-tile > .event-catalog-actions > .btn,
html[data-appearance=cybersigilism] .event-catalog-tile > .event-catalog-actions > .btn {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  line-height: 15px;
  white-space: normal;
  text-wrap: balance;
}

@container (max-width: 280px) {
  .event-catalog-tile > .event-catalog-actions > .btn {
    font-size: 13px;
    line-height: 1.1;
  }
}

@container (max-width: 196px) {
  .event-catalog-tile > .event-catalog-actions > .btn {
    padding-inline: 0;
    font-size: 12px;
  }
}

.event-catalog-tile > .event-catalog-actions > .btn + .btn {
  border-inline-start: 1px solid var(--line);
}

.event-catalog-tile > .event-catalog-actions > .btn:hover,
html[data-appearance=cybersigilism] .event-catalog-tile > .event-catalog-actions > .btn:hover {
  background: #ffffff0d;
}

.event-flyer-toggle:focus-visible,
.event-catalog-tile .event-catalog-card:focus-visible,
.event-catalog-tile > .event-catalog-actions > .btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: -3px;
}

html[data-appearance=cybersigilism] .event-catalog-tile > .event-catalog-actions {
  background: linear-gradient(#333640, #1d2028);
}
