.ttv-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	max-width: 1100px;
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1e1e1e;
}

.ttv-panel {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 20px 22px;
	box-sizing: border-box;
}

.ttv-controls {
	flex: 1 1 380px;
	min-width: 320px;
}

.ttv-preview {
	flex: 1 1 320px;
	min-width: 300px;
	text-align: center;
}

.ttv-heading {
	margin: 18px 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: #111;
}
.ttv-heading:first-child { margin-top: 0; }

.ttv-hint {
	font-size: 12px;
	color: #767676;
	margin: 4px 0 10px;
}

.ttv-file-btn {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	padding: 9px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
}
.ttv-file-btn input { display: none; }

.ttv-image-list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ttv-image-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f7f7f7;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 8px 10px;
}

.ttv-image-item img,
.ttv-thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.15s ease;
}
.ttv-thumb:hover { border-color: #2271b1; }

.ttv-preview-thumb-btn {
	flex-shrink: 0;
	background: #f0f0f0;
	border: 1px solid #d3d3d3;
	border-radius: 6px;
	width: 30px;
	height: 30px;
	font-size: 14px;
	cursor: pointer;
	line-height: 1;
}
.ttv-preview-thumb-btn:hover { background: #e2e2e2; }

.ttv-image-item .ttv-item-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
	align-items: center;
}

.ttv-image-item select,
.ttv-image-item input[type="number"] {
	font-size: 12px;
	padding: 4px 6px;
	border-radius: 5px;
	border: 1px solid #d3d3d3;
}
.ttv-image-item input[type="number"] { width: 56px; }

.ttv-remove-btn {
	background: none;
	border: none;
	color: #b32d2e;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 4px;
}

.ttv-textarea,
.ttv-input,
.ttv-select {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 10px;
	border: 1px solid #d3d3d3;
	border-radius: 6px;
	font-size: 13px;
	font-family: inherit;
}

.ttv-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}
.ttv-row label {
	flex: 1 1 150px;
	font-size: 12px;
	font-weight: 600;
	color: #444;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ttv-checkbox-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
	cursor: pointer;
}
.ttv-checkbox-row input { width: 16px; height: 16px; }

.ttv-optional {
	font-weight: 400;
	color: #999;
	font-size: 11px;
}

.ttv-item-caption {
	width: 100%;
	box-sizing: border-box;
	font-size: 12px;
	padding: 6px 8px;
	border: 1px solid #d3d3d3;
	border-radius: 5px;
	resize: vertical;
	min-height: 34px;
	margin-top: 6px;
}

.ttv-item-tag {
	font-size: 12px;
	padding: 5px 7px;
	border: 1px solid #d3d3d3;
	border-radius: 5px;
	width: 110px;
}

.ttv-primary-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: #1a7f37;
	color: #fff;
	border: none;
	padding: 12px 16px;
	border-radius: 7px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 20px;
	text-decoration: none;
	box-sizing: border-box;
}
.ttv-primary-btn:hover { background: #146c2e; color: #fff; }
.ttv-primary-btn:disabled { background: #9bbfa6; cursor: not-allowed; }

.ttv-secondary-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: #f0f0f0;
	color: #1e1e1e;
	border: 1px solid #d3d3d3;
	padding: 10px 16px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 10px;
}

.ttv-download-btn { background: #a4353a; }
.ttv-download-btn:hover { background: #8c2c30; }

.ttv-progress-wrap {
	margin-top: 12px;
	background: #eee;
	border-radius: 6px;
	overflow: hidden;
	position: relative;
	height: 26px;
}
.ttv-progress-bar {
	height: 100%;
	width: 0%;
	background: #2271b1;
	transition: width 0.15s linear;
}
.ttv-progress-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #1e1e1e;
	font-weight: 600;
}

.ttv-canvas-frame {
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	display: inline-block;
	max-width: 100%;
}

#ttv-canvas,
#ttv-video-preview {
	max-width: 100%;
	height: auto;
	display: block;
	max-height: 520px;
}

.ttv-format-note {
	font-size: 11px;
	color: #888;
	margin-top: 14px;
	line-height: 1.5;
}
