/* MG Termine v10.2.0 – Frontend-Basissystem
   Only applies to full MG Termine pages; leaves other WordPress pages alone.
   Components retain their own visual backgrounds; shared geometry comes from here.
*/
body.mgt-consolidated-page-body{
  --mgt-bg:#f4f5f9;
  --mgt-surface:#fff;
  --mgt-ink:#20242d;
  --mgt-muted:#6d7382;
  --mgt-border:#e4e6ee;
  --mgt-accent:#7547ef;
  --mgt-accent-soft:#f1edff;
  --mgt-container:1240px;
  --mgt-gutter:14px;
  background:var(--mgt-bg)!important;
  color:var(--mgt-ink);
  overflow-x:clip;
}
body.mgt-consolidated-page-body,
body.mgt-consolidated-page-body *{box-sizing:border-box}
/* Hide only top-level theme chrome; do not hide nested content headers or the plugin header. */
body.mgt-consolidated-page-body>.wp-site-blocks>header,
body.mgt-consolidated-page-body>.wp-site-blocks>footer,
body.mgt-consolidated-page-body>.wp-site-blocks>.wp-block-template-part:has(>header),
body.mgt-consolidated-page-body>.wp-site-blocks>.wp-block-template-part:has(>footer),
body.mgt-consolidated-page-body .wp-block-post-title,
body.mgt-consolidated-page-body .entry-title{display:none!important}
/* Reset only the shortcode's structural ancestors. Never flatten every nested
   .is-layout-constrained block, because that breaks card and grid layouts. */
body.mgt-consolidated-page-body>.wp-site-blocks,
body.mgt-consolidated-page-body>.wp-site-blocks>main,
body.mgt-consolidated-page-body .wp-block-post-content,
body.mgt-consolidated-page-body .entry-content,
body.mgt-consolidated-page-body .wp-block-post-content>.wp-block-shortcode{
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
}
/* Single page shell; no 100vw breakout. */
body.mgt-consolidated-page-body :is(
 .mgt-site-shell,.mgt-free-page,.mgt-paid-page,.mgt-leisure-v810,
 .mgt-map-v840,.mgt-day-v830,.mgt-venues-v380,.mgt-legal-shell-v270,
 .mgt-personal-page-v1001,.mgt-account-v900,.mgt-fav-page-v320,
 .mgt-all-events-v229,.mgt-organizer-shell){
  position:relative!important;left:auto!important;right:auto!important;
  transform:none!important;translate:none!important;width:100%!important;
  max-width:100%!important;margin-left:0!important;margin-right:0!important;
}
body.mgt-consolidated-page-body :is(
 .mgt-home,.mgt-free-main,.mgt-paid-main,.mgt-leisure-main-v810,
 .mgt-map-main-v840,.mgt-day-main-v830,.mgt-venues-main-v380,
 .mgt-legal-main-v270,.mgt-personal-main-v1001,.mgt-account-main-v900,
 .mgt-fav-main-v320,.mgt-ae-main,.mgt-organizer-main){
  width:min(var(--mgt-container),calc(100% - 2 * var(--mgt-gutter)))!important;
  max-width:var(--mgt-container)!important;
  margin-left:auto!important;margin-right:auto!important;
}
/* Canonical sticky header. Admin-bar offset stays consistent on mobile. */
body.mgt-consolidated-page-body [data-mgt-shared-header].mgt-unified-header-v994{
  position:sticky!important;top:0!important;left:auto!important;right:auto!important;
  width:100%!important;max-width:none!important;margin:0!important;
  border-radius:0!important;z-index:10000!important;
}
body.admin-bar.mgt-consolidated-page-body [data-mgt-shared-header].mgt-unified-header-v994{top:32px!important}
/* One hero system: consistent width, readable headings, no forced height. */
body.mgt-consolidated-page-body :is(
 .mgt-hero,.mgt-free-hero,.mgt-paid-hero,.mgt-leisure-hero-v810,
 .mgt-map-hero-v840,.mgt-day-hero-v830,.mgt-ae-hero,.mgt-fav-hero-v320,
 .mgt-account-hero-v900,.mgt-legal-hero-v270,.mgt-venues-hero-v380,
 .mgt-category-hero-v490,.mgt-phead-v800){
  width:100%!important;max-width:100%!important;min-width:0!important;
  overflow:hidden!important;isolation:isolate;
}
body.mgt-consolidated-page-body :is(
 .mgt-hero,.mgt-free-hero,.mgt-paid-hero,.mgt-leisure-hero-v810,
 .mgt-map-hero-v840,.mgt-day-hero-v830,.mgt-ae-hero,.mgt-fav-hero-v320,
 .mgt-account-hero-v900,.mgt-legal-hero-v270,.mgt-venues-hero-v380,
 .mgt-category-hero-v490,.mgt-phead-v800) :is(h1,h2,p){
  max-width:100%!important;overflow-wrap:break-word;
}
/* Standard active state and keyboard focus. */
body.mgt-consolidated-page-body :is(
 .mgt-home-jump-v480 a.is-active,.mgt-paid-filter.is-active,
 .mgt-free-filter.is-active,.mgt-city-quick-v420 a.is-active){
  background:var(--mgt-accent)!important;color:#fff!important;border-color:var(--mgt-accent)!important;
}
body.mgt-consolidated-page-body :is(a,button,input,select,textarea,summary):focus-visible{
  outline:3px solid #9878f7!important;outline-offset:3px!important;
}
body.mgt-consolidated-page-body :is(input,select,textarea,button){max-width:100%;}
body.mgt-consolidated-page-body [data-mgt-shared-footer]{
  width:100%!important;max-width:100%!important;margin:0!important;
}
@media(max-width:900px){
 body.mgt-consolidated-page-body [data-mgt-shared-header].mgt-unified-header-v994 .mgt-nav{display:none!important}
 body.mgt-consolidated-page-body [data-mgt-shared-header].mgt-unified-header-v994 .mgt-mobile-menu{display:block!important}
}
@media(max-width:782px){
 body.admin-bar.mgt-consolidated-page-body [data-mgt-shared-header].mgt-unified-header-v994{top:46px!important}
}
@media(max-width:760px){
 body.mgt-consolidated-page-body{--mgt-gutter:10px}
 body.mgt-consolidated-page-body :is(
  .mgt-home,.mgt-free-main,.mgt-paid-main,.mgt-leisure-main-v810,
  .mgt-map-main-v840,.mgt-day-main-v830,.mgt-venues-main-v380,
  .mgt-legal-main-v270,.mgt-personal-main-v1001,.mgt-account-main-v900,
  .mgt-fav-main-v320,.mgt-ae-main,.mgt-organizer-main){
    width:calc(100% - 20px)!important;max-width:calc(100% - 20px)!important;
    margin-left:auto!important;margin-right:auto!important;
    padding-left:0!important;padding-right:0!important;
  }
 body.mgt-consolidated-page-body :is(
  .mgt-hero,.mgt-free-hero,.mgt-paid-hero,.mgt-leisure-hero-v810,
  .mgt-map-hero-v840,.mgt-day-hero-v830,.mgt-ae-hero,.mgt-fav-hero-v320,
  .mgt-account-hero-v900,.mgt-legal-hero-v270,.mgt-venues-hero-v380,
  .mgt-category-hero-v490,.mgt-phead-v800){
    min-height:0!important;height:auto!important;
    padding:30px 18px 25px!important;border-radius:24px!important;
  }
 body.mgt-consolidated-page-body :is(
  .mgt-hero,.mgt-free-hero,.mgt-paid-hero,.mgt-leisure-hero-v810,
  .mgt-map-hero-v840,.mgt-day-hero-v830,.mgt-ae-hero,.mgt-fav-hero-v320,
  .mgt-account-hero-v900,.mgt-legal-hero-v270,.mgt-venues-hero-v380,
  .mgt-category-hero-v490,.mgt-phead-v800) :is(h1,h2){
    font-size:clamp(2.05rem,9.1vw,2.75rem)!important;
    line-height:1.05!important;letter-spacing:-.045em!important;
  }
 body.mgt-consolidated-page-body .mgt-mobile-menu-panel{
   width:min(320px,calc(100vw - 24px))!important;
   max-width:calc(100vw - 24px)!important;right:0!important;left:auto!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.mgt-consolidated-page-body *,body.mgt-consolidated-page-body *:before,
 body.mgt-consolidated-page-body *:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;}
}
