.xmax-try-dialog{width:560px;max-width:calc(100vw - 24px);max-height:92dvh;overflow:auto;box-sizing:border-box;border:1px solid var(--color-border,#ddd);border-radius:20px;padding:20px;background:var(--color-panel,#fff);color:var(--color-ink,#222);direction:rtl;font:inherit}.xmax-try-dialog::backdrop{background:rgba(0,0,0,.55)}.xmax-try-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.xmax-try-dialog h2{font-size:20px}.xmax-try-dialog [data-close]{border:0;background:transparent;color:inherit;font-size:30px;padding:4px 10px;min-height:44px}.xmax-consent{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.9}.xmax-consent input{flex-shrink:0;margin-top:8px}.xmax-policy{font-size:12px;line-height:1.8}.xmax-try-dialog button:not([data-close]){padding:12px 18px;border:1px solid var(--color-border,#ccc);border-radius:12px;font:inherit;min-height:44px;cursor:pointer;white-space:nowrap}.xmax-try-dialog button:disabled{opacity:.45;cursor:not-allowed}.xmax-try-dialog a{color:inherit;text-decoration:underline}.xmax-stage{position:relative;aspect-ratio:4/5;background:#111;overflow:hidden;border-radius:12px;margin:16px 0;direction:ltr}.xmax-stage>div:not(.vton-btn){position:absolute;inset:0;width:100%;height:100%}.xmax-stage img{width:100%;height:100%;object-fit:contain}.xmax-try-dialog small{display:block;line-height:1.8;margin-top:14px}.xmax-try-dialog [role=status]{overflow-wrap:anywhere;font-size:14px;line-height:1.8}.xmax-try-dialog [data-stop]{background:#222;color:#fff}

.xmax-live-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;bottom:0;background:var(--color-panel,#fff);padding:12px 0;z-index:2}.xmax-live-bar[hidden]{display:none}.xmax-elapsed{font:600 24px ui-monospace,monospace;direction:ltr;font-variant-numeric:tabular-nums}.xmax-live-bar [data-stop]{background:#b42318;min-width:110px}

.xmax-try-dialog [hidden]{display:none!important}

.xmax-try-dialog button[data-tryon-consent-accept]{display:block;width:100%;border:1px solid #111;border-radius:999px;background:#111;color:#fff;font-weight:700;min-height:48px;margin-top:18px}.xmax-try-dialog button[data-tryon-consent-accept]:disabled{background:#111;color:#fff;opacity:.4}.xmax-try-dialog button[data-tryon-consent-accept]:not(:disabled):hover{background:#292929}.xmax-try-dialog button[data-tryon-consent-accept]:focus-visible{outline:2px solid currentColor;outline-offset:4px}

html:root body .xmax-try-dialog header{position:static!important;min-height:44px!important;padding:0!important;margin-bottom:8px}html:root body .xmax-try-dialog header>[data-close]{position:absolute!important;inset:auto!important;top:12px!important;right:12px!important;left:auto!important;margin:0!important;width:44px;height:44px;padding:0;display:grid;place-items:center;line-height:1;border-radius:50%;font-size:30px}.xmax-consent-dialog{padding-top:64px}html:root body .xmax-consent-dialog header{min-height:0!important;margin:0!important}

.xmax-consent-dialog{padding-top:44px;padding-bottom:16px}html:root body .xmax-consent-dialog header>[data-close]{top:2px!important;right:6px!important}.xmax-consent-dialog .xmax-consent{margin-top:0}.xmax-consent-dialog .xmax-policy{margin:8px 0 0}.xmax-consent-dialog button[data-tryon-consent-accept]{margin-top:12px}

html:root body .xmax-consent-dialog header>[data-close]{top:2px!important;left:6px!important;right:auto!important}.xmax-consent-dialog{padding-top:48px}

html:root body.ui-consistent.ui-consistent dialog.xmax-try-dialog.xmax-consent-dialog>header{position:static!important;min-height:0!important;height:0!important;padding:0!important;margin:0!important}html:root body.ui-consistent.ui-consistent dialog.xmax-try-dialog.xmax-consent-dialog>header>[data-close]{position:absolute!important;top:2px!important;left:6px!important;right:auto!important;bottom:auto!important;margin:0!important;transform:none!important}

html:root body #tryon-consent-dialog>header.ui-close-heading{position:static!important;min-height:0!important;height:0!important;padding:0!important;margin:0!important}html:root body #tryon-consent-dialog>header>[data-close][data-ui-close]{position:absolute!important;inset:auto!important;top:2px!important;left:6px!important;right:auto!important;bottom:auto!important;transform:none!important}

.xmax-buy-credit{display:block;text-align:center;padding:14px 20px;border-radius:999px;background:#111;color:#fff!important;text-decoration:none!important;font-weight:700}.xmax-credit-dialog .xmax-stage{display:none!important}

html:root body dialog.xmax-camera-dialog{padding:0;overflow:hidden;background:#111;color:white;border:0;border-radius:20px}.xmax-camera-dialog>header{display:none!important}.xmax-camera-dialog .xmax-stage{margin:0;aspect-ratio:3/4;max-height:85dvh;border-radius:20px}.xmax-camera-dialog .xmax-stage>.xmax-live-bar{position:absolute;inset:auto 16px 16px;display:flex;width:auto;height:auto;background:rgba(0,0,0,.5);border-radius:999px;padding:8px 12px;z-index:5}.xmax-camera-dialog .xmax-elapsed{font-size:16px}.xmax-camera-dialog .xmax-stage>[data-close]{position:absolute!important;top:12px!important;left:12px!important;right:auto!important;z-index:6;color:white!important;background:rgba(0,0,0,.45)!important;border-radius:50%}.xmax-camera-dialog [role=status]:not(:empty){padding:10px 18px;margin:0;font-size:13px}.xmax-camera-dialog .xmax-camera-switch{min-width:44px;font-size:24px;padding:0 8px!important;color:white;background:transparent}.xmax-camera-dialog [data-controls]{display:none}

html:root body dialog.xmax-camera-dialog .xmax-stage>[data-close]{display:none!important}html:root body dialog.xmax-camera-dialog .xmax-live-bar [data-stop]{display:grid!important;place-items:center;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;padding:0!important;border-radius:50%!important;background:#ef3434!important;border:3px solid #ffffff80!important;color:white!important}.xmax-camera-dialog [data-stop]>span{width:22px;height:22px;border-radius:4px;background:#fff}.xmax-camera-dialog .xmax-live-bar{min-height:70px}

html:root body dialog.xmax-camera-dialog .xmax-camera-switch{display:grid;place-items:center;width:48px;min-width:48px;height:48px;border:0!important;border-radius:50%!important;background:#ffffff16!important;color:#fff!important;padding:0!important}.xmax-camera-switch svg{display:block}
html:root body dialog.xmax-camera-dialog .xmax-stage>.xmax-live-bar{bottom:12px!important;left:18px!important;right:18px!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;min-height:58px;direction:ltr;display:grid!important;grid-template-columns:1fr auto 1fr;align-items:center}
html:root body dialog.xmax-camera-dialog .xmax-live-bar .xmax-elapsed{grid-column:1;justify-self:start;font-size:15px;text-shadow:0 1px 5px #000}
html:root body dialog.xmax-camera-dialog .xmax-live-bar [data-stop]{grid-column:2;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important}
html:root body dialog.xmax-camera-dialog .xmax-live-bar .xmax-camera-switch{grid-column:3;justify-self:end;background:transparent!important}
.xmax-camera-dialog [data-stop]>span{width:18px;height:18px}

/* Browser try-on overlays must not cover the stopped-frame preview. */
html:root body dialog.xmax-try-dialog .vton-btn{display:none!important;pointer-events:none!important}

html:root body dialog.xmax-photo-dialog{position:relative;min-height:180px;padding:48px 16px 16px;overflow:hidden}.xmax-photo-dialog [data-controls],.xmax-photo-dialog h2{display:none!important}.xmax-photo-dialog:not(.xmax-photo-result) .xmax-stage{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;pointer-events:none}.xmax-photo-dialog:not(.xmax-photo-result) [role=status]{position:relative;z-index:2;display:grid;place-items:center;min-height:100px;text-align:center}.xmax-photo-dialog.xmax-photo-result{min-height:0}.xmax-photo-dialog.xmax-photo-result .xmax-stage{aspect-ratio:auto;margin:0;background:transparent}.xmax-photo-result .xmax-stage img{display:block;width:100%;height:auto;max-height:75dvh;object-fit:contain}

html:root body dialog.xmax-photo-dialog{padding:48px 8px 8px!important;box-sizing:border-box!important;max-height:calc(100dvh - 24px)!important}html:root body dialog.xmax-photo-dialog>header{height:0!important;min-height:0!important;margin:0!important;padding:0!important}html:root body dialog.xmax-photo-dialog>header>[data-close]{top:4px!important;left:4px!important;right:auto!important}html:root body dialog.xmax-photo-result .xmax-stage{margin:0!important;padding:0!important;border-radius:12px}html:root body dialog.xmax-photo-result .xmax-stage img{max-height:calc(100dvh - 88px)!important}html:root body dialog.xmax-photo-result [role=status]{display:none!important}

/* Final photo fills its preview shell; close floats over the upper left. */
html:root body dialog.xmax-photo-dialog.xmax-photo-result{padding:0!important;min-height:0!important;background:#111!important}html:root body dialog.xmax-photo-dialog.xmax-photo-result>header>[data-close]{position:absolute!important;top:8px!important;left:8px!important;z-index:10!important;border-radius:50%!important;background:rgba(255,255,255,.9)!important;color:#111!important}html:root body dialog.xmax-photo-dialog.xmax-photo-result .xmax-stage{border-radius:inherit!important;background:#111!important}html:root body dialog.xmax-photo-dialog.xmax-photo-result .xmax-stage img{max-height:calc(100dvh - 24px)!important;border-radius:inherit;object-fit:contain!important}

/* Opaque loading mask leaves the underlying RTC renderers active. */
html:root body dialog.xmax-photo-dialog:not(.xmax-photo-result){min-height:170px!important;padding:48px 12px 12px!important}html:root body dialog.xmax-photo-dialog:not(.xmax-photo-result) .xmax-stage{opacity:1!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important}html:root body dialog.xmax-photo-dialog:not(.xmax-photo-result) [role=status]{position:absolute!important;inset:0!important;z-index:5!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--color-panel,#fff);margin:0!important;padding:48px 12px 24px!important;box-sizing:border-box}html:root body dialog.xmax-photo-dialog:not(.xmax-photo-result) [role=status]::before{content:"";width:24px;height:24px;border:2px solid #d9d5d9;border-top-color:#282128;border-radius:50%;animation:photo-preview-spin .8s linear infinite}@keyframes photo-preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){html:root body dialog.xmax-photo-dialog [role=status]::before{animation:none!important}}

html:root body dialog.xmax-photo-error [role=status]::before{display:none!important}html:root body dialog.xmax-photo-error [role=status]{position:relative!important;inset:auto!important;min-height:100px!important;padding:24px 12px!important;white-space:normal;overflow-wrap:anywhere}html:root body dialog.xmax-photo-error .xmax-stage{display:none!important}

/* Live camera switch stays white while connection preparation remains silent. */
html:root body dialog.xmax-camera-dialog .xmax-camera-switch{color:#fff!important;opacity:1!important}

/* Keep the preview close target equally inset from the top and left edges. */
html:root body dialog.xmax-try-dialog.xmax-photo-dialog>header>[data-close]{
 position:absolute!important;inset:auto!important;top:16px!important;left:16px!important;right:auto!important;bottom:auto!important;
 width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;
 margin:0!important;transform:none!important;translate:none!important;display:grid!important;place-items:center!important;z-index:30!important;
}

/* The same package action is used for empty trial and paid wallets. */
html:root body dialog.xmax-credit-dialog{background:#fff!important;color:#211c21!important;padding:64px 24px 28px!important;text-align:center}
html:root body dialog.xmax-credit-dialog [data-controls]{display:flex!important;justify-content:center!important;margin:24px 0}
html:root body dialog.xmax-credit-dialog .xmax-buy-credit{background:#111!important;color:#fff!important;border:1px solid #111!important;min-width:180px;text-align:center}
html:root[data-theme="dark"] body dialog.xmax-credit-dialog{background:#171417!important;color:#fff!important}
html:root[data-theme="dark"] body dialog.xmax-credit-dialog .xmax-buy-credit{background:#fff!important;color:#111!important;border-color:#fff!important}
html:root body .balance-buy-credit{display:block;background:#111!important;color:#fff!important;border:1px solid #111!important;border-radius:999px;padding:12px 20px;text-align:center;text-decoration:none}
html:root[data-theme="dark"] body .balance-buy-credit{background:#fff!important;color:#111!important;border-color:#fff!important}
