.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;
}

/* Shared settings section boxes */
.spar-settings-section {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
	margin: 18px 0;
	box-sizing: border-box;
}

.spar-settings-section--master {
	padding: 14px 18px;
}

/* List-type sections contain item cards that carry their own margin-bottom (16px).
   Trim bottom padding so all four sides look visually equal (18px). */
.spar-settings-section--list {
	padding-bottom: 2px;
}

.spar-settings-section-header {
	display: block;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f1;
}

.spar-settings-section-header h4 {
	margin: 0 0 5px;
	color: #1d2327;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

.spar-settings-section-header p {
	margin: 0;
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
	max-width: 720px;
}

.spar-settings-section > h4:first-child {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.3;
}

.spar-settings-section > p:last-child {
	margin-bottom: 0;
}

/* Points Delay tab */
.spar-points-delay-settings {
	max-width: 920px;
}

.spar-delay-section {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
	margin: 18px 0;
}

.spar-delay-section--master {
	padding: 14px 18px;
}

.spar-delay-section-header {
	display: block;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f1;
}

.spar-delay-section-header h4 {
	margin: 0 0 5px;
	color: #1d2327;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}

.spar-delay-section-header p {
	margin: 0;
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
	max-width: 720px;
}

.spar-settings-toggle-label,
.spar-delay-toggle-label,
.spar-delay-no-delay {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

.spar-delay-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.spar-delay-controls label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.spar-delay-controls input[type="number"] {
	width: 72px;
	min-height: 36px;
}

.spar-delay-controls select {
	min-height: 36px;
}

.spar-delay-methods {
	display: grid;
	gap: 8px;
}

.spar-delay-method-row {
	display: grid;
	grid-template-columns: minmax(160px, 1fr) auto max-content;
	align-items: center;
	column-gap: 14px;
	min-height: 42px;
	padding: 7px 10px 7px 14px;
	border: 1px solid #dfe3e8;
	border-radius: 6px;
	background: #fbfcfd;
}

.spar-delay-method-name {
	min-width: 0;
	font-size: 13px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.spar-delay-method-row .spar-delay-controls {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
}

.spar-delay-by-label {
	font-size: 13px;
	color: #646970;
	white-space: nowrap;
}

.spar-delay-method-row .spar-delay-controls label {
	display: block;
	margin: 0;
}

.spar-delay-method-row .spar-delay-controls input[type="number"],
.spar-delay-method-row .spar-delay-controls select {
	min-height: 34px !important;
	height: 34px !important;
	margin: 0;
	font-size: 13px;
	line-height: 1 !important;
	box-sizing: border-box;
}

.spar-delay-method-row .spar-delay-controls input[type="number"] {
	width: 80px !important;
	padding: 0 6px !important;
	text-align: center;
}

.spar-delay-method-row .spar-delay-controls select {
	width: 120px !important;
	padding: 0 24px 0 8px !important;
	background-position: right 8px top 55%;
}

.spar-delay-method-row .spar-delay-no-delay {
	gap: 6px;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
}

.spar-delay-method-row .spar-toggle-switch {
	width: 34px;
	height: 18px;
	margin-right: 0;
}

.spar-delay-method-row .spar-toggle-slider:before {
	height: 12px;
	width: 12px;
}

.spar-delay-method-row .spar-toggle-switch input:checked + .spar-toggle-slider:before {
	transform: translateX(16px);
}

.spar-delay-global-controls {
	flex-wrap: nowrap;
	align-items: center;
}

.spar-delay-global-controls input[type="number"],
.spar-delay-global-controls select {
	min-height: 34px !important;
	height: 34px !important;
	margin: 0;
	font-size: 13px;
	line-height: 1 !important;
	box-sizing: border-box;
}

.spar-delay-global-controls input[type="number"] {
	width: 80px !important;
	padding: 0 6px !important;
	text-align: center;
}

.spar-delay-global-controls select {
	width: 120px !important;
	padding: 0 24px 0 8px !important;
	background-position: right 8px top 55%;
}

.spar-delay-global-controls .spar-delay-by-label {
	flex-shrink: 0;
}

.spar-delay-hidden {
	display: none !important;
}

.spar-delay-section.is-disabled {
	display: none;
}

.spar-delay-method-row.is-no-delay [data-delay-controls] {
	opacity: 0.55;
}

.spar-delay-empty-message {
	margin: 12px 0 0;
	color: #646970;
}

@media (max-width: 782px) {
	.spar-settings-section-header,
	.spar-delay-section-header {
		display: block;
	}

	.spar-delay-method-row {
		grid-template-columns: 1fr;
		row-gap: 10px;
		align-items: start;
	}

	.spar-delay-controls,
	.spar-delay-no-delay {
		margin-top: 10px;
	}

	.spar-delay-method-row .spar-delay-controls,
	.spar-delay-method-row .spar-delay-no-delay {
		margin-top: 0;
	}
}

.nav-tab.spar-premium-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* PRO tab — clickable in free version with a badge indicator */
.nav-tab.spar-pro-tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.spar-pro-badge-nav {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	padding: 1px 5px;
	border-radius: 3px;
	line-height: 1.6;
	flex-shrink: 0;
}

/* Upgrade notice banner shown at the top of locked PRO tabs */
.spar-pro-tab-notice {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #f0f6ff;
	border: 1px solid #c3d9f7;
	border-left: 4px solid #0073aa;
	border-radius: 4px;
	padding: 14px 18px;
	margin-bottom: 24px;
}

.spar-pro-tab-notice .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #0073aa;
	flex-shrink: 0;
}

.spar-pro-tab-notice-content {
	flex: 1;
}

.spar-pro-tab-notice-content strong {
	font-size: 14px;
	display: block;
	margin-bottom: 2px;
}

.spar-pro-tab-notice-content p {
	margin: 0;
	color: #555;
	font-size: 13px;
}

.spar-pro-tab-notice .button {
	flex-shrink: 0;
	white-space: nowrap;
}

/* ── PRO Feature Sales Pages ──────────────────────────────────────────────── */

.spar-pro-sales-page {
	max-width: 820px;
}

/* Hero banner */
.spar-pro-sales-hero {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 8px;
	padding: 28px 24px;
	margin-top: 27px;
	margin-bottom: 25px;
}

.spar-pro-sales-hero-icon {
	font-size: 48px;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 2px;
}

.spar-pro-sales-hero-content h2 {
	color: #fff;
	margin: 0 0 10px;
	font-size: 22px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.spar-pro-sales-hero-content p {
	margin: 0;
	font-size: 14px;
	opacity: 0.92;
	line-height: 1.6;
}

/* Inline PRO badge inside headings */
.spar-pro-badge-inline {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	padding: 2px 8px;
	border-radius: 10px;
	vertical-align: middle;
}

/* Feature highlight cards grid */
.spar-pro-sales-features {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 24px;
}

.spar-pro-sales-feature {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 14px 16px;
}

.spar-pro-sales-feature .dashicons {
	color: #667eea;
	font-size: 20px;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 4px;
}

.spar-pro-sales-feature strong {
	display: block;
	font-size: 13px;
	margin-bottom: 4px;
	color: #1d2327;
}

.spar-pro-sales-feature p {
	margin: 0;
	font-size: 12px;
	color: #646970;
	line-height: 1.5;
}

/* "What you can configure" config card */
.spar-pro-sales-config {
	background: #f6f7f7;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 18px 22px;
	margin-bottom: 24px;
}

.spar-pro-sales-config h4 {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.spar-pro-sales-config ul {
	margin: 0;
	padding: 0 0 0 18px;
	columns: 2;
	column-gap: 24px;
}

.spar-pro-sales-config ul li {
	font-size: 12px;
	color: #50575e;
	margin-bottom: 5px;
	break-inside: avoid;
	line-height: 1.4;
}

/* Upgrade CTA footer */
.spar-pro-sales-cta {
	display: flex;
	align-items: center;
	gap: 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-left: 4px solid #667eea;
	border-radius: 6px;
	padding: 18px 22px;
}

.spar-pro-sales-cta-text {
	flex: 1;
}

.spar-pro-sales-cta-text strong {
	display: block;
	font-size: 14px;
	color: #1d2327;
	margin-bottom: 4px;
}

.spar-pro-sales-cta-text p {
	margin: 0;
	font-size: 12px;
	color: #646970;
}

.spar-pro-sales-cta .button-hero {
	white-space: nowrap;
	flex-shrink: 0;
	background: #667eea;
	border-color: #5a6fd6;
	color: #fff;
	text-decoration: none;
}

.spar-pro-sales-cta .button-hero:hover,
.spar-pro-sales-cta .button-hero:focus {
	background: #5a6fd6;
	border-color: #4f63c9;
	color: #fff;
}

.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: 39px;           /* 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-settings-tab .spar-accordion:not(.spar-earn-accordion):not(.spar-cr-item) {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin: 18px 0;
	box-sizing: border-box;
}

.spar-settings-tab .spar-accordion:not(.spar-earn-accordion):not(.spar-cr-item) > .spar-accordion-header {
	background: #fff;
	border: 0;
	border-bottom: 1px solid #dcdcde;
	border-radius: 0;
	margin: 0;
	padding: 14px 18px;
	font-size: 15px;
	line-height: 1.3;
}

.spar-settings-tab .spar-accordion:not(.spar-earn-accordion):not(.spar-cr-item) > .spar-accordion-body {
	background: #fff;
	border: 0;
	margin: 0;
	padding: 18px;
}

.spar-settings-tab .spar-cr-item {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	margin: 18px 0;
	box-sizing: border-box;
}

.spar-settings-tab .spar-cr-item > .spar-accordion-header {
	border: 0;
	border-bottom: 1px solid #dcdcde;
	margin: 0;
}

.spar-settings-tab .spar-cr-item > .spar-accordion-body {
	background: #fff;
	border: 0;
	margin: 0;
	padding: 18px;
}

.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 #dcdcde;
  border-radius: 8px;
  margin-bottom: 16px;
}

.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-premium-disabled .spar-accordion-header {
  padding: 14px 16px;
  gap: 12px;
}

.spar-premium-disabled .spar-accordion-header label {
  display: flex !important;
  align-items: center;
  margin: 0;
}

.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-accordion-header label {
  cursor: pointer;
  margin: 0;
}

.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: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
	margin: 18px 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);
}

.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-header { 
	display:flex; 
	align-items:center; 
	justify-content:space-between; 
	margin:0 0 4px;
}
.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 #dcdcde;
	border-radius: 8px;
	margin-bottom: 16px;
}

/* 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;
}

.spar-reward-type-badge .spar-fa-icon,
.spar-level-badge .spar-fa-icon {
	font-size: 20px;
	line-height: 1;
}

/* 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;
}

/* Utility: apply theme gradient to any badge icon or text span (mirrors reward-points.css) */
.spar-badge-icon--gradient {
	background: linear-gradient(135deg, var(--spar-theme-color-1, #667eea), var(--spar-theme-color-2, #764ba2));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.spar-reward-icon-row {
	display: grid;
	grid-template-columns: minmax(260px, 420px) auto;
	justify-content: start;
	gap: 12px;
	align-items: start;
}

.spar-reward-icon-select-col {
	min-width: 0;
}

.spar-reward-badge-color-col {
	justify-self: start;
	min-width: 96px;
}

.spar-reward-icon-select-col .spar-reward-badge-select {
	width: 100%;
	max-width: 100%;
}

input[type="color"].spar-reward-badge-color-input {
	width: 48px;
	min-width: 48px;
	height: 30px;
	padding: 2px;
	cursor: pointer;
}

.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: minmax(240px, 0.9fr) minmax(280px, 1.1fr) minmax(260px, 1fr);
	gap: 16px;
	margin-top: 12px;
}

.spar-cr-col {
	min-width: 0;
	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: 1200px) {
	.spar-cr-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.spar-cr-col-rules {
		grid-column: 1 / -1;
	}

	.spar-cr-col-actions input[type="number"] {
		max-width: 220px;
	}
}

@media (max-width: 900px) {
	.spar-cr-columns {
		grid-template-columns: 1fr;
	}

	.spar-cr-col-rules {
		grid-column: auto;
	}
}

.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; width: fit-content; }
label:has(.spar-toggle-switch) { width: fit-content; }

/* 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;
	margin-bottom: 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 18px;
}

.spar-how-it-works {
	margin: 0;
}

.spar-how-it-works summary {
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	user-select: none;
}

.spar-how-it-works summary::-webkit-details-marker {
	display: none;
}

.spar-how-it-works summary::after {
	content: '\25BC';
	font-size: 10px;
	color: #888;
	transition: transform 0.2s ease;
	display: inline-block;
}

.spar-how-it-works[open] summary::after {
	transform: rotate(180deg);
}

.spar-how-it-works ul {
	margin: 8px 0 0 18px;
}

/* Responsive adjustments for item rows */
@media (max-width: 782px) {
	.spar-reward-row,
	.spar-level-row {
		grid-template-columns: 1fr;
	}

	.spar-reward-icon-row {
		grid-template-columns: 1fr;
	}

	.spar-reward-badge-color-col {
		justify-self: start;
	}
}

/* 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;
}
