/* Carnaby What's On — optional, admin-controlled flip cards only.
   Original alternating event-card colors are painted by the existing stylesheet
   on the article, so the front and back show the identical background. */
body.compact-rhythm #event-grid .event-card.has-flip{
  perspective:1200px;
  -webkit-perspective:1200px;
  isolation:isolate;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-inner{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  flex:1 0 auto;
  width:100%;
  min-width:0;
  transform-style:preserve-3d;
  -webkit-transform-style:preserve-3d;
  transition:transform .65s cubic-bezier(.2,.72,.2,1);
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-front,
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-back{
  min-width:0;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-front{
  grid-column:1;
  grid-row:1;
  display:flex;
  flex-direction:column;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-back{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  padding:13px;
  background:transparent;
  transform:rotateY(180deg);
  -webkit-transform:rotateY(180deg);
  overflow:hidden;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-back .event-title{
  font-family:'Instrument Serif',serif;
  font-size:clamp(28px,2.6vw,39px);
  font-weight:400;
  line-height:1;
  margin:15px 0 10px;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-long-message{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.48;
  font-family:inherit;
  font-weight:400;
  scrollbar-width:thin;
  overscroll-behavior:contain;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-back .event-note{
  flex:none;
  margin-top:12px;
}
body.compact-rhythm #event-grid .event-card.has-flip .event-flip-back .event-booking-link{
  flex:none;
  margin-top:11px;
}
@media (hover:hover) and (pointer:fine){
  body.compact-rhythm #event-grid .event-card.has-flip:hover .event-flip-inner{
    transform:rotateY(180deg);
    -webkit-transform:rotateY(180deg);
  }
}
body.compact-rhythm #event-grid .event-card.has-flip.is-flipped .event-flip-inner{
  transform:rotateY(180deg);
  -webkit-transform:rotateY(180deg);
}
body.compact-rhythm #event-grid .event-card.has-flip:focus-visible{
  outline:3px solid #6e2232;
  outline-offset:3px;
}
@media (prefers-reduced-motion:reduce){
  body.compact-rhythm #event-grid .event-card.has-flip .event-flip-inner{
    transition:none;
  }
}
