/* ============================================================================
 * ai-video-input.css — AI 视频生成区块的视频特化样式
 *
 * 复用 ai-image-input.css 的全套基础类 (.ai-block-frame / .ai-block-card /
 * .ai-block-tabs / .ai-block-select / .ai-block-result-* 等), 只补充视频特化:
 *   - .ai-video-mode-switch  segmented control (reference / first_last_frame)
 *   - .ai-video-frame-zone   首尾帧并列上传区 (双卡 + 中间 swap 按钮)
 *   - .ai-video-audio-toggle 是否带音频开关
 *
 * mustache 中需要同时引入 ai-image-input.css 与 ai-video-input.css 两个文件,
 * 顺序无关 (前者声明 :root 变量, 后者只用 .ai-video-* 私有类名, 不冲突).
 * ========================================================================== */

/* ──────────────────────────── 模式切换 (segmented control) ─────────────────────────── */

.ai-video-field-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ai-video-mode-switch {
	display: inline-flex;
	gap: 4px;
	padding: 3px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 999px;
}
.ai-video-mode-switch-btn {
	padding: 4px 10px;
	font-size: 12px;
	color: var(--ai-text-muted);
	background: transparent;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease;
}
.ai-video-mode-switch-btn:hover {
	color: var(--ai-text);
}
.ai-video-mode-switch-btn.is-active {
	background: var(--ai-surface-2);
	color: var(--ai-text);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ──────────────────────────── 首尾帧上传区 ─────────────────────────── */

.ai-video-frame-zone {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
	gap: 8px;
}
.ai-video-frame-card {
	position: relative;
	min-height: 96px;
	border: 1px dashed var(--ai-border-strong);
	border-radius: 10px;
	background: rgba(12, 12, 15, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 160ms ease, background 160ms ease;
}
.ai-video-frame-card:hover {
	border-color: var(--ai-text-muted);
}
.ai-video-frame-card.is-drag-over {
	border-color: var(--ai-text);
	background: rgba(255, 255, 255, 0.04);
}
.ai-video-frame-card img {
	width: 100%;
	height: 100%;
	min-height: 96px;
	max-height: 140px;
	object-fit: cover;
	display: block;
}
.ai-video-frame-placeholder {
	font-size: 13px;
	color: var(--ai-text-muted);
	padding: 12px;
	text-align: center;
}
.ai-video-frame-swap {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--ai-border-strong);
	background: var(--ai-surface-2);
	color: var(--ai-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	transition: background 160ms ease, transform 160ms ease;
}
.ai-video-frame-swap:hover:not(:disabled) {
	background: var(--ai-surface-3);
	transform: rotate(180deg);
}
.ai-video-frame-swap:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.ai-video-frame-swap svg {
	width: 16px;
	height: 16px;
}

/* ──────────────────────────── 音频开关 ─────────────────────────── */

.ai-video-audio-toggle {
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: var(--ai-surface-3);
	border: none;
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 160ms ease;
}
.ai-video-audio-toggle.is-on {
	background: var(--ai-text);
}
.ai-video-audio-toggle-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 160ms ease, background 160ms ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ai-video-audio-toggle.is-on .ai-video-audio-toggle-thumb {
	transform: translateX(18px);
	background: var(--ai-surface);
}
