/* MEET 337 – Event-Vorschaubilder folgen ebenfalls den globalen
   Mobil-/Desktop-Breiten- und Hoeheneinstellungen aus Bilder & Galerie.
   Bestehendes Kartenlayout, Schriftgroessen, Bildinhalte und Aktionen bleiben.
   Die Admin-Werte liegen auf <html> als --ap-thumb-...-scale. */

/* Event-Liste (Event-Karte mit seitlichem Thumbnail): Die GRIDS PALTE
   muss sich zusammen mit dem Thumbnail aendern; alte feste CSS-Spalten
   verhinderten bisher die Breitenanpassung. */
@media (max-width:380px){
  html body[data-mobile-view247="events"] #topicList .community-event-row{
    grid-template-columns:min(calc(84px * var(--ap-thumb-mobile-width-scale,1)),49vw) minmax(0,1fr)!important;
  }
  html body[data-mobile-view247="events"] #topicList .event-topic-thumb{
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:calc(88px * var(--ap-thumb-mobile-height-scale,1))!important;
    min-height:calc(88px * var(--ap-thumb-mobile-height-scale,1))!important;
    max-height:none!important;
  }
}
@media (min-width:381px) and (max-width:760px){
  html body[data-mobile-view247="events"] #topicList .community-event-row{
    grid-template-columns:min(calc(96px * var(--ap-thumb-mobile-width-scale,1)),49vw) minmax(0,1fr)!important;
  }
  html body[data-mobile-view247="events"] #topicList .event-topic-thumb{
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:calc(96px * var(--ap-thumb-mobile-height-scale,1))!important;
    min-height:calc(96px * var(--ap-thumb-mobile-height-scale,1))!important;
    max-height:none!important;
  }
}
@media (min-width:761px) and (max-width:900px){
  html body #topicList .community-event-row{
    grid-template-columns:calc(76px * var(--ap-thumb-desktop-width-scale,1)) minmax(0,1fr)!important;
  }
  html body #topicList .event-topic-thumb{
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:calc(58px * var(--ap-thumb-desktop-height-scale,1))!important;
    min-height:calc(58px * var(--ap-thumb-desktop-height-scale,1))!important;
    max-height:none!important;
  }
}
@media (min-width:901px) and (max-width:1199px){
  html body #topicList .community-event-row{
    grid-template-columns:calc(128px * var(--ap-thumb-desktop-width-scale,1)) minmax(0,1fr) auto!important;
  }
}
@media (min-width:1200px){
  html body #topicList .community-event-row{
    grid-template-columns:calc(136px * var(--ap-thumb-desktop-width-scale,1)) minmax(0,1fr) auto!important;
  }
}
@media (min-width:901px){
  html body #topicList .event-topic-thumb{
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:calc(118px * var(--ap-thumb-desktop-height-scale,1))!important;
    min-height:calc(118px * var(--ap-thumb-desktop-height-scale,1))!important;
    max-height:none!important;
  }
}

/* Separate Event-/LIVE-Poster-Karten: zuvor von Thumbnail-Reglern
   ueberhaupt nicht angesprochen. Poster bleiben unverzerrt; Breite
   bestimmt die Darstellung im Bildfenster (zentriert / bei >100% beschnitten). */
@media (max-width:760px){
  html body #liveGrid .event-live-visual{
    height:calc(155px * var(--ap-thumb-mobile-height-scale,1))!important;
  }
  html body #liveGrid .event-live-visual .live-event-image{
    width:calc(100% * var(--ap-thumb-mobile-width-scale,1))!important;
    max-width:none!important;left:50%!important;
    height:100%!important;transform:translateX(-50%);object-fit:cover!important;
  }
}
@media (min-width:761px){
  html body #liveGrid .event-live-visual{
    height:calc(170px * var(--ap-thumb-desktop-height-scale,1))!important;
  }
  html body #liveGrid .event-live-visual .live-event-image{
    width:calc(100% * var(--ap-thumb-desktop-width-scale,1))!important;
    max-width:none!important;left:50%!important;
    height:100%!important;transform:translateX(-50%);object-fit:cover!important;
  }
}
