.spar-advanced-settings {
	position: relative;
}

.spar-premium-disabled {
	pointer-events: none;
}

.spar-accordion.spar-premium-disabled {
	opacity: 0.5;
	pointer-events: none;
}
.spar-accordion.spar-premium-disabled:hover {
	cursor: not-allowed;
}

.nav-tab.spar-premium-disabled {
	opacity: 0.5;
	pointer-events: none;
}

.spar-premium-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	pointer-events: all;
}

.spar-premium-notice {
	text-align: center;
	padding: 30px;
	background: white;
	border: 2px solid #0073aa;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	max-width: 400px;
}

.spar-premium-notice h3 {
	margin-top: 0;
	color: #0073aa;
	font-size: 18px;
}

.spar-premium-notice p {
	margin-bottom: 20px;
	color: #666;
}

/* Settings page styles */
.spar-settings-wrap {
    width: calc(100% - 25px);
}

.spar-settings-wrap h3 {
    font-size: 24px;
    margin-top: 25px;
    color: #494949;
}

/* Ensure each section heading in the main area has clear separation */
.spar-settings-main h3 {
	margin-top: 34px;           /* extra space from previous section */
	padding-top: 12px;          /* breathing room above the text */
	border-top: 1px solid #e2e2e2; /* clear visual divider */
	clear: both;                /* avoid float overlap from controls */
}

/* Tighter first heading in each tab if needed */
.spar-settings-tab h3:first-of-type {
	margin-top: 10px;
	margin-bottom: 10px;
	padding-top: 0;
	border-top: 0;
}

/* Ensure divider appears before Advanced Settings block heading */
.spar-settings-main .spar-settings-tab .spar-advanced-settings > h3 {
	border-top: 1px solid #e2e2e2;
	padding-top: 12px;
	margin-top: 34px;
}

.spar-accordion-section {
  border: 1px solid #c5c5c5;
  border-radius: 6px;
  margin-bottom: 20px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.spar-accordion-header {
  background-color: #ffffff;
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border: 1px solid #c0c0c0;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.spar-accordion-header:hover {
  background-color: #ffffff;
}

/* Earn tab accordion: match Rewards tab item styling */
.spar-earn-accordion {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.spar-earn-accordion .spar-accordion-header {
  gap: 12px;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 0;
  border-bottom: 1px solid #ececec;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-bottom: 0;
  font-size: 16px;
  cursor: default;
}

.spar-earn-accordion .spar-accordion-header label {
  flex: 1;
  cursor: default;
  display: flex !important;
  align-items: center;
}

.spar-earn-accordion .spar-accordion-body {
  margin-top: 0;
  margin-bottom: 0;
  padding: 16px;
  background: #fff;
  border: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* When an earn accordion is enabled, the header is clickable */
.spar-earn-accordion.spar-earn-enabled .spar-accordion-header {
  cursor: pointer;
}

.spar-earn-accordion.spar-earn-enabled .spar-accordion-header:hover {
  background-color: #f0f1f2;
}

.spar-earn-accordion.spar-earn-enabled .spar-accordion-header label {
  cursor: pointer;
}

.spar-earn-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Hide Edit button when accordion is not enabled */
.spar-earn-accordion .spar-earn-actions .spar-toggle-earn {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.spar-earn-accordion.spar-earn-enabled .spar-earn-actions .spar-toggle-earn {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

/* Drag handle on earn accordions — match rewards tab */
.spar-earn-accordion .spar-accordion-header .spar-drag-handle {
  cursor: grab;
  flex-shrink: 0;
}

.spar-earn-accordion .spar-accordion-header .spar-drag-handle:active {
  cursor: grabbing;
}

/* Child accordion (e.g. Social Sharing) — not independently draggable */
.spar-earn-accordion-child .spar-accordion-header {
  padding-left: 46px;
}

/* Sortable placeholder for earn accordions */
.spar-earn-sortable-placeholder {
  background: #f8f9fa;
  border: 1px dashed #c0c0c0;
  border-radius: 8px;
  visibility: visible !important;
  margin-bottom: 16px;
}

/* Earn accordion being dragged */
.spar-earn-accordion.ui-sortable-helper {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0.95;
}

.spar-accordion-header input[type="checkbox"] {
    transform: scale(1.4);
    margin-right: 10px;
}

.wrap.spar-settings-wrap input[type="checkbox"] {
    transform: scale(1.4);
    margin-right: 10px;
	margin-left: 5px;
}

.wrap.spar-settings-wrap .spar-toggle-switch input[type="checkbox"] {
    transform: none;
    margin: 0;
    opacity: 0;
    width: 0;
    height: 0;
}

.spar-accordion-body {
  margin-top: -20px;
  margin-bottom: 25px;
  padding: 20px;
  display: none;
  background-color: #fafafa;
  border: 1px solid #c0c0c0;
}

.spar-accordion-body.visible {
  display: block;
}

.spar-settings-wrap input[type="text"],
.spar-settings-wrap input[type="number"],
.spar-settings-wrap input[type="email"],
.spar-settings-wrap input[type="password"],
.spar-settings-wrap select,
.spar-settings-wrap textarea {
    width: 500px;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
	margin-top: 2px;
    margin-bottom: 10px;
    font-size: 15px;
}

.spar-default-currency-rate input[type="text"],
.spar-default-currency-rate input[type="number"],
.spar-default-currency-rate select,
#spar-currency-rates-list input[type="text"],
#spar-currency-rates-list input[type="number"],
#spar-currency-rates-list select {
	margin: 0;
}

#spar-currency-rates-list {
	margin: 5px 0;
}

.spar-settings-tab p, .spar-settings-tab label, body .spar-settings-tab {
	font-size: 15px;
	line-height: 1.75;
}

.spar-settings-tab small {
	font-size: 12px;
	margin: 0px 0px 10px 0px;
	color: #858585;
	display: block;
}

.spar-toggle-extra-settings {
	border: 1px solid #d7dfe7;
	border-radius: 6px;
	padding: 16px 18px;
	margin: 12px 0 24px;
	background: #fff;
}

.spar-toggle-extra-settings > p {
	margin: 0 0 14px;
}

.spar-toggle-extra-settings > p:last-of-type {
	margin-bottom: 0;
}

/* Shortcodes tab UI */
.spar-shortcode-tabs {
	margin: 16px 0 24px;
}

.spar-shortcode-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px 0;
}

.spar-shortcode-tab {
	border: 1px solid #c3c4c7;
	background: #f6f7f7;
	border-radius: 6px;
	padding: 6px 12px;
	font-weight: 600;
	color: #1d2327;
	cursor: pointer;
}

.spar-shortcode-tab.is-active {
	background: #fff;
	border-color: #2271b1;
	color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1 inset;
}

.spar-shortcode-tabs-panels {
	margin: 0;
}

.spar-shortcode-panel {
	display: none;
}

.spar-shortcode-panel.is-active {
	display: block;
}

.spar-shortcode-list {
	margin: 16px 0 24px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.spar-shortcode-item {
	padding: 12px 0;
	border-bottom: 1px solid #efefef;
}

.spar-shortcode-item:last-of-type {
	border-bottom: 0;
}

.spar-shortcode-label {
	display: block;
	font-weight: 600;
	color: #2c3338;
	margin-bottom: 6px;
}

.spar-shortcode-field {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.spar-shortcode-field input[type="text"] {
	min-width: 320px;
	width: 520px;
	max-width: 100%;
	background: #f9fafb;
}

.spar-shortcode-field .button {
	white-space: nowrap;
}

.spar-copy-status {
	color: #1d2327;
	font-size: 13px;
}

.spar-settings-indent {
	padding-left: 32px;
}

.spar-placeholder-help {
	margin-top: 14px;
	padding: 10px 14px;
	border: 1px dashed #c8d4e0;
	border-radius: 4px;
	background: #f7f9fc;
	font-size: 13px;
	color: #4a5568;
}

.spar-placeholder-help strong {
	display: block;
	margin-bottom: 6px;
}

.spar-placeholder-help ul {
	margin: 0;
	padding-left: 18px;
}

.spar-placeholder-help li {
	margin: 0;
	line-height: 1.5;
}

.spar-placeholder-help code {
	background: #eef2f7;
	padding: 0 4px;
	border-radius: 3px;
	font-size: 12px;
}

/* SelectWoo/Select2 fallback styles (in case WooCommerce's select2.css isn't loaded) */
.select2-hidden-accessible {
	border: 0 !important;
	clip: rect(0 0 0 0) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
}
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	height: 32px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 30px;
	padding-left: 8px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 30px;
}

/* Modern Toggle Switch Styles */
.spar-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.spar-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.spar-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.spar-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.spar-toggle-switch input:checked + .spar-toggle-slider {
    background-color: #0073aa;
}

.spar-toggle-switch input:focus + .spar-toggle-slider {
    box-shadow: 0 0 1px #0073aa;
}

/* Move the knob to the right when checked (default size) */
.spar-toggle-switch input:checked + .spar-toggle-slider:before {
	transform: translateX(26px);
}

/* Disabled state */
.spar-toggle-switch input:disabled + .spar-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Small toggle variant for accordion headers */
.spar-accordion-header .spar-toggle-switch {
    width: 44px;
    height: 20px;
}

.spar-accordion-header .spar-toggle-slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.spar-accordion-header .spar-toggle-switch input:checked + .spar-toggle-slider:before {
    transform: translateX(24px);
}

/* Add New button plus icon styling */
#spar-add-reward .dashicons-plus-alt2,
#spar-add-level .dashicons-plus-alt2 {
    margin-top: 5px;
}

/* Legacy checkbox styles for non-toggle elements */
.spar-settings-wrap input[type="radio"] {
    transform: scale(1.4);
    margin-right: 10px;
    vertical-align: middle;
}

.spar-settings-wrap label {
    display: block !important;
	line-height: 2em;
    color: #333;
}

.spar-settings-tab {
	margin-top: 20px;
}

.nav-tab {
  padding: 5px 12px;
  font-size: 17px;
}

.spar-settings-tab li {
	list-style: disc;
	margin-left: 10px;
}

/* Disabled tabs styling */
.nav-tab.spar-tab-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	position: relative;
}

.nav-tab.spar-tab-disabled:hover {
	background-color: inherit;
	border-color: inherit;
	color: inherit;
}

/* Disabled tab content styling */
.spar-settings-tab.spar-premium-disabled {
	opacity: 0.5;
	pointer-events: none;
	position: relative;
}

/* Settings Page Layout */
.spar-settings-container {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

/* Utility classes to replace inline styles */
.spar-hidden { display: none !important; }
.spar-info-box { background: #f9f9f9; border: 1px solid #ddd; padding: 15px; margin: 20px 0; }
.spar-columns-2 { columns: 2; column-gap: 30px; }
.spar-mt--10 { margin-top: -10px; }
.spar-mt--12 { margin-top: -12px; }
.spar-mt-0 { margin-top: 0; }
.spar-mb-6 { margin-bottom: 6px; }
.spar-mb-10 { margin-bottom: 10px; }
.spar-my-20 { margin-top: 20px; margin-bottom: 20px; }
.spar-minw-280 { min-width: 280px; }
.spar-full-width { width: 100% !important; }
.spar-w-200 { width: 200px; }
.spar-w-150 { width: 150px; }
.spar-flex-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.spar-flex-center-gap8 { display: flex; align-items: center; gap: 8px; }
.spar-minw-120 { min-width: 120px; }
.spar-inline-block { display: inline-block; }
.spar-display-block { display: block; }
.spar-fw-600 { font-weight: 600; }
.spar-code-badge { color:#2e7d32; background:#e8f5e9; padding:2px 6px; border-radius:4px; font-weight:600; }
.spar-muted-note { font-size:11px; color:#888; margin-left:8px; }
.spar-text-muted { color:#888; }
.spar-text-danger { color:#a00; }
.spar-small { font-size:11px; }
.spar-ml-8 { margin-left:8px; }
.spar-text-center { text-align:center; }
.spar-ul-indent { margin: 5px 0 0 18px; padding: 0; }
.spar-p-18 { padding: 18px; }

.spar-settings-main {
	flex: 1;
	max-width: calc(100% - 340px);
}
.spar-settings-main.pro {
	flex: 1;
	max-width: 100%;
}

.spar-settings-sidebar {
	width: 320px;
	flex-shrink: 0;
}

/* Left vertical tabs layout inside main area */
.spar-settings-two-col {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 20px;
	align-items: start;
}

.spar-tabs-sidebar {
	top: 32px;
	align-self: start;
}

.spar-vertical-tabs {
	margin-top: 25px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
}

.spar-vertical-tabs .nav-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	margin-left: 0;
	border: 0 !important;
	background: transparent !important;
	color: #1f2937;
	border-radius: 8px;
	font-weight: 600;
	box-shadow: none !important;
	white-space: normal !important;
}

.spar-vertical-tabs .nav-tab:hover {
	background: #f3f4f6 !important;
}

.spar-vertical-tabs .nav-tab.nav-tab-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: #ffffff !important;
	box-shadow: 0 6px 16px rgba(102,126,234,0.25);
}

.spar-tabs-content {
	min-width: 0; /* prevent grid overflow */
}

/* Ways to Earn: bold only title labels we mark explicitly */
#spar-settings-tabs .spar-settings-tab[data-tab="earn"] .spar-accordion-body label.spar-label-title {
	font-weight: 600;
}

/* Coupon Affiliates promo card in tabs sidebar */
.spar-ad-boxes {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 0px;
}

.spar-ad-box {
	width: 100%;
	max-width: 350px;
	margin-top: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

@media (min-width: 1200px) {
	.spar-ad-boxes {
		flex-wrap: nowrap;
	}

	.spar-ad-box {
		flex: 1 1 0;
		max-width: none;
	}
}

.spar-ad-box h4 {
	margin: 0 0 6px 0;
	font-size: 20px;
	line-height: 1.2;
	color: #1f2937;
}

.spar-ad-box p {
	margin: 0 0 12px 0;
	color: #4b5563;
	font-size: 13px;
	line-height: 1.5;
}

.spar-ad-box .button {
	width: 100%;
	text-align: center;
}

/* Premium Sidebar */
.spar-pro-sidebar {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	margin-top: 25px;
	padding: 25px;
	border-radius: 12px;
	box-shadow: 0 8px 25px rgba(0,0,0,0.15);
	position: sticky;
	top: 32px;
}

.spar-pro-sidebar h3 {
	margin-top: 0;
	color: white;
	font-size: 18px;
	text-align: center;
}

.spar-pro-sidebar p {
	color: rgba(255,255,255,0.9);
	line-height: 1.5;
}

.spar-pro-features {
	margin: 20px 0;
}

.spar-pro-features h4 {
	color: white;
	margin-bottom: 10px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.spar-pro-features ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.spar-pro-features li {
	color: rgba(255,255,255,0.95);
	padding: 2.5px 0;
	font-size: 13px;
}

.spar-pro-pricing {
	text-align: center;
	margin: 25px 0;
	padding: 20px;
	background: rgba(255,255,255,0.1);
	border-radius: 8px;
	backdrop-filter: blur(10px);
}

.spar-price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	margin-bottom: 5px;
}

.spar-currency {
	font-size: 18px;
	font-weight: bold;
}

.spar-amount {
	font-size: 36px;
	font-weight: bold;
	margin: 0 2px;
}

.spar-period {
	font-size: 14px;
	opacity: 0.8;
}

.spar-price-note {
	font-size: 11px;
	opacity: 0.8;
	margin: 0;
}

.spar-upgrade-btn {
	width: 100%;
	text-align: center;
	background: #57b62c !important;
	border-color: #3b781f !important;
	font-weight: bold;
	padding: 12px 20px !important;
	font-size: 16px !important;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
}

.spar-upgrade-btn:hover {
	background: #72c84b !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(59,120,31,0.4);
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.spar-guarantee {
	text-align: center;
	margin-top: 15px;
}

.spar-guarantee p {
	font-size: 11px;
	opacity: 0.8;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.spar-guarantee .dashicons {
    margin-top: 2px;
	font-size: 18px;
}

/* Save button: larger and modern */
.spar-save-actions {
	margin-top: 10px;
	text-align: left;
}

.spar-settings-wrap .spar-save-btn {
	background: #2271b1 !important; /* WP primary blue */
	border-color: #1f6aa5 !important;
	color: #ffffff !important;
	border-radius: 10px;
	padding: 5px 20px !important;
	font-size: 16px !important;
	font-weight: 700;
	letter-spacing: 0.2px;
	box-shadow: 0 8px 20px rgba(34, 113, 177, 0.25);
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.spar-settings-wrap .spar-save-btn:hover {
	background: #135e96 !important;
	border-color: #135e96 !important;
	filter: brightness(1.02);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(34, 113, 177, 0.35);
}

.spar-settings-wrap .spar-save-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 16px rgba(34, 113, 177, 0.25);
}

.spar-settings-wrap .spar-save-btn:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.35), 0 8px 20px rgba(34, 113, 177, 0.25);
}

.spar-settings-wrap .spar-save-btn[disabled] {
	opacity: .7;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Setup Guide Row */
.spar-setup-guide { 
	background:#ffffff; 
	border:1px solid #e2e8f0; 
	padding:22px 24px 28px; 
	border-radius:14px; 
	margin:10px 0 10px 0; 
	box-shadow:0 4px 10px rgba(0,0,0,0.04);
}
.spar-setup-guide-title { 
	margin:0 0 4px; 
	font-size:22px; 
	line-height:1.25; 
	background:linear-gradient(135deg,#667eea,#764ba2); 
	background-clip:text; 
	-webkit-background-clip:text; 
	color:transparent; 
	font-weight:700;
}
.spar-setup-guide-intro { 
	margin:0 0 18px; 
	color:#4b5563; 
	font-size:14px;
}
.spar-setup-guide-row { 
	display:grid; 
	grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); 
	gap:18px;
}
.spar-setup-guide-step { 
	display:grid; 
	grid-template-columns: auto 1fr; 
	grid-template-rows: auto auto auto; 
	gap: 8px 12px; 
	background:#f9fafb; 
	border:1px solid #e5e7eb; 
	border-radius:12px; 
	padding:16px 14px 18px; 
	text-decoration:none; 
	color:#1f2937; 
	position:relative; 
	box-shadow:0 2px 4px rgba(0,0,0,0.03); 
	transition:background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.spar-setup-guide-step:hover { 
	background:#ffffff; 
	box-shadow:0 6px 16px rgba(0,0,0,0.08); 
	transform:translateY(-2px);
}
.spar-setup-guide-step:focus { 
	outline:2px solid #667eea; 
	outline-offset:2px;
}
.spar-setup-guide-step h3 { 
	margin:0 0 6px; 
	font-size:15px;
	line-height:32px;
	font-weight:600;
	grid-column: 2; 
	grid-row: 1;
}
.spar-setup-guide-step p { 
	margin:0; 
	font-size:13px; 
	line-height:1.4; 
	color:#4b5563;
	grid-column: 1 / -1; 
	grid-row: 2;
}
.spar-setup-guide-actions { 
	padding-top:10px; 
	display:flex; 
	flex-wrap:wrap;
	grid-column: 1 / -1; 
	grid-row: 3;
}
.spar-setup-btn { 
	margin-top:8px; 
	align-self:flex-start;
}
.spar-step-number { 
	width:34px; 
	height:34px; 
	background:linear-gradient(135deg,#667eea,#764ba2); 
	color:#fff; 
	font-weight:700; 
	border-radius:10px; 
	display:flex; 
	align-items:center; 
	justify-content:center; 
	font-size:15px; 
	margin:0; 
	box-shadow:0 3px 8px rgba(102,126,234,0.35);
	grid-column: 1; 
	grid-row: 1;
}
.spar-step-pro-badge { 
	background:linear-gradient(135deg,#ff6b6b,#ee5a24); 
	color:#fff; 
	padding:2px 6px; 
	font-size:10px; 
	border-radius:8px; 
	margin-left:6px; 
	vertical-align:middle; 
	font-weight:700; 
	letter-spacing:.5px;
}
.spar-step-premium-disabled { 
	filter:grayscale(0.6); 
	opacity:.55; 
	cursor:not-allowed; 
	pointer-events:none; 
	position:relative;
}
.spar-step-premium-disabled::after { 
	content:''; 
	position:absolute; 
	inset:0; 
	border-radius:12px; 
	background:linear-gradient(145deg,rgba(255,255,255,0.8),rgba(255,255,255,0.3));
}
@media (max-width:782px){
	.spar-setup-guide { padding:18px 16px 22px; }
	.spar-setup-guide-row { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; }
	.spar-setup-guide-step { padding:14px 12px 16px; }
	.spar-step-number { width:30px; height:30px; font-size:14px; margin:0; }
}

@media (prefers-reduced-motion:reduce){
	.spar-setup-guide-step, .spar-setup-guide-step:hover { transform:none; transition:none; }
}

/* Keep left alignment on all screens */

@media (prefers-reduced-motion: reduce) {
	.spar-settings-wrap .spar-save-btn { transition: none; }
	.spar-settings-wrap .spar-save-btn:hover { transform: none; }
}

/* Premium Features Styling */
.spar-voucher-settings {
	position: relative;
	margin-top: 30px;
}

.spar-voucher-settings.spar-premium-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* Advanced settings styling */
.spar-advanced-settings.spar-premium-disabled {
	opacity: 0.8;
	pointer-events: none;
	position: relative;
}

/* Premium disabled sections styling - consolidated overlay */
.spar-advanced-settings.spar-premium-disabled::after,
.spar-referral-gift-offers.spar-premium-disabled::after,
.spar-referral-gift-widget.spar-premium-disabled::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.5);
	z-index: 1;
	pointer-events: none;
	border-radius: 4px;
}

/* Premium disabled sections styling within earn tab */
.spar-referral-gift-offers.spar-premium-disabled,
.spar-referral-gift-widget.spar-premium-disabled {
	opacity: 0.8;
	pointer-events: none;
	position: relative;
}

.spar-premium-settings-badge {
	background: #0073aa;
	color: white;
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 3px;
	margin-left: 8px;
	font-weight: normal;
}

.spar-premium-settings-badge-small {
	background: linear-gradient(135deg, #ff6b6b, #ee5a24);
	color: white;
	font-size: 14px;
	font-weight: bold;
	padding: 2px 6px;
	border-radius: 10px;
	margin-top: -4px;
	margin-left: 5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);

	line-height: 1;
}

/* Disabled buttons within premium sections */
.spar-premium-disabled button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1200px) {
	.spar-settings-container {
		flex-direction: column;
	}
	
	.spar-settings-main {
		max-width: 100%;
	}
	
	.spar-settings-sidebar {
		width: 100%;
	}
	
	.spar-pro-sidebar {
		position: static;
	}

	/* Stack tabs above content on smaller screens */
	.spar-settings-two-col {
		grid-template-columns: 1fr;
	}
	.spar-tabs-sidebar { position: static; }
	.spar-vertical-tabs {
		flex-direction: row;
		flex-wrap: wrap;
		max-height: none;
		overflow: visible;
	}
	.spar-vertical-tabs .nav-tab { border-radius: 6px; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.spar-settings-box-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	
	.spar-settings-toggle {
		align-self: flex-end;
	}
}

/* Rewards & Levels tabs */
.spar-rewards-settings,
.spar-levels-settings {
	margin-top: 10px;
}

/* Item containers */
.spar-reward-item,
.spar-level-item {
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 8px;
	margin-bottom: 16px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* Disabled state for free version items */
.spar-reward-item.spar-reward-disabled,
.spar-level-item.spar-level-disabled {
	opacity: 0.7;
}

/* Headers */
.spar-reward-header,
.spar-level-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #f8f9fa;
	border-bottom: 1px solid #ececec;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.spar-reward-header.clickable-header { cursor: pointer; }
.spar-level-header.clickable-header { cursor: pointer; }

.spar-reward-header h4,
.spar-level-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	flex: 1;
}

/* Badge icons */
.spar-reward-type-badge,
.spar-level-badge,
.spar-cr-type-emoji,
.spar-earn-type-badge {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	font-size: 20px;
	background: #eef1f4;
	border-radius: 50%;
	flex-shrink: 0;
}

.spar-earn-type-badge {
	margin: 0 14px 0 8px;
}

/* WooCommerce help tips (tipTip). */
.spar-label-title .woocommerce-help-tip {
	margin-left: 6px;
	vertical-align: text-bottom;
}

/* Fallback icon rendering if WooCommerce admin styles aren't loaded. */
.spar-label-title .woocommerce-help-tip:empty {
	display: inline-block;
	width: 16px;
	height: 16px;
	line-height: 16px;
	cursor: help;
}

.spar-label-title .woocommerce-help-tip:empty:before {
	font-family: dashicons;
	content: "\f223";
	font-size: 16px;
	color: #646970;
}

/* Fallback tipTip styles (if WooCommerce admin styles aren't loaded). */
#tiptip_holder {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 9999999;
}

#tiptip_content {
	font-size: 12px;
	line-height: 1.4;
	color: #fff;
	padding: 8px 10px;
	background: #1d2327;
	border-radius: 4px;
	max-width: 320px;
}

#tiptip_arrow,
#tiptip_arrow_inner {
	position: absolute;
	border-color: transparent;
	border-style: solid;
	border-width: 6px;
	height: 0;
	width: 0;
}

#tiptip_holder.tip_top #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -6px;
	border-top-color: #1d2327;
}

#tiptip_holder.tip_bottom #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -6px;
	border-bottom-color: #1d2327;
}

#tiptip_holder.tip_right #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -6px;
	border-right-color: #1d2327;
}

#tiptip_holder.tip_left #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -6px;
	border-left-color: #1d2327;
}

.spar-tooltip-icon {
	margin-left: 6px;
	cursor: help;
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
	vertical-align: text-bottom;
}

/* Header actions */
.spar-reward-actions,
.spar-level-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.spar-reward-actions .button,
.spar-level-actions .button {
	height: auto;
	line-height: 1.6;
}

/* Content areas */
.spar-reward-content,
.spar-level-content,
.spar-level-content-starter {
	padding: 16px;
	background: #fff;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

/* Grid rows */
.spar-reward-row,
.spar-level-row {
	margin-bottom: 12px;
}

.spar-level-col {
	margin-bottom: 12px;
}

.spar-reward-col label,

/* Conditional Rules: Apply To boxes */
.spar-cr-ways-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

/* Conditional Rules: 3-column layout */
.spar-cr-columns {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 16px;
	margin-top: 12px;
}

.spar-cr-col {
	padding: 12px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	box-sizing: border-box;
}

.spar-cr-col-title {
	font-weight: 600;
	margin: 0 0 10px 0;
}

.spar-cr-product-actions-notice {
	margin: 12px 0px !important;
}

.spar-cr-conditions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.spar-cr-condition-group {
	border: 1px solid #e1e4e8;
	background: #f9fafb;
	border-radius: 8px;
	padding: 12px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.spar-cr-condition-group .spar-cr-and-label {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #50575e;
}

.spar-cr-and-actions {
	margin-top: 10px;
	text-align: right;
}

.spar-cr-and-footer {
	display: flex;
	justify-content: flex-end;
}

.spar-cr-col .spar-cr-ways-grid {
	margin-top: 0;
}

.spar-cr-col-title {
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 12px;
	padding: 8px 12px;
	background: #f6f7f7;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
}

.spar-cr-col-actions input[type="number"] {
	max-width: 160px;
}

@media (max-width: 900px) {
	.spar-cr-columns { grid-template-columns: 1fr; }
	.spar-cr-col-actions input[type="number"] { max-width: 220px; }
}

.spar-cr-way-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 8px;
	min-height: 40px;
	cursor: pointer;
}

.spar-cr-item[data-spar-cr-scope="order"] .spar-cr-way-wrap[data-spar-cr-way-scope="nonorder"] {
	display: none !important;
}

.spar-cr-way-wrap input[type="checkbox"] {
	margin: 0;
}

.spar-cr-way-label {
	font-weight: 500;
	line-height: 1.3;
}

@media (max-width: 700px) {
	.spar-cr-way-wrap { flex-basis: 100%; }
}
.spar-level-col label {
	font-weight: 600;
	color: #2c3e50;
}

/* Field groups */
.spar-field-group { margin: 14px 0; }
.spar-toggle-label { user-select: none; }

/* Starter level special block */
.spar-level-zero-option .spar-level-item.spar-level-starter {
	border-style: dashed;
}

/* Add button spacing */
#spar-add-reward,
#spar-add-level {
	margin-top: 6px;
}

/* ─────────────── Level benefit section boxes ─────────────── */
.spar-level-section-box {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 12px 0;
	max-width: 600px;
}

.spar-level-section-box-title {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e0e0e0;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.spar-level-section-box .spar-level-row {
	margin-bottom: 8px;
}

.spar-level-section-box .spar-level-row:last-child {
	margin-bottom: 0;
}

/* Per-earn-type multiplier overrides */
.spar-earn-type-multipliers {
	margin: 6px 0 4px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
}
.spar-earn-multiplier-row {
	margin-bottom: 6px;
}
.spar-earn-multiplier-row .spar-level-col {
	display: flex;
	align-items: center;
	gap: 8px;
}
.spar-earn-multiplier-row .spar-level-col label {
	min-width: 160px;
	font-weight: 500;
	margin-bottom: 0;
}
.spar-earn-multiplier-row .spar-level-col input[type="number"] {
	width: 100px;
}
.spar-earn-type-multipliers > small.spar-text-muted {
	display: block;
	margin-top: 8px;
	color: #888;
	font-style: italic;
}

/* Info sections */
.spar-rewards-info,
.spar-levels-info {
	margin-top: 14px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 14px 16px;
}

.spar-rewards-info h4,
.spar-levels-info h4 {
	margin: 0 0 8px 0;
}

.spar-rewards-info ul,
.spar-levels-info ul {
	margin: 0 0 0 18px;
}

/* Responsive adjustments for item rows */
@media (max-width: 782px) {
	.spar-reward-row,
	.spar-level-row {
		grid-template-columns: 1fr;
	}
}

/* Inline rows for currency earning rates */
.spar-default-currency-rate,
.spar-currency-rate-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap; /* keep in one line on typical screens */
}

/* Override global label block rule inside our inline rows */
.spar-default-currency-rate label,
.spar-currency-rate-row label {
	display: inline-block !important;
	margin: 0;
}

/* Tighter inputs/selects for inline appearance */
.spar-default-currency-rate input,
.spar-default-currency-rate select,
.spar-currency-rate-row input,
.spar-currency-rate-row select {
	margin-bottom: 0;
}

.spar-currency-rate-row .spar-remove-currency-rate {
	line-height: 26px;
	height: 28px;
	padding: 0 8px;
}

.spar-default-currency-rate .description { margin-left: 4px; white-space: nowrap; }

#spar-settings-tabs p.description {
	margin: 0;
	color: #9b9b9b;
	font-size: 12px;
}

/* Enforce compact widths inside inline rows overriding global 500px */
.spar-default-currency-rate input[type="number"],
.spar-currency-rate-row input[type="number"] {
	width: 120px !important;
}
.spar-default-currency-rate select,
.spar-currency-rate-row select {
	width: 200px !important;
}

/* Allow wrapping on small screens */
@media (max-width: 782px) {
	.spar-default-currency-rate,
	.spar-currency-rate-row {
		flex-wrap: wrap;
	}
}

	/* PRO Features tab: dark green animated background when inactive (not opened) */
	.spar-vertical-tabs .nav-tab[data-tab="pro-modules"]:not(.nav-tab-active) {
		color: #ffffff !important;
		/* Lighter green gradient with smooth motion */
		background: linear-gradient(135deg, #1e7d3a, #2faa54, #1e7d3a) !important;
		background-size: 300% 300% !important;
		animation: sparProTabGradient 6s ease infinite, sparProTabGlow 2.8s ease-in-out infinite;
		border: 1px solid #1d7a39 !important;
		box-shadow: 0 3px 10px rgba(46, 164, 79, 0.28);
	}

	.spar-vertical-tabs .nav-tab[data-tab="pro-modules"]:not(.nav-tab-active):hover {
		filter: brightness(1.06);
	}

	@keyframes sparProTabGradient {
		0% { background-position: 0% 50%; }
		50% { background-position: 100% 50%; }
		100% { background-position: 0% 50%; }
	}

	@keyframes sparProTabGlow {
		0%, 100% { box-shadow: 0 3px 10px rgba(46, 164, 79, 0.28); }
		50% { box-shadow: 0 6px 16px rgba(46, 164, 79, 0.45); }
	}

	@media (prefers-reduced-motion: reduce) {
		.spar-vertical-tabs .nav-tab[data-tab="pro-modules"]:not(.nav-tab-active) {
			animation: none;
			background: #2faa54 !important; /* static lighter green */
			box-shadow: 0 3px 10px rgba(46, 164, 79, 0.28);
		}
	}

/* ─────────────── Spin Wheel section boxes ─────────────── */
.spar-spin-section-box {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 16px;
	margin: 12px 0;
	max-width: 600px;
}

.spar-spin-section-box-title {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e0e0e0;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.spar-spin-section-box--prizes {
	max-width: 100%;
}

/* ─────────────── Admin Prize Table overrides ─────────────── */
/* Override global width:500px on inputs inside the prizes table */
.spar-settings-wrap .spar-spin-prizes-table input[type="text"],
.spar-settings-wrap .spar-spin-prizes-table input[type="number"],
.spar-settings-wrap .spar-spin-prizes-table select {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 5px 7px;
	font-size: 13px;
	box-sizing: border-box;
}

/* ─────────────── Ways to Earn Sortable Order ─────────────── */
.spar-earn-ways-sortable {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 480px;
}

.spar-earn-way-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 8px 12px;
	margin-bottom: 6px;
	margin-left: 0 !important;
	cursor: grab;
	user-select: none;
}

.spar-earn-way-item:active {
	cursor: grabbing;
}

.spar-earn-way-item:hover {
	border-color: #0073aa;
	background: #f9f9f9;
}

.spar-earn-way-handle {
	cursor: inherit;
	color: #999;
	font-size: 18px;
	flex-shrink: 0;
}

.spar-earn-way-label {
	flex: 1;
	font-size: 13px;
}

.spar-earn-way-item.ui-sortable-helper {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-color: #0073aa;
	opacity: 0.95;
}

.spar-earn-way-item.ui-sortable-placeholder {
	background: #eaf4fb;
	border: 1px dashed #0073aa;
	visibility: visible !important;
}

/* Terms & Conditions generate button row */
.spar-terms-generate-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.spar-terms-generate-row .button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
