/* "VidShop videos" block in the WooCommerce block product editor. */
.vsfw-pev {
	--vsfw-pev-text: #1e1e1e;
	--vsfw-pev-muted: #757575;
	--vsfw-pev-line: #e0e0e0;
	--vsfw-pev-accent: var(--wp-admin-theme-color, #3858e9);
	color: var(--vsfw-pev-text);
}

/* "Display" and "Videos" groups. */
.vsfw-pev__group {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.vsfw-pev__group + .vsfw-pev__group {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--vsfw-pev-line);
}

.vsfw-pev__heading {
	margin: 0 0 12px;
	padding: 0;
	color: var(--vsfw-pev-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

/* Three selects side by side when there is room, stacked on narrow screens. */
.vsfw-pev__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

/* WooCommerce's toggle resets its outline; give keyboard users one back. */
.vsfw-pev__more .woocommerce-collapsible-content__toggle:focus-visible {
	outline: 2px solid var(--vsfw-pev-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.vsfw-pev__note {
	margin: 16px 0 0;
	color: var(--vsfw-pev-muted);
	font-size: 12px;
}

.vsfw-pev__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 8px 0 0;
}

.vsfw-pev__status {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 12px;
}

.vsfw-pev__status p {
	flex: 1 1 260px;
	margin: 0;
	color: var(--vsfw-pev-muted);
}

.vsfw-pev__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--vsfw-pev-line);
	border-radius: 4px;
}

.vsfw-pev__row {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 0;
	padding: 8px 8px 8px 4px;
	background: #fff;
}

.vsfw-pev__row + .vsfw-pev__row {
	border-top: 1px solid var(--vsfw-pev-line);
}

.vsfw-pev__row.is-dragging {
	z-index: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.vsfw-pev__handle {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 44px;
	padding: 0;
	color: var(--vsfw-pev-muted);
	background: none;
	border: 0;
	border-radius: 2px;
	cursor: grab;
	touch-action: none;
}

.vsfw-pev__handle:focus-visible {
	outline: 2px solid var(--vsfw-pev-accent);
	outline-offset: -2px;
}

/* Portrait like the videos on the product page; the badge is its place in the row. */
.vsfw-pev__thumb {
	position: relative;
	flex-shrink: 0;
	width: 36px;
	height: 64px;
	overflow: hidden;
	background: #f0f0f0;
	border-radius: 4px;
}

.vsfw-pev__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vsfw-pev__badge {
	position: absolute;
	bottom: 3px;
	left: 3px;
	min-width: 16px;
	padding: 0 4px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
	background: var(--vsfw-pev-accent);
	border-radius: 8px;
}

.vsfw-pev__pick {
	flex: 1;
	min-width: 0;
}

.vsfw-pev__pick .components-checkbox-control__label {
	overflow-wrap: anywhere;
}

.vsfw-pev__move {
	display: flex;
	flex-shrink: 0;
	gap: 2px;
}

.vsfw-pev__move .components-button {
	min-width: 32px;
	min-height: 32px;
}

/* A video that is off. */
.vsfw-pev__row.is-off .vsfw-pev__thumb {
	filter: grayscale(1);
	opacity: 0.5;
}

.vsfw-pev__empty p {
	margin: 0 0 12px;
	color: var(--vsfw-pev-muted);
}

@media (prefers-reduced-motion: reduce) {
	.vsfw-pev__row {
		transition: none !important;
	}
}
