/**
 * Redirect Cleanup Admin Page Styles
 */

.redirect-cleanup-admin-page {
	max-width: 1200px;
	margin: 20px 0;
}

.redirect-cleanup-header {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.redirect-cleanup-stats {
	margin: 20px 0;
	background: #f0f0f1;
}

.redirect-cleanup-pagination {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 20px 0;
	flex-wrap: wrap;
}

.redirect-cleanup-page-info {
	margin: 0 10px;
	font-weight: 500;
}

.redirect-cleanup-table-wrapper {
	margin: 20px 0;
	overflow-x: auto;
	position: relative;

	.redirect-cleanup-loading-overlay {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(255, 255, 255, 0.8);
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 10;
	}

	table {
		width: 100%;
		border-collapse: collapse;
	}

	th {
		text-align: left;
		padding: 10px;
		background: #f6f7f7;
		border-bottom: 1px solid #c3c4c7;
		font-weight: 600;

		&:nth-child(3) {
			width: 120px;
			min-width: 120px;
		}
	}

	td {
		padding: 10px;
		border-bottom: 1px solid #dcdcde;

		&:nth-child(3) {
			width: 120px;
			min-width: 120px;
		}
	}

	// Chain redirects table specific styles
	.redirect-cleanup-chain-table {
		th,
		td {
			&:nth-child(3),
			&:nth-child(4) {
				width: 60px;
				min-width: 60px;
			}
		}
	}

	code {
		background: #f0f0f1;
		padding: 2px 6px;
		border-radius: 3px;
		font-size: 13px;
		word-break: break-all;
	}
}

.redirect-type {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;

	&-301 {
		background: #00a32a;
		color: #fff;
	}

	&-302 {
		background: #dba617;
		color: #fff;
	}
}

.redirect-cleanup-empty {
	margin: 40px 0;
	padding: 20px;
	text-align: center;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	color: #646970;
}

.redirect-cleanup-found-in-list {
	margin: 0;
	padding: 0;
	list-style: none;

	li {
		margin: 4px 0;

		&:first-child {
			margin-top: 0;
		}

		&:last-child {
			margin-bottom: 0;
		}
	}

	a {
		color: #2271b1;
		text-decoration: none;

		&:hover {
			color: #135e96;
			text-decoration: underline;
		}
	}
}

.redirect-cleanup-not-found {
	color: #646970;
	font-style: italic;
}

// Progress bar styles.
.redirect-cleanup-progress {
	margin: 20px 0;
	padding: 15px;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.redirect-cleanup-progress-bar {
	height: 20px;
	background: #dcdcde;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 10px;
}

.redirect-cleanup-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2271b1, #135e96);
	border-radius: 10px;
	transition: width 0.3s ease;
}

.redirect-cleanup-progress-text {
	font-size: 13px;
	color: #1d2327;
}

.redirect-cleanup-progress-stats {
	color: #646970;
}

// Processing results styles.
.redirect-cleanup-results {
	margin: 20px 0;
	padding: 20px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	border-radius: 4px;

	h3 {
		margin: 0 0 10px;
		font-size: 14px;
		font-weight: 600;
		color: #1d2327;
	}

	h4 {
		margin: 15px 0 10px;
		font-size: 13px;
		font-weight: 600;
		color: #1d2327;
	}

	p {
		margin: 0 0 10px;
		color: #1d2327;
	}
}

.redirect-cleanup-results-details {
	ul {
		margin: 0;
		padding: 0 0 0 20px;
		list-style: disc;
	}

	li {
		margin: 5px 0;
		font-size: 13px;
	}

	a {
		color: #2271b1;
		text-decoration: none;

		&:hover {
			color: #135e96;
			text-decoration: underline;
		}
	}
}

.redirect-cleanup-redirect-type-selector {
	margin-bottom: 16px;
	max-width: 200px;
}
