/* TPT_TEMPLATE1_V54_COMPACT_TABLET_LAYOUT_START
   Scope: Template1 layout only.
   Purpose:
   - Detect the compact-tablet / narrow-desktop middle zone.
   - Stack event selection and cart summary when the two-column layout would squeeze event cards.
   - Remove horizontal clipping in that mode.
   - Leave phone portrait behavior and full desktop behavior unchanged.
   - Do not affect Template2, ticket summary rendering, remove buttons, donation, checkout, or pricing. */

body.tpt-template1-compact-tablet {
  overflow-x: hidden !important;
}

body.tpt-template1-compact-tablet .content-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
}

body.tpt-template1-compact-tablet .content-grid > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.tpt-template1-compact-tablet .section-card,
body.tpt-template1-compact-tablet .ticket-section,
body.tpt-template1-compact-tablet .summary-card,
body.tpt-template1-compact-tablet .event-list,
body.tpt-template1-compact-tablet #seasonPassList,
body.tpt-template1-compact-tablet #eventList {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.tpt-template1-compact-tablet .summary-card {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  align-self: start !important;
}

body.tpt-template1-compact-tablet #seasonPassList .event-row,
body.tpt-template1-compact-tablet #eventList .event-row,
body.tpt-template1-compact-tablet #seasonPassList .event-card,
body.tpt-template1-compact-tablet #eventList .event-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

body.tpt-template1-compact-tablet #seasonPassList .event-row *,
body.tpt-template1-compact-tablet #eventList .event-row *,
body.tpt-template1-compact-tablet #seasonPassList .event-card *,
body.tpt-template1-compact-tablet #eventList .event-card * {
  box-sizing: border-box !important;
}

body.tpt-template1-compact-tablet .event-title,
body.tpt-template1-compact-tablet .event-desc,
body.tpt-template1-compact-tablet .event-meta,
body.tpt-template1-compact-tablet .event-status,
body.tpt-template1-compact-tablet .meta-line,
body.tpt-template1-compact-tablet .event-qty-note {
  min-width: 0 !important;
}

/* Do not override the existing phone/small-tablet mobile mode. */
@media (max-width: 980px) {
  body.tpt-template1-compact-tablet .content-grid {
    grid-template-columns: 1fr !important;
  }
}
/* TPT_TEMPLATE1_V54_COMPACT_TABLET_LAYOUT_END */
