.mvis-open-btn {
	display: inline-block;
	margin: 12px 0;
	padding: 12px 20px;
	background: #1d1d1f;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	cursor: pointer;
}
.mvis-open-btn:hover { background: #333; }

.mvis-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mvis-modal[hidden] { display: none; }

.mvis-modal-inner {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #000;
}

.mvis-close {
	position: absolute;
	top: 10px;
	right: 14px;
	z-index: 5;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 22px;
	cursor: pointer;
}

.mvis-top-bar {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 60px; /* leave room for the close button */
	z-index: 4;
	display: flex;
	align-items: center;
	pointer-events: none;
}
.mvis-top-bar > * { pointer-events: auto; }

.mvis-attr-selects-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mvis-attr-select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	color: #111;
	border: none;
	border-radius: 8px;
	padding: 10px 32px 10px 14px;
	font-size: 14px;
	font-weight: 600;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9'><path d='M1 1l6 6 6-6' stroke='%23111' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	max-width: 45vw;
	text-overflow: ellipsis;
}

.mvis-stage-wrap {
	position: relative;
	flex: 1;
	overflow: hidden;
	touch-action: none;
	background: #111;
}

.mvis-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0; /* actual pixels are drawn to the canvas each frame */
}

.mvis-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.mvis-status-screen {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	z-index: 2;
}
.mvis-status-screen[hidden] { display: none; }
.mvis-status-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mvis-status-screen p { max-width: 320px; font-size: 15px; margin: 0; }

.mvis-qr-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.mvis-qr-wrap[hidden] { display: none; }
.mvis-qr-wrap img { border-radius: 8px; background: #fff; padding: 8px; width: 160px; height: 160px; }
.mvis-qr-caption { font-size: 13px; color: #ccc; max-width: 260px; }

.mvis-drag-hint {
	position: absolute;
	bottom: 14px;
	left: 16px;
	right: 16px;
	text-align: center;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	text-shadow: 0 1px 3px rgba(0,0,0,0.7);
	z-index: 2;
	pointer-events: none;
}
.mvis-drag-hint[hidden] { display: none; }
