/* MoneySastra — standard public footer layout
   18 Aug 2026
   Normalises both .public-footer and .public-footer-v2 to one layout.
*/
:root{
  --ms-footer-green:#0E3D2C;
  --ms-footer-gold:#F5A623;
  --ms-footer-text:#DCEAE4;
  --ms-footer-muted:#AFC7BD;
  --ms-footer-link:#EAF3EF;
  --ms-footer-wrap:1260px;
}

/* Common shell */
.public-footer,
.public-footer-v2{
  margin-top:0 !important;
  background:var(--ms-footer-green) !important;
  color:var(--ms-footer-text) !important;
  border-top:3px solid var(--ms-footer-gold) !important;
  font-family:'Poppins',system-ui,sans-serif !important;
}

/* IMPORTANT: force BOTH footer generations into the same centred container */
.public-footer .footer-main,
.public-footer .footer-note,
.public-footer-v2__main,
.public-footer-v2__note{
  width:calc(100% - 40px) !important;
  max-width:var(--ms-footer-wrap) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* First row: brand | links | copyright */
.public-footer .footer-main,
.public-footer-v2__main{
  min-height:56px !important;
  padding:.58rem 0 !important;
  display:grid !important;
  grid-template-columns:minmax(190px,1fr) auto minmax(190px,1fr) !important;
  align-items:center !important;
  gap:1rem !important;
}

.public-footer .footer-brand,
.public-footer-v2__brand{
  justify-self:start !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:.42rem !important;
  color:#fff !important;
  text-decoration:none !important;
}

.public-footer .footer-links,
.public-footer-v2__links{
  justify-self:center !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex-wrap:wrap !important;
  gap:.9rem !important;
}

.public-footer .footer-copy,
.public-footer-v2__copyright{
  justify-self:end !important;
  margin:0 !important;
  color:#BFD3CB !important;
  font-family:'Poppins',system-ui,sans-serif !important;
  font-size:.69rem !important;
  white-space:nowrap !important;
}

/* Logo treatment */
.public-footer .footer-mark,
.public-footer-v2__mark{
  width:27px !important;
  height:31px !important;
  display:grid !important;
  place-items:center !important;
  flex:0 0 27px !important;
  background:#fff !important;
  border-radius:7px !important;
}

.public-footer .footer-mark svg,
.public-footer-v2__mark svg{
  width:18px !important;
  height:24px !important;
  max-width:18px !important;
  max-height:24px !important;
  display:block !important;
}

.public-footer .footer-word,
.public-footer-v2__wordmark{
  color:#fff !important;
  font-family:'Poppins',system-ui,sans-serif !important;
  font-size:.92rem !important;
  font-weight:600 !important;
  white-space:nowrap !important;
}

.public-footer .footer-word b,
.public-footer-v2__wordmark b{
  color:var(--ms-footer-gold) !important;
  font-weight:600 !important;
}

/* Links */
.public-footer .footer-links a,
.public-footer-v2__links a{
  color:var(--ms-footer-link) !important;
  font-family:'Poppins',system-ui,sans-serif !important;
  font-size:.71rem !important;
  font-weight:500 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
}

.public-footer .footer-links a:hover,
.public-footer-v2__links a:hover{
  color:#fff !important;
  text-decoration:underline !important;
}

/* Second row: initiative | disclaimer */
.public-footer .footer-note,
.public-footer-v2__note{
  min-height:38px !important;
  padding:.48rem 0 .72rem !important;
  border-top:1px solid rgba(255,255,255,.12) !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  align-items:center !important;
  gap:1rem !important;
  color:var(--ms-footer-muted) !important;
  font-family:'Poppins',system-ui,sans-serif !important;
  font-size:.64rem !important;
}

/* Works with both known markups without changing HTML */
.public-footer .footer-note > :first-child,
.public-footer-v2__note > :first-child{
  justify-self:start !important;
  text-align:left !important;
}

.public-footer .footer-note > :last-child,
.public-footer-v2__note > :last-child{
  justify-self:end !important;
  text-align:right !important;
}

.public-footer .footer-note a,
.public-footer-v2__note a,
.public-footer-v2__mobile-initiative{
  color:var(--ms-footer-text) !important;
  font-weight:600 !important;
  text-decoration:none !important;
}

.public-footer .footer-note a:hover,
.public-footer-v2__note a:hover,
.public-footer-v2__mobile-initiative:hover{
  color:#fff !important;
}

/* Mobile: same behaviour for both footer generations */
@media(max-width:820px){
  .public-footer .footer-main,
  .public-footer .footer-note,
  .public-footer-v2__main,
  .public-footer-v2__note{
    width:calc(100% - 24px) !important;
  }

  .public-footer .footer-main,
  .public-footer-v2__main{
    padding:.78rem 0 .58rem !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:.65rem !important;
  }

  .public-footer .footer-brand,
  .public-footer-v2__brand{
    grid-column:1 !important;
    justify-self:start !important;
  }

  .public-footer .footer-copy,
  .public-footer-v2__copyright{
    grid-column:2 !important;
    justify-self:end !important;
  }

  .public-footer .footer-links,
  .public-footer-v2__links{
    grid-column:1 / -1 !important;
    justify-self:start !important;
    justify-content:flex-start !important;
    gap:.45rem !important;
  }

  .public-footer .footer-links a,
  .public-footer-v2__links a{
    padding:.35rem .48rem !important;
    border:1px solid rgba(255,255,255,.12) !important;
    border-radius:7px !important;
    background:rgba(255,255,255,.045) !important;
  }

  .public-footer .footer-note,
  .public-footer-v2__note{
    padding:.48rem 0 .7rem !important;
    grid-template-columns:1fr !important;
    gap:.28rem !important;
  }

  .public-footer .footer-note > :first-child,
  .public-footer .footer-note > :last-child,
  .public-footer-v2__note > :first-child,
  .public-footer-v2__note > :last-child{
    justify-self:start !important;
    text-align:left !important;
  }
}
