/* Modern Comparison Diff UI */
.lexpress-diff {
	max-width: 1200px;
	margin: 0 auto;
}

.lexpress-diff h2 {
	font-size: 24px;
	font-weight: 600;
	color: #1d2327;
	border-bottom: 2px solid #0073aa;
	padding: 0 0 16px 0;
	margin: 0 0 32px 0;
}

/* Quick Navigation */
.lexpress-diff-navigation {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lexpress-diff-navigation h4 {
	margin: 0 0 16px 0;
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.diff-nav-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.diff-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	color: #374151;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.diff-nav-link:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	color: #374151;
}

.diff-nav-changes:hover {
	border-color: #f59e0b;
	background: #fef3c7;
}

.diff-nav-matches:hover {
	border-color: #10b981;
	background: #d1fae5;
}

.diff-nav-additions:hover {
	border-color: #3b82f6;
	background: #dbeafe;
}

.nav-icon {
	font-size: 16px;
}

/* Enhanced Section Headers */
.lexpress-diff-section {
	margin-bottom: 40px;
}

.diff-section-header {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
	margin: 0 0 24px 0;
	padding: 16px 24px;
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	position: relative;
	overflow: hidden;
}

.diff-section-header::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #0073aa;
}

.diff-section-changes::before {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.diff-section-matches::before {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.diff-section-additions::before {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.section-icon {
	font-size: 24px;
	opacity: 0.8;
}

.section-count {
	margin-left: auto;
	background: #e5e7eb;
	color: #374151;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

/* Modern Diff Card Layout */
.lexpress-diff-card {
	margin-bottom: 24px;
	transition: all 0.3s ease;
}

.lexpress-diff-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Override schema card styling for diff cards */
.lexpress-diff-card .field-header {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%) !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
}

.lexpress-diff-card .field-title {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Different card types */
.lexpress-diff-added {
	border-left: 4px solid #00a32a;
}

.lexpress-diff-added .field-header {
	background: linear-gradient(135deg, #f0f9f0 0%, #e6f7e6 100%) !important;
}

/* Field Change Items */
.lexpress-diff-changes {
	padding: 24px;
	background: #fafbfc;
}

.lexpress-diff-item {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	margin-bottom: 16px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.2s ease;
}

.lexpress-diff-item:last-child {
	margin-bottom: 0;
}

.lexpress-diff-item:hover {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.diff-property-label {
	font-size: 14px;
	font-weight: 600;
	color: #0073aa;
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.diff-comparison {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.diff-old-value,
.diff-new-value {
	flex: 1;
	min-width: 200px;
	padding: 16px;
	border-radius: 6px;
	border: 1px solid;
}

.diff-old-value {
	background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
	border-color: #fc8181;
}

.diff-new-value {
	background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
	border-color: #68d391;
}

.diff-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
	opacity: 0.8;
}

.diff-old-value .diff-label {
	color: #c53030;
}

.diff-new-value .diff-label {
	color: #2f855a;
}

.diff-value {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #1d2327;
	word-break: break-word;
	line-height: 1.4;
}

.diff-arrow {
	font-size: 20px;
	font-weight: 700;
	color: #646970;
	flex-shrink: 0;
	padding: 0 8px;
}

/* Badge Styles */
.field-changed-badge {
	background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
	color: #92400e;
	border: 1px solid #f59e0b;
}

.field-added-badge {
	background: linear-gradient(135deg, #d1fae5 0%, #6ee7b7 100%);
	color: #065f46;
	border: 1px solid #10b981;
}

/* Legacy table support (if needed for fallback) */
.lexpress-diff-table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lexpress-diff-table th,
.lexpress-diff-table td {
	padding: 16px;
	text-align: left;
	vertical-align: top;
	border: 1px solid #e2e4e7;
}

.lexpress-diff-table th {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	font-weight: 600;
	color: #1d2327;
	font-size: 14px;
}

.lexpress-diff-table td.old {
	background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
	border-left: 3px solid #fc8181;
}

.lexpress-diff-table td.new {
	background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
	border-left: 3px solid #68d391;
}

/* Form Mapping Settings Styling */
.lexpress-sync-mappings {
	margin-bottom: 32px;
}

.sync-mappings-header {
	background: linear-gradient(135deg, #f0f6ff 0%, #e6f3ff 100%);
	border: 1px solid #c3ddfd;
	border-radius: 8px;
	padding: 24px;
	margin-bottom: 24px;
	text-align: center;
}

.sync-mappings-header h2 {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-size: 22px;
	font-weight: 700;
	color: #1e40af;
	margin: 0 0 12px 0;
	border: none;
	padding: 0;
}

.sync-icon {
	font-size: 28px;
}

.sync-description {
	color: #1e40af;
	font-size: 14px;
	margin: 0;
	opacity: 0.8;
}

.lexpress-mapping-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	transition: all 0.3s ease;
}

.lexpress-mapping-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.mapping-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border-bottom: 1px solid #e2e4e7;
}

.remote-form-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.remote-badge {
	background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
	color: #92400e;
	border: 1px solid #f59e0b;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mapping-card-body {
	padding: 24px;
	text-align: center;
}

.mapping-arrow {
	font-size: 24px;
	color: #646970;
	margin-bottom: 16px;
	font-weight: 700;
}

.mapping-select-wrapper {
	max-width: 400px;
	margin: 0 auto;
}

.mapping-label {
	display: block;
	font-weight: 600;
	color: #374151;
	margin-bottom: 8px;
	font-size: 14px;
}

.mapping-select {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	color: #374151;
	transition: all 0.2s ease;
	appearance: none;
	background-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e);
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 16px;
	padding-right: 40px;
}

.mapping-select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mapping-select:hover {
	border-color: #9ca3af;
}

/* Responsive Design */

@media (max-width: 768px) {

	.diff-comparison {
		flex-direction: column;
		gap: 12px;
	}

	.diff-old-value,
	.diff-new-value {
		min-width: auto;
	}

	.diff-arrow {
		transform: rotate(90deg);
		align-self: center;
	}

	.lexpress-diff-changes {
		padding: 16px;
	}

	.lexpress-diff-item {
		padding: 16px;
	}

	.lexpress-diff h3 {
		font-size: 16px;
		padding: 10px 16px;
	}

	.sync-mappings-header {
		padding: 20px;
	}

	.sync-mappings-header h2 {
		font-size: 18px;
	}

	.mapping-card-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 16px 20px;
	}

	.mapping-card-body {
		padding: 20px;
	}
}
