/* Shared reorder UI — list table drag-and-drop */

/* Drag handle injected inline before each sortable row's title. */
.wpps-reorder-lt-handle {
	display: inline-block;
	vertical-align: middle;
	margin-right: 6px;
	color: #a7aaad;
	cursor: grab;
	line-height: 1;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	touch-action: none;
}

.wpps-reorder-lt-handle:hover {
	color: var(--wp-admin-theme-color, #2271b1);
}

.wpps-reorder-lt-handle:active {
	cursor: grabbing;
}

.wpps-reorder-lt-handle .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 18px;
	vertical-align: middle;
}

/* Make rows read as draggable and highlight on hover. */
body.wpps-reorder-list-table .wp-list-table tbody tr:hover {
	background: color-mix(in srgb, var(--wp-admin-theme-color, #2271b1) 4%, #fff);
}

body.wpps-reorder-list-table .wp-list-table tbody tr.ui-sortable-helper {
	display: table;
	background: color-mix(in srgb, var(--wp-admin-theme-color, #2271b1) 8%, #fff);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

body.wpps-reorder-list-table .wp-list-table tbody tr.wpps-reorder-lt-dragging {
	opacity: 0.85;
}

body.wpps-reorder-list-table .wp-list-table tbody tr.wpps-reorder-lt-placeholder {
	outline: 2px dashed var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
	background: color-mix(in srgb, var(--wp-admin-theme-color, #2271b1) 6%, #fff);
}

body.wpps-reorder-list-table .wp-list-table tbody tr.wpps-reorder-lt-placeholder > * {
	visibility: hidden;
}

/* Save confirmation toast. */
.wpps-reorder-list-table-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100050;
	padding: 10px 14px;
	border-radius: 8px;
	background: #1d2327;
	color: #fff;
	font-size: 13px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.wpps-reorder-list-table-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.wpps-reorder-list-table-toast {
		transition: none;
	}
}
