#mys-popup[hidden] { display: none !important; }
#mys-popup { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(20, 15, 30, .48); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
#mys-popup .mys-popup-dialog { position: relative; width: fit-content; max-width: min(720px, 100%); min-width: 0; height: auto; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: transparent; border: 0; box-shadow: none; text-align: center; }
#mys-popup .mys-popup-content { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 0; box-sizing: border-box; background: transparent; overflow-wrap: anywhere; }
#mys-popup .mys-popup-close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(20,15,30,.8); color: #fff; font: 28px/32px Arial, sans-serif; cursor: pointer; }
#mys-popup .mys-popup-image { display: block; max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); width: auto; height: auto; margin: 0 auto; object-fit: contain; }
#mys-popup .mys-popup-has-actions .mys-popup-image { max-height: calc(100vh - 160px); max-height: max(1px, calc(100dvh - 160px)); }
#mys-popup .mys-popup-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
#mys-popup .mys-popup-action { flex: 1 1 130px; padding: 12px 16px; border: 2px solid #704094; border-radius: 8px; color: #fff; background: #704094; font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none; }
#mys-popup .mys-popup-secondary { color: #fff; border-color: rgba(255,255,255,.8); background: rgba(20,15,30,.65); }
#mys-popup .mys-popup-action:hover { background: #51276f; color: #fff; }
#mys-popup :focus-visible { outline: 3px solid #c99023; outline-offset: 3px; }
html.mys-popup-open, html.mys-popup-open body { overflow: hidden !important; }
@media (max-width: 400px) {
    #mys-popup .mys-popup-action { flex-basis: 90px; padding: 10px 8px; font-size: 14px; }
}
