.woo-vto-box {
	margin-top: 18px;
	padding: 16px;
	border: 1px solid #dcdcde;
	background: #fff;
}

.woo-vto-box h3,
.woo-vto-box h4 {
	margin: 0 0 10px;
}

.woo-vto-box p {
	margin: 0 0 10px;
}

.woo-vto-upload-row {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.woo-vto-hidden-file-input {
	position: absolute;
	left: -9999px;
	opacity: 0;
	pointer-events: none;
}

.woo-vto-photos-panel {
	margin-top: 14px;
	margin-bottom: 12px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
}

.woo-vto-photos-panel summary {
	cursor: pointer;
	padding: 10px 12px;
	font-weight: 600;
}

.woo-vto-photos-panel-content {
	padding: 0 12px 12px;
}

.woo-vto-help {
	margin-bottom: 10px;
	font-size: 13px;
	color: #50575e;
}

.woo-vto-photo-list {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.woo-vto-photo-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	font-size: 12px;
	cursor: pointer;
	width: 96px;
	flex: 0 0 96px;
	position: relative;
}

#woo-vto-root .woo-vto-photo-frame {
	display: block;
	width: 96px;
	height: 96px;
	overflow: hidden;
	border-radius: 6px;
	border: 2px solid #d0d7de;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
	position: relative;
}

#woo-vto-root .woo-vto-photo-item .woo-vto-delete-photo {
	width: 100%;
	font-size: 11px;
	line-height: 1.2;
	padding: 4px 8px;
	min-height: auto;
	text-align: center;
}

#woo-vto-root .woo-vto-photo-thumb {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
}

#woo-vto-root .woo-vto-photo-item input[type='radio'] {
	position: absolute;
	top: 6px;
	left: 6px;
	width: 18px;
	height: 18px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

#woo-vto-root .woo-vto-photo-item .woo-vto-photo-frame::before {
	content: '';
	position: absolute;
	top: 6px;
	left: 6px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.52);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
	transition: all 0.18s ease;
}

#woo-vto-root .woo-vto-photo-item .woo-vto-photo-frame::after {
	content: '';
	position: absolute;
	top: 9px;
	left: 12px;
	width: 6px;
	height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg) scale(0);
	transform-origin: center;
	transition: transform 0.18s ease;
}

#woo-vto-root .woo-vto-photo-item:hover .woo-vto-photo-frame {
	border-color: #93c5fd;
}

#woo-vto-root .woo-vto-photo-item input[type='radio']:checked + .woo-vto-photo-frame {
	border-color: #2271b1 !important;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
	transform: translateY(-1px);
}

#woo-vto-root .woo-vto-photo-item input[type='radio']:checked + .woo-vto-photo-frame::before {
	background: #2271b1;
	border-color: #fff;
}

#woo-vto-root .woo-vto-photo-item input[type='radio']:checked + .woo-vto-photo-frame::after {
	transform: rotate(45deg) scale(1);
}

.woo-vto-status {
	min-height: 0;
	margin-bottom: 6px;
	font-size: 14px;
}

.woo-vto-status.is-generating {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #bfdbfe;
	background: #eff6ff;
	color: #0f3b75;
	font-weight: 700;
	border-radius: 999px;
}

.woo-vto-status.is-generating::before {
	content: '';
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #2271b1;
	animation: woo-vto-pulse 0.9s ease-in-out infinite;
}

.woo-vto-status.is-error {
	color: #b32d2e;
}

@keyframes woo-vto-pulse {
	0% { transform: scale(0.75); opacity: 0.45; }
	50% { transform: scale(1); opacity: 1; }
	100% { transform: scale(0.75); opacity: 0.45; }
}

#woo-vto-result img {
	margin-top: 6px;
	margin-bottom: 10px;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.woo-vto-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}

.woo-vto-gallery-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

#woo-vto-root .woo-vto-delete-result {
	width: 100%;
	font-size: 11px;
	line-height: 1.2;
	padding: 4px 8px;
	min-height: auto;
	text-align: center;
}

#woo-vto-gallery {
	margin-bottom: 12px;
}

.woo-vto-gallery-thumb,
.woo-vto-gallery-item a {
	display: block;
}

.woo-vto-gallery-thumb {
	overflow: hidden;
	border-radius: 6px;
}

.woo-vto-gallery-thumb img,
.woo-vto-gallery-thumb video,
.woo-vto-gallery-item img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

.woo-vto-gallery-item figcaption {
	font-size: 12px;
	line-height: 1.35;
	margin-top: 6px;
}

.woo-vto-empty {
	font-size: 13px;
	color: #50575e;
}

.woo-vto-account-group {
	margin-bottom: 22px;
	padding: 14px 16px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}

.woo-vto-account-group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.woo-vto-account-group-title {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.woo-vto-account-group-title img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.woo-vto-account-group-title h4 {
	margin: 0;
	line-height: 1.25;
}

.woo-vto-account-product-link {
	white-space: nowrap;
}

.woo-vto-account-rail {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
}

.woo-vto-account-card {
	flex: 0 0 170px;
	padding: 10px;
	border: 1px solid #eceff1;
	border-radius: 8px;
	background: #fff;
}

.woo-vto-account-card .woo-vto-gallery-thumb {
	margin-bottom: 8px;
}

.woo-vto-account-card .woo-vto-gallery-thumb img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.woo-vto-account-card .woo-vto-gallery-thumb video {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
	display: block;
}

.woo-vto-account-delete-form {
	margin: 0;
}

.woo-vto-account-delete-form .button {
	width: 100%;
	font-size: 12px;
	line-height: 1.2;
	padding: 6px 8px;
	min-height: auto;
	text-align: center;
}

.woo-vto-modal[hidden] {
	display: none;
}

.woo-vto-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	padding: 24px;
}

.woo-vto-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.woo-vto-modal-content {
	position: relative;
	z-index: 1;
	max-width: min(1120px, 96vw);
	max-height: calc(100vh - 48px);
	margin: 0 auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.woo-vto-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #eceff1;
}

.woo-vto-modal-header h4 {
	margin: 0;
	font-size: 19px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: 0.01em;
}

.woo-vto-modal-x {
	border: 0;
	background: transparent;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #334155;
}

.woo-vto-modal-x:hover {
	background: #f1f5f9;
}

.woo-vto-modal-body {
	padding: 14px 16px;
	min-height: 0;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
}

.woo-vto-modal-body img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 230px);
	object-fit: contain;
	border-radius: 10px;
	background: #fff;
}

.woo-vto-modal-body video {
	display: block;
	width: min(100%, 960px);
	max-height: calc(100vh - 230px);
	border-radius: 10px;
	background: #000;
}

.woo-vto-modal-body img[hidden],
.woo-vto-modal-body video[hidden] {
	display: none !important;
}

.woo-vto-modal-footer {
	display: flex;
	justify-content: flex-end;
	padding: 12px 16px 16px;
	border-top: 1px solid #eceff1;
	background: #fff;
}

.woo-vto-modal-close {
	min-width: 120px;
}

body.woo-vto-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.woo-vto-modal {
		padding: 10px;
	}

	.woo-vto-modal-content {
		max-height: calc(100vh - 20px);
		border-radius: 10px;
	}

	.woo-vto-modal-body img {
		max-height: calc(100vh - 210px);
	}

	.woo-vto-modal-body video {
		max-height: calc(100vh - 210px);
	}

	.woo-vto-account-group-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.woo-vto-account-product-link {
		width: 100%;
		text-align: center;
	}

	.woo-vto-account-card {
		flex-basis: 146px;
	}
}
