/**
 * Delete Duplicate Posts & Pages — Admin Styles
 *
 * Sections:
 *   1. Layout
 *   2. Progress bar
 *   3. Notices
 *   4. Filter bar
 *   5. Results table (Find Duplicates)
 *   6. Empty state
 *   7. Spinner
 *   8. Preview modal
 *   9. Pagination
 *  10. Logs page
 *  11. Settings page
 *
 * @package DDPP
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.ddpp-wrap .ddpp-scan-btn {
	margin-left: 8px;
}

/* ==========================================================================
   Progress bar
   ========================================================================== */

.ddpp-progress-wrap {
	margin: 16px 0;
}

.ddpp-progress-bar {
	background: #e0e0e0;
	border-radius: 4px;
	height: 8px;
	overflow: hidden;
	width: 100%;
}

.ddpp-progress-bar__inner {
	background: #2271b1;
	height: 100%;
	transition: width 0.3s ease;
	width: 0%;
}

.ddpp-progress-text {
	color: #555;
	font-size: 13px;
	margin: 6px 0 0;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.ddpp-notices .notice {
	margin: 12px 0;
}

/* ==========================================================================
   Filter bar
   ========================================================================== */

.ddpp-filter-bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0;
}

.ddpp-filter-bar select {
	max-width: 200px;
}

/* ==========================================================================
   Results table
   ========================================================================== */

.ddpp-results-table .column-cb {
	width: 2.2em;
}

.ddpp-results-table .column-type,
.ddpp-results-table .column-status {
	width: 8em;
}

.ddpp-results-table .column-author {
	width: 10em;
}

.ddpp-results-table .column-date {
	width: 9em;
}

.ddpp-results-table .column-actions {
	width: 12em;
}

/* Group header row */
.ddpp-group-header td {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	font-weight: 600;
	padding: 8px 12px;
}

.ddpp-group-header .ddpp-group-count {
	color: #666;
	font-size: 12px;
	font-weight: 400;
	margin-left: 6px;
}

/* "Keep" badge on the original post */
.ddpp-badge-keep {
	background: #00a32a;
	border-radius: 3px;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.5px;
	margin-left: 6px;
	padding: 2px 6px;
	text-transform: uppercase;
	vertical-align: middle;
}

/* "PRO" badge */
.ddpp-badge-pro {
	background: #dba617;
	border-radius: 3px;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.5px;
	margin-left: 4px;
	padding: 1px 5px;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Duplicate candidate row — slight highlight */
.ddpp-row-duplicate td {
	background: #fff8f0;
}

/* Title link — opens preview modal */
.ddpp-title-link {
	cursor: pointer;
	text-decoration: underline;
}

/* Row action buttons */
.ddpp-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ddpp-row-actions .button {
	font-size: 11px;
	height: auto;
	line-height: 1.4;
	padding: 2px 8px;
}

/* Whitelist button — toggled state */
.ddpp-btn-whitelist.is-whitelisted {
	color: #999;
}

/* ==========================================================================
   Empty state
   ========================================================================== */

.ddpp-empty-state td {
	text-align: center;
	padding: 40px;
}

.ddpp-empty-state__inner {
	color: #777;
}

.ddpp-empty-state__inner .dashicons {
	font-size: 48px;
	height: 48px;
	width: 48px;
}

.ddpp-empty-state__inner p {
	font-size: 14px;
	margin: 8px 0 0;
}

.ddpp-empty-state--clean {
	color: #46b450;
}

.ddpp-empty-state--clean .dashicons {
	color: #46b450;
}

/* Locked (Pro) options in the post type dropdown */
select option[data-pro-locked] {
	color: #999;
}

/* Sortable column headers */
.ddpp-results-table th.ddpp-sortable {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.ddpp-results-table th.ddpp-sortable:hover {
	background: #f0f0f1;
}

.ddpp-results-table th.ddpp-sorted {
	background: #f0f4fc;
}

.ddpp-sort-icon {
	font-size: 10px;
	color: #2271b1;
	margin-left: 2px;
}

/* View / Edit icon links next to post title */
.ddpp-title-icon {
	display: inline-block;
	vertical-align: middle;
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 1;
	margin-left: 5px;
	color: #aaa;
	text-decoration: none;
	transition: color .15s;
}

.ddpp-title-icon:hover {
	color: #2271b1;
}

.ddpp-title-icon.dashicons-edit:hover {
	color: #f0a500;
}

/* Match-type badge (Title / Slug) in group headers */
.ddpp-badge-method {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 1px 6px;
	border-radius: 3px;
	vertical-align: middle;
	margin: 0 4px;
}

.ddpp-badge-method--title {
	background: #e8f0fe;
	color: #1a56db;
	border: 1px solid #c3d4f9;
}

.ddpp-badge-method--slug {
	background: #fef3e2;
	color: #b45309;
	border: 1px solid #fcd88a;
}

.ddpp-badge-method--similarity {
	background: #f3e8ff;
	color: #7c3aed;
	border: 1px solid #ddd6fe;
}

/* ==========================================================================
   Spinner (inside scan button while scanning)
   ========================================================================== */

.ddpp-scan-btn .spinner {
	float: none;
	margin: 0 4px -4px 0;
	vertical-align: middle;
	visibility: visible;
}

/* ==========================================================================
   Preview modal
   ========================================================================== */

.ddpp-modal-overlay {
	align-items: center;
	background: rgba(0, 0, 0, 0.6);
	bottom: 0;
	display: flex;
	justify-content: center;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 100000;
}

.ddpp-modal {
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	max-height: 80vh;
	max-width: 680px;
	overflow-y: auto;
	padding: 24px;
	position: relative;
	width: 90%;
}

.ddpp-modal__close {
	background: none;
	border: none;
	color: #555;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 16px;
	top: 16px;
}

.ddpp-modal__close:hover {
	color: #000;
}

.ddpp-modal__title {
	font-size: 18px;
	margin: 0 32px 12px 0;
	padding: 0;
}

.ddpp-modal__meta {
	border-bottom: 1px solid #e0e0e0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 12px;
}

.ddpp-meta-item {
	font-size: 13px;
}

.ddpp-modal__thumbnail {
	margin-bottom: 16px;
}

.ddpp-modal__thumbnail img {
	border-radius: 3px;
	max-width: 100%;
}

.ddpp-modal__excerpt {
	border-left: 3px solid #e0e0e0;
	color: #444;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 20px;
	padding-left: 12px;
}

.ddpp-modal__excerpt--empty {
	color: #999;
}

.ddpp-modal__actions {
	display: flex;
	gap: 8px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.ddpp-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ddpp-pagination .button {
	min-width: 32px;
	text-align: center;
}

.ddpp-pagination .button.current-page {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

/* ==========================================================================
   10. Logs page
   ========================================================================== */

.ddpp-logs-table .column-date {
	width: 14em;
}

.ddpp-logs-table .column-user {
	width: 10em;
}

.ddpp-logs-table .column-action {
	width: 14em;
}

.ddpp-logs-table .column-type {
	width: 8em;
}

.ddpp-logs-empty {
	padding: 32px;
	text-align: center;
	color: #777;
}

/* Action badge */
.ddpp-action-badge {
	border-radius: 3px;
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
	padding: 2px 8px;
	text-transform: uppercase;
}

.ddpp-action-badge--warning {
	background: #fcf0e3;
	color: #996800;
}

.ddpp-action-badge--info {
	background: #e8f0fe;
	color: #1a73e8;
}

.ddpp-action-badge--error {
	background: #fce8e6;
	color: #c5221f;
}

.ddpp-action-badge--success {
	background: #e6f4ea;
	color: #137333;
}

.ddpp-action-badge--default {
	background: #f1f3f4;
	color: #444;
}

/* Post ID in log rows */
.ddpp-log-post-id {
	color: #999;
	font-size: 11px;
	margin-left: 4px;
}

.ddpp-log-post-id--deleted {
	color: #c5221f;
}

/* Free plan notice next to H1 */
.ddpp-free-notice {
	color: #777;
	font-size: 13px;
	margin-left: 12px;
}

/* Danger zone (clear logs button) */
.ddpp-danger-zone {
	margin-top: 20px;
}

/* ==========================================================================
   11. Settings page
   ========================================================================== */

.ddpp-value-highlight {
	font-weight: 600;
}

.ddpp-upgrade-prompt {
	color: #666;
	font-size: 13px;
}

/* Whitelist table */
.ddpp-whitelist-table {
	max-width: 700px;
	margin-bottom: 12px;
}

/* Pro upgrade box */
.ddpp-upgrade-box {
	background: #f0f6fc;
	border: 1px solid #c3d4e4;
	border-radius: 4px;
	margin-top: 24px;
	max-width: 600px;
	padding: 20px 24px;
}

.ddpp-upgrade-box h2 {
	margin-top: 0;
}

.ddpp-upgrade-box .button-hero {
	margin-top: 8px;
}

/* ==========================================================================
   12. CTA section (bottom of Find Duplicates page)
   ========================================================================== */

.ddpp-cta-section {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
	margin-top: 40px;
	padding: 24px 28px;
}

/* ── Free: upgrade CTA ─────────────────────────────────────────────────────── */

.ddpp-cta-inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.ddpp-cta-left {
	flex: 2;
	min-width: 280px;
}

.ddpp-cta-title {
	color: #0073aa;
	font-size: 16px;
	margin: 0 0 14px;
}

.ddpp-cta-features {
	column-gap: 20px;
	display: grid;
	font-size: 13px;
	color: #444;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 18px;
	row-gap: 6px;
}

.ddpp-cta-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.ddpp-cta-btn-upgrade {
	font-size: 14px;
	height: 38px;
	line-height: 38px;
	padding: 0 22px;
}

.ddpp-cta-star {
	color: #ffb900;
	font-size: 15px;
	height: 15px;
	margin-right: 3px;
	vertical-align: middle;
	width: 15px;
}

/* Price box */
.ddpp-cta-price {
	background: #f8fafd;
	border: 1px solid #d0e4f7;
	border-radius: 6px;
	flex: 1;
	min-width: 160px;
	padding: 18px 20px;
	text-align: center;
}

.ddpp-cta-price__amount {
	color: #0073aa;
	font-size: 30px;
	font-weight: 700;
	margin: 0 0 4px;
}

.ddpp-cta-price__period {
	color: #666;
	font-size: 12px;
	margin: 0;
}

.ddpp-cta-price__tiers {
	color: #555;
	font-size: 12px;
	margin: 6px 0 0;
}

/* ── Pro: rate + support ────────────────────────────────────────────────────── */

.ddpp-cta-inner--pro {
	align-items: flex-start;
}

.ddpp-cta-col {
	flex: 1;
	min-width: 240px;
}

.ddpp-cta-col__title {
	align-items: center;
	color: #0073aa;
	display: flex;
	font-size: 14px;
	gap: 6px;
	margin: 0 0 8px;
}

.ddpp-cta-support-icon {
	color: #00a32a;
}

.ddpp-cta-col p {
	color: #555;
	font-size: 13px;
	margin: 0 0 12px;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.ddpp-cta-footer {
	border-top: 1px solid #eee;
	color: #aaa;
	font-size: 11px;
	margin-top: 20px;
	padding-top: 12px;
	text-align: center;
}

/* ==========================================================================
   13. Redirects page
   ========================================================================== */

.ddpp-redirects-table .column-source,
.ddpp-redirects-table .column-target {
	word-break: break-all;
}

.ddpp-redirects-table .column-hits {
	width: 5em;
	text-align: center;
}

.ddpp-redirects-table .column-date {
	width: 10em;
}

.ddpp-redirects-table .column-actions {
	width: 7em;
}

.ddpp-redirects-table code {
	background: #f6f7f7;
	font-size: 12px;
	padding: 2px 5px;
}

/* ==========================================================================
   13. Help page
   ========================================================================== */

.ddpp-help-subtitle {
	color: #666;
	font-size: 14px;
	margin: -4px 0 20px;
}

/* ── Plan overview ────────────────────────────────────────────────────────── */

.ddpp-plan-overview {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 28px;
	max-width: 860px;
}

.ddpp-plan-col {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.ddpp-plan-col--pro {
	border-color: #dba617;
}

.ddpp-plan-col__header {
	align-items: center;
	display: flex;
	gap: 10px;
	padding: 14px 20px;
}

.ddpp-plan-col--free .ddpp-plan-col__header {
	background: #f6f7f7;
	border-bottom: 1px solid #e0e0e0;
}

.ddpp-plan-col--pro .ddpp-plan-col__header {
	background: #fef9ec;
	border-bottom: 1px solid #f0d580;
}

.ddpp-plan-col__header h3 {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
}

.ddpp-plan-badge {
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 2px 7px;
	text-transform: uppercase;
}

.ddpp-plan-badge--free {
	background: #e0e0e0;
	color: #555;
}

.ddpp-plan-badge--pro {
	background: #dba617;
	color: #fff;
}

.ddpp-plan-features {
	list-style: none;
	margin: 0;
	padding: 12px 20px 16px;
}

.ddpp-plan-features li {
	font-size: 13px;
	margin-bottom: 6px;
	padding-left: 20px;
	position: relative;
}

.ddpp-plan-features li::before {
	left: 0;
	position: absolute;
	top: 0;
}

.ddpp-plan-features li.yes::before {
	color: #00a32a;
	content: '✓';
	font-weight: 700;
}

.ddpp-plan-features li.no {
	color: #999;
}

.ddpp-plan-features li.no::before {
	color: #ccc;
	content: '✕';
}

.ddpp-plan-col__footer {
	border-top: 1px solid #f0d580;
	padding: 14px 20px;
}

/* ── Help grid & cards ────────────────────────────────────────────────────── */

.ddpp-help-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat( auto-fill, minmax( 440px, 1fr ) );
	margin-top: 8px;
}

.ddpp-help-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-left-width: 4px;
	border-left-color: #c3d4e4;
	border-radius: 4px;
	padding: 20px 24px;
}

.ddpp-help-card--pro {
	border-left-color: #dba617;
}

.ddpp-help-card--full {
	grid-column: 1 / -1;
}

.ddpp-help-card h2 {
	align-items: center;
	border-bottom: 1px solid #e8e8e8;
	display: flex;
	font-size: 15px;
	gap: 7px;
	margin: 0 0 14px;
	padding-bottom: 11px;
}

.ddpp-help-card h2 .dashicons {
	color: #2271b1;
	font-size: 18px;
	height: 18px;
	width: 18px;
}

.ddpp-help-card--pro h2 .dashicons {
	color: #dba617;
}

.ddpp-help-card ul,
.ddpp-help-card ol {
	margin-left: 16px;
	padding-left: 4px;
}

.ddpp-help-card li {
	font-size: 13px;
	margin-bottom: 7px;
}

/* ── How it works — ordered steps ──────────────────────────────────────────  */

.ddpp-steps {
	counter-reset: ddpp-step;
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.ddpp-steps li {
	align-items: flex-start;
	border-left: 2px solid #e0e0e0;
	counter-increment: ddpp-step;
	display: flex;
	flex-direction: column;
	margin: 0 0 10px 10px;
	padding: 0 0 0 12px;
}

.ddpp-steps li::before {
	background: #2271b1;
	border-radius: 50%;
	color: #fff;
	content: counter( ddpp-step );
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	height: 18px;
	line-height: 18px;
	margin-bottom: 4px;
	text-align: center;
	width: 18px;
}

/* ── Action list ────────────────────────────────────────────────────────────  */

.ddpp-action-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ddpp-action-list__item {
	border-bottom: 1px solid #f0f0f0;
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 10px 0;
}

.ddpp-action-list__item:last-child {
	border-bottom: none;
}

.ddpp-action-list__item--pro {
	background: #fffdf5;
	border-radius: 3px;
	margin: 2px -6px 0;
	padding: 10px 6px;
}

.ddpp-action-list__icon {
	color: #2271b1;
	flex-shrink: 0;
	font-size: 18px;
	height: 18px;
	margin-top: 2px;
	width: 18px;
}

.ddpp-action-list__item--pro .ddpp-action-list__icon {
	color: #c0392b;
}

.ddpp-action-list__item div p {
	color: #666;
	font-size: 12px;
	margin: 3px 0 0;
}

/* ── Help note ──────────────────────────────────────────────────────────────  */

.ddpp-help-note {
	align-items: flex-start;
	background: #f6f7f7;
	border-radius: 3px;
	color: #555;
	display: flex;
	font-size: 12px;
	gap: 6px;
	margin-top: 12px;
	padding: 8px 10px;
}

.ddpp-help-note .dashicons {
	color: #2271b1;
	flex-shrink: 0;
	font-size: 14px;
	height: 14px;
	margin-top: 1px;
	width: 14px;
}

/* ── Help tables ────────────────────────────────────────────────────────────  */

.ddpp-help-table {
	margin-top: 8px;
}

.ddpp-help-table td,
.ddpp-help-table th {
	font-size: 13px;
}

/* ── FAQ ────────────────────────────────────────────────────────────────────  */

.ddpp-faq {
	column-gap: 32px;
	columns: 2;
}

.ddpp-faq dt {
	break-inside: avoid;
	font-size: 13px;
	font-weight: 600;
	margin-top: 18px;
}

.ddpp-faq dt:first-child {
	margin-top: 0;
}

.ddpp-faq dd {
	break-inside: avoid;
	color: #555;
	font-size: 13px;
	line-height: 1.6;
	margin-left: 0;
	margin-top: 4px;
}

@media screen and ( max-width: 960px ) {
	.ddpp-plan-overview {
		grid-template-columns: 1fr;
	}
	.ddpp-faq {
		columns: 1;
	}
}
