.smpp[hidden] { display: none !important; }
.smpp { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 24px; box-sizing: border-box; }
.smpp *, .smpp *::before, .smpp *::after { box-sizing: border-box; }
.smpp-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 44, .74); }
.smpp-panel { position: relative; z-index: 1; width: min(720px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); }
.smpp-panel:focus { outline: none; }
.smpp-link { display: block; width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 48px rgba(0, 0, 0, .25); line-height: 0; background: #fff; }
.smpp-link:focus-visible, .smpp-close:focus-visible { outline: 3px solid #ff7a00; outline-offset: 3px; }
.smpp-link picture, .smpp-link img { display: block; width: 100%; }
.smpp-link img { height: auto; max-height: calc(100dvh - 48px); object-fit: contain; }
.smpp-close { position: absolute; z-index: 2; top: -14px; right: -14px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0; color: #142d59; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .3); font: 30px/1 Arial, sans-serif; cursor: pointer; }
body.smpp-lock-scroll { overflow: hidden; }
@media (max-width: 600px) {
  .smpp { inset: auto 0 var(--smpp-mobile-bottom, 16px); display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
  .smpp-backdrop { display: none; }
  .smpp-panel { width: min(100%, 360px); max-height: none; pointer-events: auto; }
  .smpp-link { border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }
  .smpp-link img { max-height: min(24dvh, 160px); object-fit: contain; }
  .smpp-mobile-fallback .smpp-panel { width: min(100%, 320px); }
  .smpp-mobile-fallback .smpp-link img { max-height: 32dvh; }
  .smpp-close { top: -12px; right: -8px; width: 36px; height: 36px; font-size: 26px; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .smpp-mobile-portrait .smpp-panel { width: auto; max-width: calc(100vw - 24px); }
  .smpp-mobile-portrait .smpp-link,
  .smpp-mobile-portrait .smpp-link picture { width: auto; }
  .smpp-mobile-portrait .smpp-link img {
    width: auto;
    height: min(65dvh, 560px, calc(100dvh - var(--smpp-mobile-bottom, 16px) - 24px));
    max-width: calc(100vw - 24px);
    max-height: none;
  }
}
@media (max-width: 600px) and (orientation: landscape) {
  .smpp { inset: 0; display: grid; place-items: center; padding: 12px; pointer-events: auto; }
  .smpp-backdrop { display: block; }
  .smpp-panel { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
  .smpp-link img { max-height: calc(100dvh - 24px); }
}
