/**
 * ActiveTrail Admin Styles - Modern Flashy-Inspired Design
 *
 * @package ActiveTrail_WooCommerce
 * @since 1.0.0
 */

/* General admin styles */
.activetrail-admin-section {
	margin-bottom: 30px;
	padding: 25px;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
	border: none;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	position: relative;
	overflow: hidden;
}

.activetrail-admin-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #262e3e 0%, #262e3e 50%, #262e3e 100%);
}

.activetrail-admin-section h3 {
	margin: 0 0 20px 0;
	padding: 0;
	border: none;
	font-size: 20px;
	font-weight: 700;
	color: #2d3748;
	display: flex;
	align-items: center;
	gap: 12px;
}

.activetrail-admin-section h3::before {
	content: '';
	width: 6px;
	height: 24px;
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%);
	border-radius: 3px;
}

/* Modern WooCommerce Settings Integration */
.woocommerce_page_wc-settings .form-table {
	background: transparent;
	border: none;
	box-shadow: none;
	border-spacing: 0 16px;
	border-collapse: separate;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > th,
.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	padding: 20px 25px;
	border: none;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
	margin-bottom: 8px;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
	position: relative;
}

/* Add spacing between table rows */
.woocommerce_page_wc-settings .form-table > tbody > tr:not(.wc-settings-sub-title) {
	margin-bottom: 16px;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > th {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%) !important;
	color: white !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	border-radius: 12px !important;
	width: 200px !important;
	vertical-align: middle !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	border-radius: 12px !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

/* Section Headers */
.woocommerce_page_wc-settings .form-table .wc-settings-sub-title {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%) !important;
	color: white !important;
	padding: 20px 25px !important;
	margin: 30px 0 0 0 !important;
	border-radius: 12px !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	box-shadow: 0 8px 32px rgba(38, 46, 62, 0.2) !important;
	position: relative;
	overflow: hidden;
}

.woocommerce_page_wc-settings .form-table .wc-settings-sub-title::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
	pointer-events: none;
}

.woocommerce_page_wc-settings .form-table .wc-settings-sub-title h3 {
	color: white !important;
	margin: 0 !important;
	font-size: 18px !important;
	display: flex;
	align-items: center;
	gap: 12px;
}

.woocommerce_page_wc-settings .form-table .wc-settings-sub-title h3::before {
	content: '⚙️';
	font-size: 20px;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Input Field Styling */
.woocommerce_page_wc-settings input[type="text"],
.woocommerce_page_wc-settings input[type="password"],
.woocommerce_page_wc-settings input[type="number"],
.woocommerce_page_wc-settings textarea,
.woocommerce_page_wc-settings select {
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.woocommerce_page_wc-settings input[type="text"]:focus,
.woocommerce_page_wc-settings input[type="password"]:focus,
.woocommerce_page_wc-settings input[type="number"]:focus,
.woocommerce_page_wc-settings textarea:focus,
.woocommerce_page_wc-settings select:focus {
	border-color: #262e3e;
	box-shadow: 0 0 0 3px rgba(38, 46, 62, 0.1), 0 4px 16px rgba(0, 0, 0, 0.08);
	outline: none;
	transform: translateY(-1px);
}

/* Checkbox Styling */
.woocommerce_page_wc-settings input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #cbd5e0;
	border-radius: 4px;
	background: white;
	position: relative;
	cursor: pointer;
	transition: all 0.2s ease;
}

.woocommerce_page_wc-settings input[type="checkbox"]:checked {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%);
	border-color: #262e3e;
}

.woocommerce_page_wc-settings input[type="checkbox"]:checked::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 12px;
	font-weight: bold;
}

/* Button Styling */
.woocommerce_page_wc-settings .button-primary {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%);
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-weight: 600;
	font-size: 14px;
	color: white;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 16px rgba(38, 46, 62, 0.3);
	text-shadow: none;
}

.woocommerce_page_wc-settings .button-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 32px rgba(38, 46, 62, 0.4);
	background: linear-gradient(135deg, #ef4b66 0%, #ef4b66 100%);
}

/* Status messages inline inside flex rows — no layout shift */
#activetrail-api-key-status .notice,
#activetrail-connect-store-status .notice,
#activetrail-group-status .notice,
#activetrail-groups-status .notice {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 4px 10px;
	white-space: nowrap;
}
#activetrail-api-key-status .notice p,
#activetrail-connect-store-status .notice p,
#activetrail-group-status .notice p,
#activetrail-groups-status .notice p {
	margin: 0;
	padding: 0;
}

/* Group ID section locked state — until API key is saved */
#activetrail-group-section-wrapper.at-group-locked {
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
}

.woocommerce_page_wc-settings #activetrail-connect-store-btn.at-connect-ready {
	background: #21C49B !important;
	border-color: #1aab87 !important;
	color: #fff !important;
	box-shadow: 0 4px 16px rgba(33, 196, 155, 0.3);
}

.woocommerce_page_wc-settings #activetrail-connect-store-btn.at-connect-ready:hover {
	background: #1aab87 !important;
	border-color: #158f73 !important;
	box-shadow: 0 8px 32px rgba(33, 196, 155, 0.4);
}

.woocommerce_page_wc-settings .button-secondary {
	background: white;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 20px;
	font-weight: 500;
	color: #4a5568;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.woocommerce_page_wc-settings .button-secondary:hover {
	border-color: #262e3e;
	color: #262e3e;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(38, 46, 62, 0.1);
}

/* Description Text */
.woocommerce_page_wc-settings .description {
	color: #718096;
	font-size: 13px;
	line-height: 1.5;
	margin-top: 8px;
	padding: 12px 16px;
	background: rgba(38, 46, 62, 0.05);
	border-radius: 8px;
	border-left: 4px solid #262e3e;
}

/* Special styling for section titles */
.woocommerce_page_wc-settings .form-table tbody tr th.titledesc {
	position: relative;
	overflow: hidden;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 4px;
	background: rgba(255, 255, 255, 0.3);
}

/* Section end styling */
.woocommerce_page_wc-settings .form-table tbody tr.wc-settings-sub-title + tr + tr[style*="display: none"] {
	display: none !important;
}

/* Responsive improvements for mobile */
@media (max-width: 768px) {
	.woocommerce_page_wc-settings .form-table > tbody > tr > th,
	.woocommerce_page_wc-settings .form-table > tbody > tr > td {
		display: block;
		width: 100% !important;
		border-radius: 12px !important;
		margin-bottom: 8px;
	}

	.woocommerce_page_wc-settings .form-table > tbody > tr > th {
		border-radius: 12px !important;
		margin-bottom: 0;
	}

	.woocommerce_page_wc-settings .form-table > tbody > tr > td {
		border-radius: 12px !important;
		border-left: none !important;
		border-top: 1px solid rgba(38, 46, 62, 0.1);
	}
}

/* Enhanced focus states */
.woocommerce_page_wc-settings input[type="text"]:focus,
.woocommerce_page_wc-settings input[type="password"]:focus,
.woocommerce_page_wc-settings input[type="number"]:focus,
.woocommerce_page_wc-settings textarea:focus,
.woocommerce_page_wc-settings select:focus {
	animation: focusPulse 0.3s ease-out;
}

@keyframes focusPulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.02); }
	100% { transform: scale(1); }
}

/* Success states */
.woocommerce_page_wc-settings .form-field-success {
	border-color: #48bb78 !important;
	box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1) !important;
}

.woocommerce_page_wc-settings .form-field-error {
	border-color: #f56565 !important;
	box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1) !important;
}

/* Loading states */
.woocommerce_page_wc-settings .form-field-loading {
	position: relative;
	overflow: hidden;
}

.woocommerce_page_wc-settings .form-field-loading::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(38, 46, 62, 0.2), transparent);
	animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
	0% { left: -100%; }
	100% { left: 100%; }
}

/* Icon enhancements for different field types */
.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label::before {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	vertical-align: middle;
	filter: brightness(0) invert(1);
}

/* API Configuration icons */
.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for="activetrail_api_key"]::before {
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for="activetrail_group_id"]::before {
	background: none;
	filter: none;
}



/* Checkbox and other field type icons */
.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="enable"]::before {
	content: '⚡';
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="consent"]::before {
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="debug"]::before {
	content: '🐛';
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="time"]::before {
	content: '⏰';
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="text"]::before {
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="title"]::before {
	background: none;
	filter: none;
}

.woocommerce_page_wc-settings .form-table tbody tr th.titledesc label[for*="description"]::before {
	background: none;
	filter: none;
}

/* Enhanced connection status styles */
#activetrail-connection-status {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: 4px;
	font-weight: 500;
	font-size: 13px;
	display: inline-block;
	min-width: 200px;
}

#activetrail-connection-status .success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

#activetrail-connection-status .error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

#activetrail-connection-status .loading {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

#activetrail-connection-status .neutral {
	background: #f8f9fa;
	color: #6c757d;
	border: 1px solid #dee2e6;
}

/* Groups status styles */
#activetrail-groups-status {
	margin-top: 8px;
	font-size: 13px;
	padding: 6px 10px;
	border-radius: 3px;
	display: inline-block;
}

#activetrail-groups-status .success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

#activetrail-groups-status .error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

#activetrail-groups-status .loading {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* Button styles */
.activetrail-test-button {
	margin-left: 10px;
	vertical-align: top;
	position: relative;
}

#activetrail-test-connection {
	margin-left: 10px;
	vertical-align: top;
	position: relative;
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%);
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-weight: 600;
	font-size: 14px;
	color: white;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 16px rgba(38, 46, 62, 0.3);
	text-shadow: none;
}

#activetrail-test-connection:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 32px rgba(38, 46, 62, 0.4);
	background: linear-gradient(135deg, #ef4b66 0%, #ef4b66 100%);
}

.activetrail-refresh-button,
#activetrail-refresh-groups {
	margin-left: 10px;
	vertical-align: top;
}

/* Enhanced feed URL styles */
.activetrail-feed-urls {
	margin-top: 15px;
	padding: 20px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-left: 4px solid #0073aa;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activetrail-feed-urls h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #23282d;
	font-size: 16px;
	font-weight: 600;
}

.activetrail-feed-urls p {
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.activetrail-feed-urls strong {
	min-width: 80px;
	color: #2c3e50;
}

.activetrail-feed-urls code {
	background: #fff;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'SF Mono', Consolas, Monaco, monospace;
	font-size: 13px;
	color: #e83e8c;
	flex: 1;
	min-width: 300px;
	word-break: break-all;
}

.activetrail-copy-button,
.activetrail-copy-url {
	font-size: 11px;
	height: 28px;
	line-height: 26px;
	padding: 0 12px;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.activetrail-copy-button.copied,
.activetrail-copy-url.copied {
	background: #00a32a !important;
	border-color: #00a32a !important;
	color: #fff !important;
	transform: scale(1.05);
}

/* Settings form enhancements */
.activetrail-setting-row {
	margin-bottom: 15px;
}

.activetrail-setting-label {
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

.activetrail-setting-description {
	font-style: italic;
	color: #666;
	font-size: 13px;
	margin-top: 5px;
}

/* Status indicators with emojis */
.activetrail-status-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
}

.activetrail-status-indicator.connected {
	background: #d4edda;
	color: #155724;
}

.activetrail-status-indicator.failed {
	background: #f8d7da;
	color: #721c24;
}

.activetrail-status-indicator.testing {
	background: #fff3cd;
	color: #856404;
}

/* Debug section styles */
.activetrail-debug-info {
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	padding: 15px;
	margin-top: 15px;
	font-family: 'SF Mono', Consolas, Monaco, monospace;
	font-size: 12px;
	white-space: pre-wrap;
	max-height: 300px;
	overflow-y: auto;
	border-radius: 4px;
}

/* Responsive styles */
@media (max-width: 782px) {
	.activetrail-test-button,
	.activetrail-refresh-button,
	#activetrail-test-connection,
	#activetrail-refresh-groups {
		margin-left: 0;
		margin-top: 8px;
		display: block;
		width: 100%;
	}

	.activetrail-feed-urls {
		padding: 15px;
	}

	.activetrail-feed-urls p {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.activetrail-feed-urls code {
		min-width: auto;
		width: 100%;
	}

	.activetrail-copy-button,
	.activetrail-copy-url {
		margin-left: 0;
		width: 100%;
	}

	#activetrail-connection-status,
	#activetrail-groups-status {
		display: block;
		margin-top: 10px;
		min-width: auto;
		width: 100%;
		text-align: center;
	}
}

/* Loading animation */
@keyframes activetrail-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.activetrail-loading {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #0073aa;
	border-radius: 50%;
	animation: activetrail-spin 1s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

/* Spin animation for dashicons */
.dashicons.spin {
	animation: activetrail-spin 1s linear infinite;
}

/* Button loading states */
.button .dashicons.spin {
	margin-right: 5px;
}

/* Enhanced tooltip styles */
.activetrail-tooltip {
	position: relative;
	cursor: help;
	border-bottom: 1px dotted #666;
	transition: border-color 0.2s ease;
}

.activetrail-tooltip:hover {
	border-bottom-color: #0073aa;
}

.activetrail-tooltip:hover::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.activetrail-tooltip:hover::before {
	content: '';
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #333;
	z-index: 1000;
}

/* Pulse animation for loading states */
@keyframes activetrail-pulse {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

.activetrail-loading-text {
	animation: activetrail-pulse 1.5s ease-in-out infinite;
}

/* Success checkmark animation */
@keyframes activetrail-checkmark {
	0% { transform: scale(0); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

.activetrail-success-icon {
	animation: activetrail-checkmark 0.3s ease-out;
}

.activetrail-config-status li {
	margin: 5px 0;
	font-size: 13px;
}

/* Statistics Cards */
.activetrail-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 20px 0;
}

.activetrail-stat-card {
	flex: 1;
	min-width: 200px;
	padding: 20px;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	text-align: center;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.activetrail-stat-card h4 {
	margin: 0 0 10px 0;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #666;
	letter-spacing: 0.5px;
}

.activetrail-stat-card .number {
	font-size: 32px;
	font-weight: 700;
	color: #0073aa;
	line-height: 1;
}

.activetrail-stat-card .description {
	margin-top: 5px;
	font-size: 12px;
	color: #666;
}

/* Form Enhancements */
.activetrail-form-row {
	margin-bottom: 20px;
}

.activetrail-form-row label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #23282d;
}

.activetrail-form-row input,
.activetrail-form-row select,
.activetrail-form-row textarea {
	width: 100%;
	max-width: 400px;
}

.activetrail-form-row .description {
	margin-top: 5px;
	font-size: 13px;
	color: #666;
	font-style: italic;
}

.activetrail-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 10px;
}

.activetrail-checkbox-group label {
	display: flex;
	align-items: center;
	font-weight: normal;
	margin-bottom: 0;
}

.activetrail-checkbox-group input[type="checkbox"] {
	margin-right: 8px;
	width: auto;
}

/* Tooltips */
.activetrail-tooltip {
	position: relative;
	display: inline-block;
	margin-left: 5px;
	width: 16px;
	height: 16px;
	background: #666;
	color: #fff;
	border-radius: 50%;
	font-size: 12px;
	line-height: 16px;
	text-align: center;
	cursor: help;
}

.activetrail-tooltip:hover {
	background: #0073aa;
}

/* Loading Spinner */
.activetrail-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #0073aa;
	border-radius: 50%;
	animation: activetrail-spin 1s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

@keyframes activetrail-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
	.activetrail-stats {
		flex-direction: column;
	}

	.activetrail-stat-card {
		min-width: auto;
	}

	.activetrail-section-content {
		padding: 15px;
	}

	.activetrail-feed-urls {
		padding: 10px;
	}

	.activetrail-feed-urls code {
		display: block;
		margin: 5px 0;
		word-break: break-all;
	}
}

/* WordPress Admin Compatibility */
.woocommerce_page_wc-settings .activetrail-section {
	margin-top: 20px;
}

.woocommerce_page_wc-settings .activetrail-feed-urls {
	margin-top: 15px;
}

/* Hide default WooCommerce settings styling conflicts */
.woocommerce_page_wc-settings table.form-table tr:has(.activetrail-feed-urls) {
	display: none;
}

/* Custom field styling for WooCommerce settings */
.woocommerce_page_wc-settings .forminp-password input[type="password"] {
	font-family: Consolas, Monaco, monospace;
	letter-spacing: 1px;
}

.woocommerce_page_wc-settings .forminp-multiselect select {
	height: 120px;
}

/* Debug section styling */
.activetrail-debug-info {
	background: #f1f1f1;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 15px;
	margin-top: 20px;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-x: auto;
}

.activetrail-debug-info h4 {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin: 0 0 10px 0;
	font-size: 14px;
	font-weight: 600;
}

/* Notice enhancements */
.notice.activetrail-notice {
	border-left-width: 4px;
	border-left-style: solid;
}

.notice.activetrail-notice.notice-activetrail {
	border-left-color: #0073aa;
}

.notice.activetrail-notice p {
	margin: 0.5em 0;
	padding: 2px;
}

/* Animation for status changes */
.activetrail-status-change {
	animation: activetrail-highlight 2s ease-in-out;
}

@keyframes activetrail-highlight {
	0% { background-color: #fff3cd; }
	100% { background-color: transparent; }
}

/* Testing Section Styles */
.activetrail-system-status {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	padding: 20px;
	margin-top: 10px;
}

.activetrail-system-status h4 {
	margin: 0 0 15px 0;
	font-size: 14px;
	font-weight: 600;
	color: #495057;
	border-bottom: 1px solid #dee2e6;
	padding-bottom: 8px;
}

.activetrail-status-list,
.activetrail-settings-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.activetrail-status-list li,
.activetrail-settings-list li {
	padding: 8px 0;
	border-bottom: 1px solid #e9ecef;
	display: flex;
	align-items: center;
	font-size: 13px;
}

.activetrail-status-list li:last-child,
.activetrail-settings-list li:last-child {
	border-bottom: none;
}

.activetrail-status-list li.status-ok {
	color: #155724;
}

.activetrail-status-list li.status-error {
	color: #721c24;
}

.activetrail-status-list li.status-warning {
	color: #856404;
}

.activetrail-status-list li.status-info {
	color: #0c5460;
}

.activetrail-quick-actions {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #dee2e6;
}

.activetrail-quick-actions h4 {
	margin: 0 0 10px 0;
	font-size: 13px;
	font-weight: 600;
	color: #495057;
}

.activetrail-quick-actions .button {
	margin-right: 10px;
	margin-bottom: 5px;
}

/* Test Button Styles */
.activetrail-test-button {
	position: relative;
	transition: all 0.2s ease;
}

.activetrail-test-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activetrail-test-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.activetrail-test-button.testing {
	background: #fff3cd !important;
	border-color: #ffeaa7 !important;
	color: #856404 !important;
}

.activetrail-test-button.testing::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid #856404;
	border-top: 2px solid transparent;
	border-radius: 50%;
	animation: activetrail-spin 1s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

/* Test Result Notices */
.notice.activetrail-test-result {
	border-left-width: 4px;
	padding: 15px;
}

.notice.activetrail-test-result h3 {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
}

.notice.activetrail-test-result ul {
	margin: 10px 0 10px 20px;
	list-style: disc;
}

.notice.activetrail-test-result li {
	margin: 5px 0;
	font-size: 13px;
}

.notice.activetrail-test-result em {
	display: block;
	margin-top: 15px;
	padding-top: 10px;
	border-top: 1px solid rgba(0,0,0,0.1);
	font-size: 12px;
	color: #666;
}

/* Testing Section Visibility */
.activetrail-testing-section-hidden {
	display: none;
}

.activetrail-debug-notice {
	background: #e7f3ff;
	border: 1px solid #b3d9ff;
	border-radius: 4px;
	padding: 12px;
	margin: 10px 0;
	font-size: 13px;
}

.activetrail-debug-notice.inline {
	margin: 0;
	display: inline-block;
}

.activetrail-debug-notice code {
	background: #f1f1f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
}

/* Status Icons */
.activetrail-status-icon {
	margin-right: 8px;
	font-size: 14px;
	width: 20px;
	text-align: center;
}

/* Test Progress Indicator */
.activetrail-test-progress {
	display: none;
	margin-top: 10px;
	padding: 10px;
	background: #f0f8ff;
	border: 1px solid #b3d9ff;
	border-radius: 4px;
	font-size: 13px;
}

.activetrail-test-progress.active {
	display: block;
}

.activetrail-test-progress .progress-bar {
	width: 100%;
	height: 4px;
	background: #e9ecef;
	border-radius: 2px;
	overflow: hidden;
	margin-top: 8px;
}

.activetrail-test-progress .progress-fill {
	height: 100%;
	background: #007cba;
	width: 0%;
	transition: width 0.3s ease;
	animation: activetrail-progress-pulse 2s ease-in-out infinite;
}

@keyframes activetrail-progress-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* Responsive Testing Section */
@media (max-width: 782px) {
	.activetrail-system-status {
		padding: 15px;
	}

	.activetrail-status-list li,
	.activetrail-settings-list li {
		flex-direction: column;
		align-items: flex-start;
		padding: 10px 0;
	}

	.activetrail-status-icon {
		margin-bottom: 5px;
	}

	.activetrail-quick-actions .button {
		display: block;
		width: 100%;
		margin-right: 0;
		margin-bottom: 10px;
		text-align: center;
	}

	.activetrail-test-button {
		width: 100%;
		margin-top: 10px;
		text-align: center;
	}
}

/* Admin Bar Test Menu Styles */
#wp-admin-bar-activetrail-tests .ab-item {
	font-size: 13px !important;
}

#wp-admin-bar-activetrail-tests .ab-submenu {
	min-width: 200px;
}

#wp-admin-bar-activetrail-tests .ab-submenu .ab-item {
	padding: 8px 12px !important;
	font-size: 12px !important;
}

#wp-admin-bar-activetrail-tests .ab-submenu .ab-item:hover {
	background: #0073aa !important;
	color: #fff !important;
}

/* Test Status Indicators */
.activetrail-test-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.activetrail-test-status.ready {
	background: #d4edda;
	color: #155724;
}

.activetrail-test-status.not-ready {
	background: #f8d7da;
	color: #721c24;
}

.activetrail-test-status.warning {
	background: #fff3cd;
	color: #856404;
}

/* Animation for successful tests */
@keyframes activetrail-success-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	60% { transform: translateY(-5px); }
}

.activetrail-test-success {
	animation: activetrail-success-bounce 0.6s ease;
}

/* Print styles */
@media print {
	.activetrail-section {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #000;
	}

	.activetrail-button,
	.activetrail-copy-url,
	.activetrail-test-button {
		display: none;
	}

	.activetrail-feed-urls code {
		background: transparent;
		border: 1px solid #000;
	}

	.activetrail-system-status {
		background: transparent;
		border: 1px solid #000;
	}
}

/* Hebrew language specific styling - only for ActiveTrail elements */
.activetrail-hebrew .form-table > tbody > tr > th.titledesc label::before {
	margin-right: 0;
	margin-left: 8px;
}

.activetrail-hebrew .activetrail-test-button,
.activetrail-hebrew .activetrail-refresh-button,
.activetrail-hebrew #activetrail-test-connection,
.activetrail-hebrew #activetrail-refresh-groups {
	margin-left: 0;
	margin-right: 10px;
}

/* Center text alignment for table headers in Hebrew language */
.activetrail-hebrew .form-table > tbody > tr > th.titledesc,
.activetrail-hebrew .form-table > tbody > tr > th.titledesc label {
	text-align: center !important;
}

/* Center text alignment for section titles in Hebrew language */
.activetrail-hebrew .form-table .wc-settings-sub-title h3 {
	text-align: center !important;
}

/* Center text alignment for all table headers regardless of language */
.woocommerce_page_wc-settings .form-table > tbody > tr > th.titledesc,
.woocommerce_page_wc-settings .form-table > tbody > tr > th.titledesc label {
	text-align: center !important;
}

/* Center text alignment for section titles regardless of language */
.woocommerce_page_wc-settings .form-table .wc-settings-sub-title h3 {
	text-align: center !important;
}

/* Additional CSS to ensure center alignment for all text elements in table headers */
.woocommerce_page_wc-settings .form-table > tbody > tr > th,
.woocommerce_page_wc-settings .form-table > tbody > tr > th * {
	text-align: center !important;
}

/* Center alignment for specific field labels */
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for="activetrail_api_key"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for="activetrail_group_id"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for="activetrail_language"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for*="enable"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for*="consent"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for*="feed"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th label[for*="cart"] {
	text-align: center !important;
	display: block !important;
	width: 100% !important;
}

/* Override any RTL or Hebrew specific text alignment */
.activetrail-hebrew .woocommerce_page_wc-settings .form-table > tbody > tr > th,
.activetrail-hebrew .woocommerce_page_wc-settings .form-table > tbody > tr > th *,
[dir="rtl"] .woocommerce_page_wc-settings .form-table > tbody > tr > th,
[dir="rtl"] .woocommerce_page_wc-settings .form-table > tbody > tr > th * {
	text-align: center !important;
}

/* Special styling for select fields to work better with the new unified design */
.woocommerce_page_wc-settings .forminp-select select {
	max-width: 300px;
	min-width: 200px;
}

/* Language Select Dropdown Styling with Arrow Icon */
.activetrail-language-select {
	position: relative;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 35px 8px 12px !important;
	font-size: 14px;
	font-weight: 500;
	color: #2d3748;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("../../arrow-down-sign-to-navigate.png") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 12px !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.activetrail-language-select:hover {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
	transform: translateY(-1px);
}

.activetrail-language-select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.activetrail-language-select option {
	padding: 8px 12px;
	background: #ffffff;
	color: #2d3748;
}

/* RTL Support for Language Select */
[dir="rtl"] .activetrail-language-select,
.activetrail-hebrew .activetrail-language-select {
	padding: 8px 12px 8px 35px !important;
	background-image: url("../../arrow-down-sign-to-navigate.png") !important;
	background-position: 12px center !important;
	background-size: 12px !important;
}

/* Group Select Dropdown Styling with Arrow Icon */
.activetrail-group-select {
	position: relative;
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 35px 8px 12px !important;
	font-size: 14px;
	font-weight: 500;
	color: #2d3748;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("../../arrow-down-sign-to-navigate.png") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 12px !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.activetrail-group-select:hover {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
	transform: translateY(-1px);
}

.activetrail-group-select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.activetrail-group-select:invalid {
	border-color: #dc3232;
}

.activetrail-group-select:invalid:focus {
	border-color: #dc3232;
	box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

/* Required field styling for API Key */
#activetrail_api_key:invalid {
	border-color: #dc3232;
}

#activetrail_api_key:invalid:focus {
	border-color: #dc3232;
	box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.activetrail-group-select option {
	padding: 8px 12px;
	background: #ffffff;
	color: #2d3748;
}

/* RTL Support for Group Select */
[dir="rtl"] .activetrail-group-select,
.activetrail-hebrew .activetrail-group-select {
	padding: 8px 12px 8px 35px !important;
	background-image: url("../../arrow-down-sign-to-navigate.png") !important;
	background-position: 12px center !important;
	background-size: 12px !important;
}

/* Ensure the description text below select fields looks good */
.woocommerce_page_wc-settings .forminp-select .description {
	margin-top: 8px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.4;
}

/* Additional CSS to force the unified design with highest specificity */
.woocommerce_page_wc-settings .form-table > tbody > tr > th.titledesc {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%) !important;
	color: white !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	border-radius: 12px !important;
	width: 200px !important;
	vertical-align: middle !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp {
	border-radius: 12px !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

/* ULTRA SPECIFIC CSS TO FORCE THE DESIGN */
.woocommerce_page_wc-settings .form-table > tbody > tr > th.titledesc,
.woocommerce_page_wc-settings .form-table > tbody > tr > th[scope="row"] {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%) !important;
	color: white !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	border-radius: 12px !important;
	width: 200px !important;
	vertical-align: middle !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp,
.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp-password,
.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp-select {
	border-radius: 12px !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

/* Force override any existing border-radius */
.woocommerce_page_wc-settings .form-table > tbody > tr > th,
.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	border-radius: 12px !important;
}

/* EXTREMELY SPECIFIC CSS TO FORCE THE DESIGN - HIGHEST PRIORITY */
.woocommerce_page_wc-settings .form-table > tbody > tr > th.titledesc,
.woocommerce_page_wc-settings .form-table > tbody > tr > th[scope="row"],
.woocommerce_page_wc-settings .form-table > tbody > tr > th {
	background: linear-gradient(135deg, #262e3e 0%, #262e3e 100%) !important;
	color: white !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	border-radius: 0 12px 12px 0 !important;
	width: 200px !important;
	vertical-align: middle !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp,
.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp-password,
.woocommerce_page_wc-settings .form-table > tbody > tr > td.forminp-select,
.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	border-radius: 12px 0 0 12px !important;
	border: none !important;
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
	position: relative !important;
	z-index: 1 !important;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
	width: calc(100% - 200px) !important;
	min-width: 300px !important;
}

/* OVERRIDE ALL EXISTING STYLES WITH MAXIMUM SPECIFICITY */
.woocommerce_page_wc-settings .form-table > tbody > tr > th,
.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	margin: 0 !important;
	padding: 20px 25px 20px 25px !important;
}

/* FINAL OVERRIDE - HIGHEST PRIORITY */
.woocommerce_page_wc-settings .form-table > tbody > tr > th {
	border-radius: 0 12px 12px 0 !important;
}

.woocommerce_page_wc-settings .form-table > tbody > tr > td {
	border-radius: 12px 0 0 12px !important;
}

/* ============================================================
   ORDER SYNCHRONIZATION TABLE
   ============================================================ */

.activetrail-status-table-container {
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	background: #fff;
}

.activetrail-status-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 14px;
	table-layout: fixed;
}

/* Column widths */
.activetrail-status-table .col-sync    { width: 80px;  text-align: center; }
.activetrail-status-table .col-status  { width: 22%; }
.activetrail-status-table .col-desc    { width: auto; }
.activetrail-status-row td.col-desc    { color: #64748b; }
.activetrail-status-table .col-orders  { width: 80px;  text-align: center; }
.activetrail-status-table .col-category { width: 130px; text-align: center; }

/* Table header */
.activetrail-status-table-head th {
	background: #262e3e;
	color: #fff;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 14px 16px;
	border: none;
	border-right: none;
	border-left: none;
	text-align: left;
}

[dir="rtl"] .activetrail-status-table-head th,
.activetrail-hebrew .activetrail-status-table-head th {
	text-align: right;
}

.activetrail-status-table-head th.col-sync,
.activetrail-status-table-head th.col-orders {
	text-align: center;
}

/* Group header rows */
.activetrail-group-header td {
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 8px 16px;
	border-top: 2px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}

.activetrail-group-pending_group td    { border-left: 3px solid #f59e0b; }
.activetrail-group-active_group td     { border-left: 3px solid #3b82f6; }
.activetrail-group-completed_group td  { border-left: 3px solid #10b981; }
.activetrail-group-cancelled_group td  { border-left: 3px solid #ef4444; }
.activetrail-group-custom_group td     { border-left: 3px solid #8b5cf6; }

[dir="rtl"] .activetrail-group-pending_group td,
.activetrail-hebrew .activetrail-group-pending_group td    { border-left: none; border-right: 3px solid #f59e0b; }
[dir="rtl"] .activetrail-group-active_group td,
.activetrail-hebrew .activetrail-group-active_group td     { border-left: none; border-right: 3px solid #3b82f6; }
[dir="rtl"] .activetrail-group-completed_group td,
.activetrail-hebrew .activetrail-group-completed_group td  { border-left: none; border-right: 3px solid #10b981; }
[dir="rtl"] .activetrail-group-cancelled_group td,
.activetrail-hebrew .activetrail-group-cancelled_group td  { border-left: none; border-right: 3px solid #ef4444; }
[dir="rtl"] .activetrail-group-custom_group td,
.activetrail-hebrew .activetrail-group-custom_group td     { border-left: none; border-right: 3px solid #8b5cf6; }

/* Status rows */
.activetrail-status-row td {
	padding: 12px 16px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
	color: #374151;
}

.activetrail-status-row:last-child td {
	border-bottom: none;
}

.activetrail-status-row:hover td {
	background: #f8fafc;
}

.activetrail-status-row.sync-enabled td {
	background: rgba(16, 185, 129, 0.03);
}

.activetrail-status-row.sync-disabled td {
	opacity: 0.65;
}

/* Toggle switch */
.activetrail-toggle {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	position: relative;
}

.woocommerce_page_wc-settings .activetrail-toggle input[type="checkbox"],
.activetrail-toggle input[type="checkbox"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	border: none !important;
	background: none !important;
	box-shadow: none !important;
	transform: none !important;
	pointer-events: none;
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce_page_wc-settings .activetrail-toggle input[type="checkbox"]:checked,
.activetrail-toggle input[type="checkbox"]:checked {
	background: none !important;
	border: none !important;
}

.woocommerce_page_wc-settings .activetrail-toggle input[type="checkbox"]:checked::after,
.activetrail-toggle input[type="checkbox"]:checked::after {
	display: none !important;
}

.activetrail-toggle-slider {
	display: inline-block;
	width: 40px;
	height: 22px;
	background: #cbd5e1;
	border-radius: 11px;
	position: relative;
	transition: background 0.25s ease;
	flex-shrink: 0;
}

.activetrail-toggle-slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.25s ease;
	box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.woocommerce_page_wc-settings .activetrail-toggle input[type="checkbox"]:checked + .activetrail-toggle-slider,
.activetrail-toggle input[type="checkbox"]:checked + .activetrail-toggle-slider {
	background: #10b981;
}

.woocommerce_page_wc-settings .activetrail-toggle input[type="checkbox"]:checked + .activetrail-toggle-slider::after,
.activetrail-toggle input[type="checkbox"]:checked + .activetrail-toggle-slider::after {
	transform: translateX(18px);
}

.activetrail-toggle:hover .activetrail-toggle-slider {
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Custom status badge */
.activetrail-custom-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 6px;
	background: #ede9fe;
	color: #6d28d9;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	vertical-align: middle;
}

[dir="rtl"] .activetrail-custom-badge,
.activetrail-hebrew .activetrail-custom-badge {
	margin-left: 0;
	margin-right: 6px;
}

/* Category badges */
.activetrail-category-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.activetrail-category-badge.category-pending,
.activetrail-category-badge.category-on-hold {
	background: #fef3c7;
	color: #92400e;
}

.activetrail-category-badge.category-processing {
	background: #dbeafe;
	color: #1e40af;
}

.activetrail-category-badge.category-completed {
	background: #d1fae5;
	color: #065f46;
}

.activetrail-category-badge.category-cancelled,
.activetrail-category-badge.category-failed,
.activetrail-category-badge.category-refunded {
	background: #fee2e2;
	color: #991b1b;
}

.activetrail-category-badge.category-custom {
	background: #ede9fe;
	color: #5b21b6;
}

/* Summary bar */
.activetrail-status-summary {
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	padding: 12px 16px;
}

.activetrail-status-summary .summary-stats {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
}

[dir="rtl"] .activetrail-status-summary .summary-stats,
.activetrail-hebrew .activetrail-status-summary .summary-stats {
	justify-content: flex-start;
}

.activetrail-status-summary .stat {
	font-size: 12px;
	color: #64748b;
}

.activetrail-status-summary .stat strong {
	color: #1e293b;
	font-size: 14px;
}

/* Description notice above the table */
.activetrail-status-table-container ~ .description {
	margin-bottom: 12px !important;
}

/* Responsive */
@media (max-width: 900px) {
	.activetrail-status-table .col-desc { display: none; }
}

/* Additional spacing for specific textarea fields */
.woocommerce_page_wc-settings textarea#activetrail_feed_description,
.woocommerce_page_wc-settings textarea#activetrail_consent_text {
	margin-top: 20px;
}

.woocommerce_page_wc-settings .description + textarea#activetrail_feed_description,
.woocommerce_page_wc-settings .description + textarea#activetrail_consent_text {
	margin-top: 20px;
}
