/*
 * Mansion Souon Check — canonical footer / page-end layout
 * Canonical global layout owner
 *
 * This file is the ONLY owner of:
 * - visible footer styling
 * - Lightning footer suppression
 * - the content-to-footer gap
 * - homepage bottom-wrapper resets
 *
 * Keep desktop/tablet/mobile on the same 24px gap. Do not duplicate these
 * selectors in other stylesheets.
 */
:root{--msc-footer-gap:24px;--msc-site-header-bg:#fff;}

/* Lightning's empty footer is not used; the plugin footer below is the visible footer. */
body .site-footer{
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
body .site-body,
body .site-body-container,
body .site-content{min-height:0!important;}

/* Visible footer — identical on every public page. */
body .msc-footer-links{
  box-sizing:border-box;
  width:100%;
  margin:0!important;
  padding:18px 16px;
  border-top:1px solid rgba(11,43,62,.10)!important;
  background:var(--msc-site-header-bg,#fff)!important;
}
body .msc-footer-links-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px 0;
}
body .msc-footer-links a{
  display:inline-flex;
  align-items:center;
  color:#5d6971!important;
  text-decoration:none!important;
  font-size:13px;
  line-height:1.5;
}
body .msc-footer-links a:hover{color:#087cab!important;text-decoration:underline!important;}
body .msc-footer-links a:not(:last-child)::after{
  content:"｜";
  margin:0 10px;
  color:#c4cbd0;
  text-decoration:none!important;
}

/* Every plugin public template except the homepage uses .msc-layout-page.
 * Its own background therefore paints the full 24px gap. */
body .msc-layout-page{
  margin-bottom:0!important;
  padding-bottom:var(--msc-footer-gap)!important;
}
body .msc-layout-page>.msc-layout-inner{
  margin-bottom:0!important;
  padding-bottom:0!important;
}
body .msc-layout-page>.msc-layout-inner>:last-child,
body .msc-noise-article-content>:last-child,
body .msc-utility-content>:last-child{margin-bottom:0!important;}
body .msc-layout-page .msc-area-maintenance{padding-bottom:0!important;}

/* Homepage: the SEO/noise section is appended AFTER .msc-home-design, so
 * .msc-noise-intro is the real final content block. It alone owns the visible
 * homepage-to-footer gap. Reset every Lightning/content wrapper that can add an
 * extra bottom band around it. */
body.home .site-body,
body.home .site-body-container,
body.home .site-content,
body.home .siteContent,
body.home .siteContent-container,
body.home .mainSection,
body.home .main-section,
body.home .site-main,
body.home main,
body.home article,
body.home .entry,
body.home .entry-body,
body.home .entry-content,
body.home .entry-footer{
  margin-bottom:0!important;
  padding-bottom:0!important;
}
body.home .msc-home-design,
body.home .msc-home-end{
  margin-bottom:0!important;
  padding-bottom:0!important;
}
/* .msc-home-end is not the page end: the noise/SEO section follows it. */
body.home .msc-home-end .msc-sp-invite{
  margin-top:16px!important;
  margin-bottom:16px!important;
}
@media (min-width:1001px){
  body.home .msc-home-end .msc-sp-invite{
    margin-top:20px!important;
    margin-bottom:20px!important;
  }
}
/* Actual final block on the homepage. Its own background paints the whole gap,
 * so no white strip can appear between content and footer. */
body.home .msc-noise-intro{
  margin-bottom:0!important;
  padding-bottom:var(--msc-footer-gap)!important;
}
body.home .msc-noise-intro>.msc-noise-intro-inner{
  margin-bottom:0!important;
  padding-bottom:0!important;
}
@media(max-width:600px){
  body .msc-footer-links{padding:18px 14px;}
  body .msc-footer-links-inner{gap:9px 18px;}
  body .msc-footer-links a{font-size:13px;}
  body .msc-footer-links a:not(:last-child)::after{display:none;}
}

/* 0.15.315: Administrator-only flow preview controls above the common footer. */
body .msc-admin-preview-footer{box-sizing:border-box;width:100%;background:#142a3a;color:#fff;padding:12px 16px;border-top:2px solid #396b86;}
body .msc-admin-preview-footer-inner{max-width:1200px;margin:auto;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 12px;font-size:13px;line-height:1.5;}
body .msc-admin-preview-heading{white-space:nowrap;font-weight:600;}
body .msc-admin-preview-heading strong{margin-left:5px;color:#f2d38c;}
body .msc-admin-preview-desc{color:#dce6ef;flex:1 1 280px;}
body .msc-admin-preview-form{margin:0!important;padding:0!important;}
body .msc-admin-preview-switch,body .msc-admin-preview-reset{font:inherit;line-height:1.4;cursor:pointer;border-radius:5px;padding:7px 12px;min-height:36px;}
body .msc-admin-preview-switch{background:#fff!important;color:#142a3a!important;border:1px solid #fff!important;font-weight:600;}
body .msc-admin-preview-reset{background:transparent!important;color:#fff!important;border:1px solid #a0b3c2!important;}
body .msc-admin-preview-switch:hover{background:#e7f0f5!important;}
body .msc-admin-preview-reset:hover{background:#284456!important;}
@media(max-width:600px){body .msc-admin-preview-footer-inner{justify-content:flex-start;gap:9px;}body .msc-admin-preview-desc{flex-basis:100%;}body .msc-admin-preview-form{margin-right:4px!important;}}

body .msc-admin-preview-progress{font-size:12px;color:#f2d38c;white-space:nowrap;font-weight:600;}
