html.jsweb-popup-open { overflow: hidden; }
.jsweb-popup-root { position: fixed; inset: 0; z-index: 999999; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.jsweb-popup-root.is-visible { opacity: 1; }
.jsweb-popup-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); opacity: 0; pointer-events: none; }
.jsweb-popup-root.has-overlay .jsweb-popup-overlay { opacity: 1; pointer-events: auto; }
.jsweb-popup-dialog { position: absolute; width: min(var(--jsweb-popup-width, 600px), calc(100vw - 32px)); max-height: calc(100vh - 32px); height: var(--jsweb-popup-height, auto); background: #fff; border-radius: 8px; box-shadow: 0 18px 60px rgba(0, 0, 0, .3); pointer-events: auto; transform: scale(.96); transition: transform .2s ease; }
.jsweb-popup-root.is-visible .jsweb-popup-dialog { transform: scale(1); }
.jsweb-popup-close { position: absolute; z-index: 3; top: -13px; right: -13px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #111; color: #fff; font: 26px/32px Arial, sans-serif; text-align: center; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.jsweb-popup-content { width: 100%; height: 100%; max-height: calc(100vh - 32px); overflow: auto; border-radius: inherit; }
.jsweb-popup-content > a { display: block; color: inherit; text-decoration: none; }
.jsweb-popup-type-html { padding: 28px; box-sizing: border-box; }
.jsweb-popup-type-html > :first-child, .jsweb-popup-type-html > a > :first-child { margin-top: 0; }
.jsweb-popup-type-html > :last-child, .jsweb-popup-type-html > a > :last-child { margin-bottom: 0; }
.jsweb-popup-type-image img, .jsweb-popup-type-video video, .jsweb-popup-type-video iframe { display: block; width: 100%; max-width: 100%; height: auto; border: 0; }
.jsweb-popup-type-video iframe { aspect-ratio: 16 / 9; }
.jsweb-position-center .jsweb-popup-dialog { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96); }
.jsweb-position-center.is-visible .jsweb-popup-dialog { transform: translate(-50%, -50%) scale(1); }
.jsweb-position-top .jsweb-popup-dialog { top: 24px; left: 50%; transform: translateX(-50%) scale(.96); }
.jsweb-position-top.is-visible .jsweb-popup-dialog, .jsweb-position-bottom.is-visible .jsweb-popup-dialog { transform: translateX(-50%) scale(1); }
.jsweb-position-bottom .jsweb-popup-dialog { bottom: 24px; left: 50%; transform: translateX(-50%) scale(.96); }
.jsweb-position-top-left .jsweb-popup-dialog { top: 24px; left: 24px; }
.jsweb-position-top-right .jsweb-popup-dialog { top: 24px; right: 24px; }
.jsweb-position-bottom-left .jsweb-popup-dialog { bottom: 24px; left: 24px; }
.jsweb-position-bottom-right .jsweb-popup-dialog { right: 24px; bottom: 24px; }
@media (max-width: 767px) {
	.jsweb-popup-root.desktop-only { display: none !important; }
	.jsweb-popup-dialog { width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
	.jsweb-popup-close { top: -10px; right: -8px; }
	.jsweb-position-top-left .jsweb-popup-dialog, .jsweb-position-top-right .jsweb-popup-dialog { top: 16px; right: auto; left: 50%; transform: translateX(-50%) scale(.96); }
	.jsweb-position-bottom-left .jsweb-popup-dialog, .jsweb-position-bottom-right .jsweb-popup-dialog { right: auto; bottom: 16px; left: 50%; transform: translateX(-50%) scale(.96); }
	.jsweb-position-top-left.is-visible .jsweb-popup-dialog, .jsweb-position-top-right.is-visible .jsweb-popup-dialog, .jsweb-position-bottom-left.is-visible .jsweb-popup-dialog, .jsweb-position-bottom-right.is-visible .jsweb-popup-dialog { transform: translateX(-50%) scale(1); }
	.jsweb-popup-type-html { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .jsweb-popup-root, .jsweb-popup-dialog { transition: none; } }
