import { style } from '@vanilla-extract/css'; import { DefaultReset } from 'folds'; export const Root = style([ DefaultReset, { position: 'fixed', inset: 0, zIndex: 200, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 16, boxSizing: 'border-box', }, ]); export const Backdrop = style([ DefaultReset, { position: 'absolute', inset: 0, backgroundColor: 'rgba(0, 0, 0, 0.72)', backdropFilter: 'blur(18px)', WebkitBackdropFilter: 'blur(18px)', cursor: 'zoom-out', }, ]); export const Stage = style([ DefaultReset, { position: 'relative', zIndex: 1, display: 'flex', flexDirection: 'column', alignItems: 'stretch', gap: 10, maxWidth: 'min(96vw, 1100px)', maxHeight: 'min(92vh, 900px)', width: '100%', minWidth: 0, pointerEvents: 'none', }, ]); export const Chrome = style([ DefaultReset, { display: 'flex', alignItems: 'center', gap: 8, width: '100%', minWidth: 0, color: '#fff', pointerEvents: 'auto', }, ]); export const Title = style([ DefaultReset, { flex: 1, minWidth: 0, fontSize: 13, fontWeight: 600, lineHeight: '18px', color: 'rgba(255, 255, 255, 0.9)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', }, ]); export const ChromeButton = style([ DefaultReset, { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, padding: 6, border: 'none', borderRadius: 4, background: 'rgba(0, 0, 0, 0.4)', color: '#fff', cursor: 'pointer', }, ]); export const Frame = style([ DefaultReset, { position: 'relative', alignSelf: 'center', maxWidth: 'min(96vw, 1100px)', maxHeight: 'min(80vh, 820px)', overflow: 'hidden', cursor: 'zoom-in', touchAction: 'none', pointerEvents: 'auto', selectors: { '&[data-zoomed]': { cursor: 'zoom-out', overflow: 'visible', }, '&[data-pannable]': { cursor: 'grab', }, '&[data-dragging]': { cursor: 'grabbing', }, }, }, ]); export const Image = style([ DefaultReset, { display: 'block', borderRadius: 8, background: 'transparent', transform: 'translate(var(--img-tx, 0px), var(--img-ty, 0px)) scale(var(--img-zoom, 1))', transformOrigin: '0 0', userSelect: 'none', }, ]);