/* ==========================================================================
   Qamuz music-video studio (Crear video): start screen, storyboard editor,
   preview stage and export. Tokens from qamuz-app.css.
   ========================================================================== */

.qz-mv {
	--qz-mv-gap: 24px;
	color: var(--qz-ink);
}

.qz-mv__loading {
	padding: 40px 0;
	color: var(--qz-soft);
}

.qz-mv__h {
	margin: 0 0 16px;
	color: var(--qz-ink);
	font: 700 22px/1.2 var(--qz-display);
}

.qz-input {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--qz-line);
	border-radius: 10px;
	background: var(--qz-bg);
	color: var(--qz-ink);
	font: 400 14px/1.5 var(--qz-sans);
	resize: vertical;
}

.qz-input:focus {
	outline: none;
	border-color: var(--qz-accent);
}

.qz-input + .qz-input {
	margin-top: 8px;
}

.qz-mv .qz-select {
	width: 100%;
}

.qz-mv__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 6px;
}

/* ---------- start screen ---------- */

.qz-mv__start {
	display: grid;
	grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.qz-mv__new,
.qz-mv__mine {
	padding: 20px;
	border: 1px solid var(--qz-line);
	border-radius: 16px;
	background: var(--qz-side);
}

.qz-mv__or {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	color: var(--qz-soft);
	font-size: 13px;
}

.qz-mv__file {
	color: var(--qz-accent);
	font: 500 12px/1.3 var(--qz-mono);
	word-break: break-all;
}

.qz-mv .qz-seg {
	flex-wrap: wrap;
}

.qz-mv__projects {
	display: grid;
	gap: 10px;
}

.qz-mv__proj {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 10px;
	border: 1px solid var(--qz-line);
	border-radius: 12px;
	background: var(--qz-surface);
}

.qz-mv__thumb {
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	background: linear-gradient(140deg, #0f2a33, #0b0f16) center / cover no-repeat;
}

.qz-mv__proj-info strong {
	display: block;
	overflow: hidden;
	font: 700 15px/1.3 var(--qz-sans);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.qz-mv__proj-info small {
	color: var(--qz-soft);
	font-size: 12px;
}

.qz-mv__proj-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.qz-mv__proj-actions .qz-btn {
	min-height: 36px;
}

/* ---------- editor ---------- */

.qz-mv__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.qz-mv__title {
	flex: 1;
	min-width: 0;
	padding: 6px 10px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--qz-ink);
	font: 700 24px/1.2 var(--qz-display);
}

.qz-mv__title:hover,
.qz-mv__title:focus {
	outline: none;
	border-color: var(--qz-line);
	background: var(--qz-surface);
}

.qz-mv__saved {
	color: var(--qz-soft);
	font: 500 12px/1 var(--qz-mono);
	white-space: nowrap;
}

.qz-mv__editor {
	display: grid;
	grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
	gap: var(--qz-mv-gap);
	align-items: start;
}

.qz-mv__stage {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 12px;
}

.admin-bar .qz-mv__stage {
	top: 56px;
}

.qz-mv__screen {
	display: grid;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--qz-line);
	border-radius: 14px;
	background: #000;
}

.qz-mv__canvas {
	display: block;
	width: 100%;
	height: auto;
	max-height: 62vh;
	object-fit: contain;
}

.qz-mv__screen.is-9x16 .qz-mv__canvas {
	width: auto;
	max-width: 100%;
	height: 62vh;
}

.qz-mv__transport {
	display: flex;
	align-items: center;
	gap: 12px;
}

.qz-mv__transport input[type="range"] {
	flex: 1;
	accent-color: var(--qz-accent);
}

.qz-mv__song {
	margin: 0;
	color: var(--qz-soft);
	font-size: 13px;
}

.qz-mv__opts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	color: var(--qz-soft);
	font-size: 13px;
}

.qz-mv__opts .qz-select {
	width: auto;
	height: 34px;
	margin-left: 6px;
}

.qz-mv__panel {
	min-width: 0;
}

.qz-mv__panel > .qz-tabs {
	margin-bottom: 16px;
	border-bottom: 1px solid var(--qz-line);
}

.qz-mv__bulk {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.qz-mv__bulk .qz-help {
	flex-basis: 100%;
	margin: 0;
}

/* scene cards */

.qz-mv__scenes {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qz-mv__scene {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	gap: 16px;
	padding: 14px;
	border: 1px solid var(--qz-line);
	border-radius: 14px;
	background: var(--qz-surface);
}

.qz-mv__scene:focus-within {
	border-color: var(--qz-line-strong);
}

.qz-mv__shot {
	position: relative;
	align-self: start;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	background: linear-gradient(140deg, #13202b, #0b0f16);
}

.qz-mv__shot img,
.qz-mv__shot video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.qz-mv__shot.is-busy::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%) 0 0 / 220% 100%;
	animation: qz-shimmer 1.4s linear infinite;
}

.qz-mv__state {
	position: absolute;
	right: 6px;
	bottom: 6px;
	left: 6px;
	z-index: 1;
	padding: 4px 6px;
	border-radius: 6px;
	background: rgba(7, 10, 16, 0.78);
	color: var(--qz-accent);
	font: 600 11px/1.3 var(--qz-mono);
}

.qz-mv__state.is-error {
	color: var(--qz-danger);
}

.qz-mv__body {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.qz-mv__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: var(--qz-soft);
}

.qz-mv__head .qz-icon-btn {
	width: 30px;
	height: 30px;
}

.qz-mv__head .qz-icon-btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.qz-mv__n {
	color: var(--qz-accent);
	font: 700 14px/1 var(--qz-mono);
}

.qz-mv__time {
	width: 66px;
	padding: 4px 6px;
	border: 1px solid var(--qz-line);
	border-radius: 6px;
	background: var(--qz-bg);
	color: var(--qz-ink);
	font: 500 12px/1.2 var(--qz-mono);
	text-align: center;
}

.qz-mv__spacer {
	flex: 1;
}

.qz-mv__f {
	display: grid;
	gap: 4px;
}

.qz-mv__f > span {
	color: var(--qz-soft);
	font: 600 12px/1.2 var(--qz-sans);
}

.qz-mv__f input,
.qz-mv__f textarea {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--qz-line);
	border-radius: 8px;
	background: var(--qz-bg);
	color: var(--qz-ink);
	font: 400 13px/1.45 var(--qz-sans);
	resize: vertical;
}

.qz-mv__f input:focus,
.qz-mv__f textarea:focus,
.qz-mv__time:focus {
	outline: none;
	border-color: var(--qz-accent);
}

.qz-mv__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.qz-seg--sm span {
	padding: 6px 10px;
	font-size: 12px;
}

/* export */

.qz-mv__progress {
	height: 6px;
	margin: 16px 0;
	overflow: hidden;
	border-radius: 6px;
	background: var(--qz-line);
}

.qz-mv__progress span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--qz-accent);
	transition: width 0.3s linear;
}

.qz-mv__result {
	display: grid;
	gap: 12px;
	margin-top: 16px;
}

.qz-mv__final {
	width: 100%;
	max-height: 60vh;
	border-radius: 12px;
	background: #000;
}

@media (max-width: 1199px) {
	.qz-mv__editor {
		grid-template-columns: minmax(0, 1fr);
	}

	.qz-mv__stage {
		position: static;
	}
}

@container qz (max-width: 900px) {
	.qz-mv__editor {
		grid-template-columns: minmax(0, 1fr);
	}

	.qz-mv__stage {
		position: static;
	}
}

@media (max-width: 899px) {
	.qz-mv__start {
		grid-template-columns: minmax(0, 1fr);
	}
}

@container qz (max-width: 640px) {
	.qz-mv__start {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 599px) {
	.qz-mv__scene {
		grid-template-columns: minmax(0, 1fr);
	}

	.qz-mv__proj {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.qz-mv__proj-actions {
		grid-column: 1 / -1;
		justify-content: flex-end;
	}
}

@container qz (max-width: 480px) {
	.qz-mv__scene {
		grid-template-columns: minmax(0, 1fr);
	}

	.qz-mv__proj {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.qz-mv__proj-actions {
		grid-column: 1 / -1;
		justify-content: flex-end;
	}
}
