/* HSM 4.5.4 public popup readability and close-control recovery
   Purpose: keep homepage announcements professional, readable, printable, and easy to dismiss without disturbing the live homepage. */
.hsm-home-popup-overlay,
.hsm-public-popup-overlay,
.hsm-campaign-popup-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:16px!important;
  overflow:auto!important;
  background:rgba(4,18,45,.70)!important;
  backdrop-filter:blur(4px)!important;
  -webkit-backdrop-filter:blur(4px)!important;
}
.hsm-home-popup-overlay[hidden],
.hsm-public-popup-overlay[hidden],
.hsm-campaign-popup-overlay[hidden]{display:none!important;}
.hsm-home-popup-card,
.hsm-public-popup-card,
.hsm-campaign-popup-card{
  width:min(92vw,620px)!important;
  max-width:620px!important;
  max-height:calc(100vh - 36px)!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  border-radius:24px!important;
  padding:22px 24px 24px!important;
  text-align:center!important;
  background:#fff!important;
  border:2px solid #d6a235!important;
  box-shadow:0 22px 70px rgba(0,0,0,.36)!important;
  color:#061d46!important;
}
.hsm-home-popup-card::before,
.hsm-home-popup-card::after,
.hsm-public-popup-card::before,
.hsm-public-popup-card::after,
.hsm-campaign-popup-card::before,
.hsm-campaign-popup-card::after{display:none!important;}
.hsm-popup-close,
.hsm-home-popup-card .hsm-popup-close,
.hsm-public-popup-card .hsm-popup-close,
.hsm-campaign-popup-card .hsm-popup-close{
  position:sticky!important;
  top:0!important;
  float:right!important;
  z-index:5!important;
  display:inline-grid!important;
  place-items:center!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  margin:-8px -8px 8px 8px!important;
  border:2px solid #d6a235!important;
  border-radius:999px!important;
  background:#061d46!important;
  color:#fff!important;
  font-size:26px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:0 8px 20px rgba(0,0,0,.18)!important;
}
.hsm-popup-logo-row{clear:both!important;display:flex!important;justify-content:center!important;align-items:center!important;gap:10px!important;margin:0 auto 10px!important;}
.hsm-popup-logo-row img{width:78px!important;max-width:22vw!important;height:auto!important;object-fit:contain!important;}
.hsm-popup-logo-row span{font-size:.72rem!important;letter-spacing:.16em!important;color:#a67612!important;font-weight:900!important;}
.hsm-popup-photo{margin:8px auto 12px!important;max-width:100%!important;}
.hsm-popup-photo img,
.hsm-home-popup-card img:not(.hsm-popup-logo-row img){
  max-width:min(100%,460px)!important;
  max-height:280px!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  border-radius:18px!important;
  display:block!important;
  margin:0 auto!important;
}
.hsm-popup-photo figcaption{font-size:.9rem!important;line-height:1.3!important;color:#44546e!important;margin-top:6px!important;}
.hsm-popup-gold-line{height:2px!important;margin:10px auto 12px!important;width:min(280px,70%)!important;}
.hsm-popup-subtitle{font-size:.75rem!important;line-height:1.25!important;letter-spacing:.16em!important;margin:0 0 8px!important;color:#a67612!important;}
.hsm-home-popup-card h2,
.hsm-public-popup-card h2,
.hsm-campaign-popup-card h2{
  font-size:clamp(1.85rem,4.2vw,3.15rem)!important;
  line-height:1.05!important;
  margin:6px 0 10px!important;
  color:#061d46!important;
  text-shadow:none!important;
  overflow-wrap:break-word!important;
}
.hsm-popup-body,
.hsm-home-popup-card p,
.hsm-public-popup-card p,
.hsm-campaign-popup-card p{
  font-size:clamp(1rem,1.7vw,1.15rem)!important;
  line-height:1.45!important;
  color:#263955!important;
  margin-left:auto!important;
  margin-right:auto!important;
  max-width:520px!important;
}
.hsm-popup-signature{font-size:clamp(1.12rem,2.3vw,1.55rem)!important;line-height:1.2!important;margin:10px 0 14px!important;color:#a67612!important;}
.hsm-popup-action,.hsm-home-popup-card .lux-btn{min-width:0!important;width:auto!important;max-width:100%!important;padding:12px 22px!important;font-size:.95rem!important;}
body.hsm-popup-open{overflow:hidden!important;}
@media(max-width:640px){
  .hsm-home-popup-overlay,.hsm-public-popup-overlay,.hsm-campaign-popup-overlay{padding:10px!important;align-items:flex-start!important;}
  .hsm-home-popup-card,.hsm-public-popup-card,.hsm-campaign-popup-card{width:96vw!important;max-height:calc(100vh - 20px)!important;border-radius:18px!important;padding:16px!important;}
  .hsm-popup-close{width:38px!important;height:38px!important;font-size:24px!important;}
  .hsm-popup-logo-row{display:grid!important;gap:4px!important;}
  .hsm-popup-logo-row img{width:64px!important;}
  .hsm-popup-photo img,.hsm-home-popup-card img:not(.hsm-popup-logo-row img){max-height:210px!important;}
  .hsm-home-popup-card h2,.hsm-public-popup-card h2,.hsm-campaign-popup-card h2{font-size:2rem!important;}
}
@media print{.hsm-home-popup-overlay,.hsm-public-popup-overlay,.hsm-campaign-popup-overlay{display:none!important;}}

/* R13.37 restored staff-editable homepage announcement background. */
.hsm-home-popup-card[style*="--popup-bg"]{
  background-image:linear-gradient(rgba(255,255,255,.93),rgba(255,255,255,.93)),var(--popup-bg)!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
