/* Floating Rewards Widget */
#spar-rewards-widget-container {
	position: fixed;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

#spar-rewards-widget-container.position-bottom-left {
	bottom: 20px;
	left: 20px;
}

#spar-rewards-widget-container.position-bottom-right {
	bottom: 20px;
	right: 20px;
}

#spar-rewards-widget-container.position-top-left {
	top: 20px;
	left: 20px;
}

#spar-rewards-widget-container.position-top-right {
	top: 20px;
	right: 20px;
}

#spar-rewards-widget-container.position-center-left-vertical {
	left: 0;
	top: 50%;
	transform: translateY(-50%);
}

#spar-rewards-widget-container.position-center-right-vertical {
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}

/* Theme transition smoothing */
#spar-rewards-widget-container,
#spar-rewards-widget-container #spar-rewards-widget-popup,
#spar-rewards-widget-container .spar-rewards-popup-header,
#spar-rewards-widget-container .spar-rewards-tab,
#spar-rewards-widget-container .spar-rewards-tab-content,
#spar-rewards-widget-container .spar-rewards-footer,
#spar-rewards-widget-container .spar-earn-item,
#spar-rewards-widget-container .spar-claim-item,
#spar-rewards-widget-container .spar-history-entry,
#spar-rewards-widget-container .spar-rewards-login-prompt,
#spar-rewards-widget-container .spar-refer-stat,
#spar-rewards-widget-container .spar-refer-link,
#spar-rewards-widget-container .spar-guest-signup-message,
#spar-rewards-widget-container .spar-refer-input,
#spar-rewards-widget-container .spar-claim-subtabs,
#spar-rewards-widget-container .spar-claim-subtab,
#spar-rewards-widget-container .spar-widget-current-level,
#spar-rewards-widget-container .spar-widget-total-earned,
#spar-rewards-widget-container .spar-widget-level-card,
#spar-rewards-widget-container .spar-redeem-compact,
#spar-rewards-widget-container .spar-redeem-compact--account,
#spar-rewards-widget-container .spar-redeem-compact--account .spar-panel-row,
#spar-rewards-widget-container .spar-redeem-compact--account .spar-discount-box,
#spar-rewards-widget-container .spar-redeem-compact--account .spar-redeem-summary,
#spar-rewards-widget-container .spar-voucher-message,
#spar-rewards-widget-container .spar-voucher-code,
#spar-rewards-widget-container .spar-voucher-applied-status,
#spar-rewards-widget-container .spar-unused-voucher-item,
#spar-rewards-widget-container .spar-claim-item .spar-reward-countdown {
	transition: background-color 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Widget Button */
#spar-rewards-widget-button {
	background: linear-gradient(135deg, var(--spar-rewards-color-primary), var(--spar-rewards-color-secondary));
	color: white;
	border: none;
	border-radius: 25px;
	padding: 12px 20px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
	min-width: 80px;
	justify-content: center;
}

#spar-rewards-widget-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#spar-rewards-widget-button.animate {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

.spar-widget-icon {
	font-size: 18px;
	display: inline-block;
}

.spar-widget-icon img {
	width: 18px;
	height: 18px;
	display: block;
}

.spar-widget-text {
	font-weight: 600;
}

.spar-widget-points {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	padding: 2px 8px;
	font-size: 12px;
	margin-left: 5px;
}

/* Widget Popup */
#spar-rewards-widget-popup {
	position: absolute;
	background: white;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	width: 350px;
	height: 450px;
	overflow: hidden;
	transform: scale(0.8);
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	/* Prevent blocking page interactions when hidden */
	pointer-events: none;
	visibility: hidden;
}

#spar-rewards-widget-container.size-large #spar-rewards-widget-popup {
	width: 420px;
	height: 560px;
	max-width: 90vw;
	max-height: 90vh;
}

#spar-rewards-widget-container.size-extra-large #spar-rewards-widget-popup {
	width: 520px;
	height: 680px;
	max-width: 90vw;
	max-height: 90vh;
}

#spar-rewards-widget-container.size-full-height #spar-rewards-widget-popup {
	width: 420px;
	height: calc(100vh - 140px);
	max-width: 90vw;
	max-height: calc(100vh - 140px);
}

#spar-rewards-widget-container.size-large .spar-rewards-tab-content,
#spar-rewards-widget-container.size-extra-large .spar-rewards-tab-content,
#spar-rewards-widget-container.size-full-height .spar-rewards-tab-content {
	height: auto;
	flex: 1 1 auto;
	min-height: 0;
}

#spar-rewards-widget-popup.show {
	transform: scale(1);
	opacity: 1;
	/* Re-enable interactions when visible */
	pointer-events: auto;
	visibility: visible;
}

.position-bottom-left #spar-rewards-widget-popup,
.position-bottom-right #spar-rewards-widget-popup {
	bottom: 70px;
}

.position-top-left #spar-rewards-widget-popup,
.position-top-right #spar-rewards-widget-popup {
	top: 70px;
}

.position-bottom-right #spar-rewards-widget-popup,
.position-top-right #spar-rewards-widget-popup {
	right: 0;
}

.position-bottom-left #spar-rewards-widget-popup,
.position-top-left #spar-rewards-widget-popup {
	left: 0;
}

/* Popup Header */
.spar-rewards-popup-header {
	background: linear-gradient(135deg, var(--spar-rewards-color-primary), var(--spar-rewards-color-secondary));
	color: white;
	padding: 20px;
	position: relative;
	text-align: center;
}

.spar-rewards-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	color: white;
	font-size: 18px;
	cursor: pointer;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.spar-rewards-theme-toggle {
	position: absolute;
	top: 15px;
	left: 15px;
	background: none;
	border: none;
	color: white;
	font-size: 16px;
	cursor: pointer;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.spar-rewards-theme-toggle:hover {
	background: rgba(255, 255, 255, 0.2);
}

.spar-rewards-popup-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

h3.spar-rewards-popup-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
    color: #fff;
}

.spar-rewards-user-points {
	margin: 10px 0 0 0;
	font-size: 14px;
	opacity: 0.9;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* History Icon */
.spar-rewards-history-icon {
	background: rgba(255, 255, 255, 0);
	border: none;
	color: white;
	font-size: 16px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	padding: 0;
	margin-right: -10px;
}

/* History Section */
.spar-rewards-history-section {
	background: white;
	max-height: 300px;
	overflow-y: auto;
}

.spar-widget-empty-message {
	text-align: center;
	color: #6c757d;
	padding: 20px;
}

.spar-history-view-all {
	text-align: center;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #eee;
}

.spar-history-view-all-link {
	color: #007cba;
	text-decoration: none;
	font-weight: 500;
}

/* History content when shown as tab */
.spar-rewards-tab-content[data-tab="history"] {
	padding: 10px 20px;
	height: 260px;
	overflow-y: auto;
}

.spar-history-header {
	padding: 15px 20px 10px 20px;
	border-bottom: 1px solid #e9ecef;
}

.spar-history-header h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #2c3e50;
}

.spar-history-list {
	padding: 0;
}

.spar-history-entry {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
	gap: 10px;
}

.spar-history-entry:last-child {
	border-bottom: none;
}

.spar-history-action {
	flex: 1;
	font-size: 13px;
	color: #2c3e50;
	line-height: 1.4;
}

.spar-history-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	min-width: 60px;
}

.spar-history-points-positive {
	color: #28a745;
	font-weight: 600;
	font-size: 13px;
}

.spar-history-points-negative {
	color: #dc3545;
	font-weight: 600;
	font-size: 13px;
}

.spar-history-date {
	font-size: 11px;
	color: #6c757d;
}

.spar-history-footer {
	padding: 15px 20px;
	border-top: 1px solid #e9ecef;
}

.spar-history-back {
	background: none;
	border: none;
	color: var(--spar-rewards-color-primary);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	padding: 0;
	transition: color 0.2s ease;
}

.spar-history-back:hover {
	color: var(--spar-rewards-color-secondary);
	text-decoration: underline;
}

.spar-history-empty {
	padding: 40px 20px;
	text-align: center;
	color: #6c757d;
	font-size: 14px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Tabs */
.spar-rewards-tabs {
	display: flex;
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}

.spar-rewards-tab {
	flex: 1;
	padding: 12px 16px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #6c757d;
	transition: all 0.2s ease;
	position: relative;
}

/* When only 2 tabs are shown (earn + claim, no refer) */
.spar-rewards-tabs .spar-rewards-tab {
	flex: 1;
}

.spar-rewards-tab.active {
	color: var(--spar-rewards-color-primary);
	background: white;
}

.spar-rewards-tab.active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--spar-rewards-color-primary);
}

.spar-rewards-tab:hover:not(.active) {
	background: #e9ecef;
}

/* Tab Content */
.spar-rewards-tab-content {
	display: none;
	padding: 12px;
	height: 260px;
	overflow-y: auto;
	flex: 1;
}

.spar-rewards-tab-content.active {
	display: block;
}

/* Earn Tab */
.spar-earn-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.spar-earn-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 8px;
	background: #f8f9fa;
	border: 1px solid #eef1f4;
	margin-bottom: 12px;
}

.spar-earn-item:last-child {
	margin-bottom: 0;
}

.spar-earn-icon {
	font-size: 20px;
	width: 24px;
	text-align: center;
}

.spar-earn-info {
	flex: 1;
}

.spar-earn-name {
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 2px 0;
	font-size: 14px;
}

.spar-earn-points {
	color: var(--spar-rewards-color-primary);
	font-size: 13px;
	font-weight: 500;
}

.spar-guest-signup-message {
	margin: 0 0 10px 0;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 10px;
	font-size: 12px;
	color: #374151;
}

.spar-points-discount-intro {
	margin: 0 0 8px;
	color: #6c757d;
}

.spar-points-multiplier-badge {
	color: #28a745;
	font-weight: 600;
}

.spar-coupon-success-message {
	color: #28a745;
	font-size: 12px;
	margin-top: 5px;
}

/* Refer Tab */
.spar-refer-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 20px;
}

.spar-refer-stat {
	text-align: center;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
}

.spar-refer-stat-number {
	font-size: 28px;
	font-weight: bold;
	color: var(--spar-rewards-color-primary);
	display: block;
}

.spar-refer-stat-label {
	font-size: 12px;
	color: #6c757d;
	margin-top: 5px;
}

.spar-refer-link-section {
	margin-top: 15px;
}

.spar-refer-link-label, .spar-refer-coupon-label {
	font-size: 12px;
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 8px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.spar-refer-link {
	display: flex;
	gap: 8px;
}

.spar-refer-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 12px;
	font-family: monospace;
}

.spar-refer-copy {
	padding: 8px 12px;
	background: var(--spar-rewards-color-primary);
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	transition: background 0.2s ease;
}

.spar-refer-copy:hover {
	background: var(--spar-rewards-color-secondary);
}

.spar-refer-clicks {
	margin-top: 14px;
}

.spar-refer-clicks-title {
	font-size: 12px;
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 8px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.spar-refer-clicks-table {
	border: 1px solid #e9ecef;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.spar-refer-clicks-table-inner {
	width: 100%;
	border-collapse: collapse;
	font-size: 11px;
}

.spar-refer-clicks-table-inner th,
.spar-refer-clicks-table-inner td {
	padding: 6px 8px;
	border-bottom: 1px solid #f1f3f5;
	text-align: left;
}

.spar-refer-clicks-table-inner th:last-child,
.spar-refer-clicks-table-inner td:last-child {
	text-align: center;
	width: 70px;
}

.spar-refer-clicks-table-inner th:first-child,
.spar-refer-clicks-table-inner td:first-child {
	width: auto;
}

.spar-refer-clicks-table-inner th {
	background: #f8f9fa;
	font-weight: 600;
	color: #495057;
}

.spar-refer-clicks-table-inner tr:last-child td {
	border-bottom: none;
}

.spar-refer-clicks-pagination {
	margin-top: 8px;
}

.spar-refer-clicks-pagination .spar-pagination-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.spar-refer-clicks-pagination .spar-pagination-btn {
	font-size: 11px;
	padding: 4px 6px;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 4px;
	color: #2c3e50;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.spar-refer-clicks-pagination .spar-pagination-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.spar-refer-clicks-pagination .spar-pagination-current {
	background: var(--spar-rewards-color-primary);
	color: #fff;
	border-color: var(--spar-rewards-color-primary);
}

/* Referral Coupon Section */
.spar-refer-coupon-section {
	margin-top: 15px;
}

.spar-refer-coupon {
	display: flex;
	gap: 8px;
}

.spar-refer-coupon-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 12px;
	font-family: monospace;
}

.spar-refer-coupon-copy {
	padding: 8px 12px;
	background: var(--spar-rewards-color-primary);
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	transition: background 0.2s ease;
}

.spar-refer-coupon-copy:hover {
	background: var(--spar-rewards-color-secondary);
}

/* Generate Referral Coupon Button */
.spar-generate-coupon-btn {
	padding: 8px 12px;
	background: var(--spar-rewards-color-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	display: inline-block;
}

.spar-generate-coupon-btn:hover {
	background: var(--spar-rewards-color-secondary);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.spar-generate-coupon-btn:disabled {
	background: #6c757d;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Make the Generate Coupon button span the full width in the widget */
.spar-refer-coupon-section .spar-generate-coupon-btn {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

/* Helper note under generate button */
.spar-refer-coupon-note {
	margin-top: 6px;
	font-size: 11px;
	color: #6c757d;
}

/* Claim Tab */
.spar-claim-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Points Discount UI inside the widget */
#spar-rewards-widget-popup .spar-claim-points-discount {
	margin-bottom: 10px;
}

#spar-rewards-widget-popup .spar-claim-points-discount .spar-redeem-rate,
#spar-rewards-widget-popup .spar-claim-points-discount .spar-redeem-worth {
	margin: 4px 0 8px;
	font-size: 12px;
	color: #6c757d;
}

#spar-rewards-widget-popup .spar-redeem-compact--account {
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 10px;
	background: #fff;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-header {
	margin: 0 0 8px;
	font-size: 13px;
	color: #2c3e50;
	text-align: center;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-panel-row {
	display: grid;
	grid-template-columns: 1fr 1fr; /* slider and field take equal space */
	gap: 8px;
	align-items: center;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-slider {
	width: 100%;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-panel-right {
	display: block; /* let input fill its column */
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-input {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 6px 8px;
	font-size: 13px;
	box-sizing: border-box;
	text-align: center;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-apply-btn,
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-remove-btn {
	padding: 6px 0px;
	font-size: 12px;
	line-height: 1.1;
	width: 100%;
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-apply-btn {
	background: var(--spar-rewards-color-primary);
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-remove-btn {
	color: #7a7a7a;
}

/* When a remove button is present, place it on a new full-width row */
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-remove-btn {
	grid-column: 1 / -1;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-summary {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 12px;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-value {
	font-weight: 600;
}

#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-applied-status {
	margin-top: 6px;
	font-size: 11px;
	color: #28a745;
}
#spar-rewards-widget-popup .link-button[disabled] {
	pointer-events: none;
	opacity: 0.6;
}

/* New actions row: discount box and button on their own lines */
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-actions {
	display: grid;
	grid-template-columns: 1fr; /* stack discount box and button */
	gap: 8px;
	align-items: stretch;
	margin-top: 8px;
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-discount-box {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	border-radius: 8px;
	padding: 8px 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
    text-align: center;
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-value-label {
	font-weight: 600;
	font-size: 14px; /* match value size */
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-value {
	font-weight: 700;
	font-size: 14px; /* ensure consistent size */
}
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-buttons {
	display: grid;
	grid-template-columns: 1fr; /* apply full width */
	gap: 6px;
}
/* Place remove button on its own row spanning full width */
#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-buttons .spar-redeem-remove-btn {
	grid-column: 1 / -1;
}

@media (max-width: 420px) {
	#spar-rewards-widget-popup .spar-redeem-compact--account .spar-panel-row {
		grid-template-columns: 1fr; /* stack on narrow widths */
	}
	#spar-rewards-widget-popup .spar-redeem-compact--account .spar-redeem-actions {
		grid-template-columns: 1fr; /* stack on narrow widths */
	}
}

/* Claim inner sub-tabs */
.spar-claim-subtabs {
	display: flex;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
}

.spar-claim-subtab {
	flex: 1;
	padding: 8px 10px;
	background: #f8f9fa;
	border: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #6c757d;
	transition: all 0.2s ease;
}

.spar-claim-subtab.active {
	background: #fff;
	color: var(--spar-rewards-color-primary);
	box-shadow: inset 0 -2px 0 var(--spar-rewards-color-primary);
}

.spar-claim-subtab:hover:not(.active) {
	background: #eef1f3;
}

.spar-claim-subtab-content {
	display: none;
}

.spar-claim-subtab-content.active {
	display: block;
}

.spar-claim-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
	margin-top: 2px;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.spar-claim-item.can-claim {
	border-color: var(--spar-rewards-color-primary);
	background: rgba(0, 115, 170, 0.05);
}

.spar-claim-info {
	flex: 1;
}

.spar-claim-name {
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 4px 0;
	font-size: 14px;
}

.spar-claim-description {
	color: #6c757d;
	font-size: 12px;
	margin: 0 0 4px 0;
}

.spar-claim-points {
	color: var(--spar-rewards-color-primary);
	font-size: 12px;
	font-weight: 600;
}

.spar-claim-action {
	margin-left: 10px;
	min-width: 120px;
}

.spar-claim-button {
	padding: 6px 12px;
	background: var(--spar-rewards-color-primary);
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	text-decoration: none;
	display: block;
	width: 100%;
	text-align: center;
	transition: background 0.2s ease;
}

.spar-claim-button:hover {
	background: var(--spar-rewards-color-secondary);
	color: white;
	text-decoration: none;
}

.spar-claim-button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.spar-claim-need-more {
	display: block;
	margin-top: 4px;
	font-size: 10px;
	color: #dc3545;
	text-align: center;
}

/* Footer */
.spar-rewards-footer {
	padding: 10px 20px 15px 20px;
	background: #f8f9fa;
	border-top: 1px solid #e9ecef;
	text-align: center;
	flex-shrink: 0;
}

.spar-rewards-view-all {
	color: var(--spar-rewards-color-primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: color 0.2s ease;
}

.spar-rewards-view-all:hover {
	color: var(--spar-rewards-color-secondary);
	text-decoration: none;
}

/* Auth footer actions for logged-out users */
.spar-rewards-auth-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
}

.spar-rewards-auth-button {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.spar-rewards-auth-button.spar-auth-login {
	background: var(--spar-rewards-color-primary);
	color: #fff;
}

.spar-rewards-auth-button.spar-auth-login:hover {
	background: var(--spar-rewards-color-secondary);
	color: #fff;
}

.spar-rewards-auth-button.spar-auth-register {
	background: #e9ecef;
	color: #2c3e50;
}

.spar-rewards-auth-button.spar-auth-register:hover {
	background: #dee2e6;
	color: #2c3e50;
}

/* Login Message */
.spar-rewards-login {
	text-align: center;
	padding: 40px 20px;
	color: #6c757d;
}

.spar-rewards-login-button {
	display: inline-block;
	margin-top: 15px;
	padding: 10px 20px;
	background: var(--spar-rewards-color-primary);
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.spar-rewards-login-button:hover {
	background: var(--spar-rewards-color-secondary);
	color: white;
	text-decoration: none;
}

/* Login Prompt for Refer and Claim tabs */
.spar-rewards-login-prompt {
	text-align: center;
	padding: 40px 20px;
	color: #6c757d;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.spar-login-icon {
	font-size: 48px;
	margin-bottom: 15px;
	opacity: 0.7;
}

.spar-rewards-login-prompt p {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.5;
}

.spar-rewards-login-prompt .spar-rewards-login-button {
	display: inline-block;
	padding: 10px 20px;
	background: var(--spar-rewards-color-primary);
	color: white;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s ease;
}

.spar-rewards-login-prompt .spar-rewards-login-button:hover {
	background: var(--spar-rewards-color-secondary);
	color: white;
	text-decoration: none;
}

/* Referral stats row layout */
.spar-refer-stats-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 15px;
}

.spar-refer-stats-row .spar-refer-stat {
	flex: 1;
	text-align: center;
	padding: 8px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #e9ecef;
}

.spar-refer-stats-row .spar-refer-stat-number {
	display: block;
	font-size: 18px;
	font-weight: bold;
	color: var(--spar-rewards-color-primary, #0073aa);
	margin-bottom: 2px;
}

.spar-refer-stats-row .spar-refer-stat-label {
	font-size: 11px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Widget-specific referral stats layout (2x2 grid) */
.spar-refer-stats-widget {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 8px;
	margin-bottom: 15px;
}

.spar-refer-stats-widget .spar-refer-stat {
	flex: 1;
	text-align: center;
	padding: 8px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #e9ecef;
}

.spar-refer-stats-widget .spar-refer-stat-number {
	display: block;
	font-size: 24px;
	line-height: 1;
	font-weight: bold;
	color: var(--spar-rewards-color-primary, #0073aa);
	margin-bottom: 2px;
}

.spar-refer-stats-widget .spar-refer-stat-label {
	font-size: 10px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Responsive design for smaller widgets */
@media (max-width: 320px) {
	.spar-refer-stats-row {
		flex-direction: column;
		gap: 5px;
	}
	
	.spar-refer-stats-row .spar-refer-stat {
		margin-bottom: 5px;
	}
	
	.spar-refer-stats-widget {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}
}

@media (max-width: 640px) {
	/* Expand the popup across the viewport on smaller screens while leaving room at the bottom */
	#spar-rewards-widget-popup {
		position: fixed;
		top: 20px;
		left: 50%;
		right: auto;
		bottom: 120px;
		width: calc(100vw - 24px);
		max-width: 100vw;
		max-height: calc(100vh - 140px);
		height: auto;
		transform: translate(-50%, 0) scale(0.8);
	}

	#spar-rewards-widget-popup.show {
		transform: translate(-50%, 0) scale(1);
	}

	.position-bottom-left #spar-rewards-widget-popup,
	.position-bottom-right #spar-rewards-widget-popup,
	.position-top-left #spar-rewards-widget-popup,
	.position-top-right #spar-rewards-widget-popup,
	.position-center-left-vertical #spar-rewards-widget-popup,
	.position-center-right-vertical #spar-rewards-widget-popup {
	top: 20px;
		left: 50%;
		right: auto;
		bottom: 120px;
	}

	.spar-refer-stats {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* Scrollbar styling */
.spar-rewards-tab-content::-webkit-scrollbar {
	width: 4px;
}

.spar-rewards-tab-content::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 2px;
}

.spar-rewards-tab-content::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 2px;
}

.spar-rewards-tab-content::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Unused Vouchers Section */
.spar-unused-vouchers-section {
	margin-bottom: 20px;
}

.spar-unused-vouchers-title {
	margin: 10px 0 15px 0;
	font-size: 11px;
	font-weight: 500;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-align: center;
	position: relative;
	padding: 0 12px;
}

.spar-unused-vouchers-title::before,
.spar-unused-vouchers-title::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 12px);
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
}

.spar-unused-vouchers-title::before {
	left: 0;
}

.spar-unused-vouchers-title::after {
	right: 0;
}

.spar-unused-vouchers-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.spar-unused-voucher-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 12px;
	transition: all 0.2s ease;
	position: relative;
}

.spar-unused-voucher-item:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: var(--spar-rewards-color-primary);
}

.spar-voucher-info {
	flex: 1;
	min-width: 0;
}

.spar-voucher-value {
	font-weight: 600;
	font-size: 14px;
	color: #28a745;
	margin-bottom: 2px;
}

.spar-voucher-code {
	font-family: 'Courier New', monospace;
	font-size: 11px;
	color: #6c757d;
	background: rgba(108, 117, 125, 0.1);
	padding: 2px 6px;
	border-radius: 4px;
	display: inline-block;
	margin-bottom: 2px;
}

.spar-voucher-expiry {
	font-size: 10px;
	color: #dc3545;
	font-style: italic;
}

.spar-apply-voucher-btn {
	background: var(--spar-rewards-color-primary);
	color: white;
	border: none;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	min-width: 80px;
}

.spar-apply-voucher-btn:hover {
	background: var(--spar-rewards-color-secondary);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.spar-apply-voucher-btn:disabled {
	background: #6c757d;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Applied voucher status styling */
.spar-voucher-applied-status {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	min-width: 80px;
	justify-content: center;
}

.spar-voucher-applied-icon {
	background: #28a745;
	color: white;
	border-radius: 50%;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: bold;
}

.spar-voucher-applied-text {
	font-weight: 500;
}

/* Applied voucher item styling */
.spar-unused-voucher-item.applied {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border-color: #28a745;
}

.spar-unused-voucher-item.applied .spar-voucher-value {
	color: #155724;
}

.spar-unused-voucher-item.applied .spar-voucher-code {
	background: rgba(21, 87, 36, 0.1);
	color: #155724;
	border: 1px solid rgba(21, 87, 36, 0.2);
}

/* Ensure applied state doesn't get hover effects */
.spar-unused-voucher-item.applied:hover {
	transform: none;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

/* Loading state for apply button */
.spar-apply-voucher-btn.loading {
	position: relative;
	color: transparent !important;
}

.spar-apply-voucher-btn.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top: 2px solid white;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.spar-vouchers-divider {
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
	margin: 20px 0;
	position: relative;
}

.spar-vouchers-divider::after {
	content: "Available Rewards";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 0 12px;
	font-size: 11px;
	color: #6c757d;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Voucher Messages */
.spar-voucher-message {
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	margin-bottom: 12px;
	animation: slideDown 0.3s ease;
}

.spar-voucher-message-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.spar-voucher-message-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Enhanced hover effects for better UX */
.spar-unused-voucher-item:not(.expired):not(.applied):hover .spar-voucher-value {
	color: #1e7e34;
}

.spar-unused-voucher-item:not(.expired):not(.applied):hover .spar-voucher-code {
	background: rgba(var(--spar-rewards-color-primary-rgb, 0, 115, 170), 0.1);
	color: var(--spar-rewards-color-primary);
}

/* Mobile responsiveness for vouchers */
@media (max-width: 480px) {
	.spar-unused-voucher-item {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	
	.spar-apply-voucher-btn,
	.spar-voucher-applied-status {
		width: 100%;
		min-width: auto;
	}
	
	.spar-voucher-info {
		text-align: center;
	}
	
	.spar-unused-vouchers-title::before,
	.spar-unused-vouchers-title::after {
		width: calc(50% - 20px);
	}
}

/* Special styling for expired vouchers (if shown) */
.spar-unused-voucher-item.expired {
	opacity: 0.6;
	background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
}

.spar-unused-voucher-item.expired .spar-apply-voucher-btn {
	background: #6c757d;
	cursor: not-allowed;
}

.spar-unused-voucher-item.expired .spar-voucher-value {
	color: #6c757d;
}

/* Vertical Widget Button Styles */
#spar-rewards-widget-container.position-center-left-vertical #spar-rewards-widget-button,
#spar-rewards-widget-container.position-center-right-vertical #spar-rewards-widget-button {
	writing-mode: initial;
	text-orientation: initial;
	padding: 15px 12px;
	min-width: auto;
	min-height: 120px;
	flex-direction: column;
	gap: 6px;
	justify-content: center;
	align-items: center;
	display: flex;
}

#spar-rewards-widget-container.position-center-left-vertical #spar-rewards-widget-button {
	border-radius: 0 25px 25px 0;
}

#spar-rewards-widget-container.position-center-right-vertical #spar-rewards-widget-button {
	border-radius: 25px 0 0 25px;
}

/* Vertical widget icon - positioned at top */
#spar-rewards-widget-container.position-center-left-vertical .spar-widget-icon,
#spar-rewards-widget-container.position-center-right-vertical .spar-widget-icon {
	order: 1;
	transform: none;
	margin-bottom: 0;
	font-size: 18px;
	display: block;
	flex-shrink: 0;
}

/* Vertical widget text - make it sideways and positioned below icon */
#spar-rewards-widget-container.position-center-left-vertical .spar-widget-text,
#spar-rewards-widget-container.position-center-right-vertical .spar-widget-text {
	order: 2;
	text-orientation: mixed;
	transform: rotate(180deg);
	letter-spacing: 1px;
	white-space: nowrap;
	display: block;
	margin: 4px 0;
	flex-shrink: 0;
}
#spar-rewards-widget-container.position-center-left-vertical .spar-widget-text {
	writing-mode: sideways-lr;
}
#spar-rewards-widget-container.position-center-right-vertical .spar-widget-text {
	writing-mode: sideways-rl;
}

/* Vertical widget points - positioned at bottom */
#spar-rewards-widget-container.position-center-left-vertical .spar-widget-points,
#spar-rewards-widget-container.position-center-right-vertical .spar-widget-points {
	order: 3;
	writing-mode: sideways-lr;
	text-orientation: mixed;
	transform: rotate(180deg);
	margin-left: 0;
	margin-top: 4px;
	white-space: nowrap;
	display: block;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	padding: 5px 2px;
	font-size: 11px;
}

/* Widget Popup positioning for vertical widgets */
.position-center-left-vertical #spar-rewards-widget-popup {
	left: 60px;
	top: 50%;
	transform: translateY(-50%);
}

.position-center-right-vertical #spar-rewards-widget-popup {
	right: 60px;
	top: 50%;
	transform: translateY(-50%);
}

/* Ensure popup doesn't go off screen for vertical positions */
@media (max-height: 500px) {
	.position-center-left-vertical #spar-rewards-widget-popup,
	.position-center-right-vertical #spar-rewards-widget-popup {
		top: 20px;
		transform: none;
		max-height: calc(100vh - 40px);
	}
}

/* Ensure popup stays within viewport horizontally */
@media (max-width: 420px) {
	.position-center-left-vertical #spar-rewards-widget-popup {
		left: 60px;
		right: 10px;
		width: auto;
	}
	
	.position-center-right-vertical #spar-rewards-widget-popup {
		right: 60px;
		left: 10px;
		width: auto;
	}
}

/* Responsive adjustments for vertical widgets */
@media (max-width: 480px) {
	#spar-rewards-widget-container.position-center-left-vertical,
	#spar-rewards-widget-container.position-center-right-vertical {
		position: fixed;
		top: auto;
		bottom: 20px;
		transform: none;
	}
	
	#spar-rewards-widget-container.position-center-left-vertical #spar-rewards-widget-button,
	#spar-rewards-widget-container.position-center-right-vertical #spar-rewards-widget-button {
		writing-mode: horizontal-tb;
		text-orientation: mixed;
		transform: none;
		padding: 12px 20px;
		min-height: auto;
		min-width: 80px;
		border-radius: 25px;
		flex-direction: row;
		gap: 8px;
	}
	
	#spar-rewards-widget-container.position-center-left-vertical .spar-widget-text,
	#spar-rewards-widget-container.position-center-right-vertical .spar-widget-text {
		writing-mode: horizontal-tb;
		text-orientation: mixed;
		transform: none;
		letter-spacing: normal;
	}
	
	#spar-rewards-widget-container.position-center-left-vertical .spar-widget-icon,
	#spar-rewards-widget-container.position-center-right-vertical .spar-widget-icon {
		transform: none;
		margin-bottom: 0;
	}
	
	#spar-rewards-widget-container.position-center-left-vertical .spar-widget-points,
	#spar-rewards-widget-container.position-center-right-vertical .spar-widget-points {
		writing-mode: horizontal-tb;
		text-orientation: mixed;
		transform: none;
		margin-top: 0;
		margin-left: 5px;
		background: rgba(255, 255, 255, 0.2);
		border-radius: 12px;
		padding: 2px 8px;
		font-size: 12px;
	}
	
	.position-center-left-vertical #spar-rewards-widget-popup,
	.position-center-right-vertical #spar-rewards-widget-popup {
		left: 10px !important;
		right: 10px !important;
		top: auto;
		bottom: 70px;
		transform: none;
		width: calc(100% - 20px);
	}
}

/* Levels Tab */
.spar-widget-current-level {
	background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 15px;
	border-left: 4px solid #007cba;
}

.spar-widget-current-level-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.spar-widget-level-badge-icon {
	font-size: 20px;
}

.spar-widget-current-level-name {
	font-weight: 600;
	color: #007cba;
	font-size: 14px;
}

.spar-widget-current-level-label {
	font-size: 11px;
	color: #6c757d;
}

.spar-widget-no-levels {
	text-align: center;
	padding: 20px;
	color: #6c757d;
}

.spar-widget-no-levels-icon {
	font-size: 32px;
	margin-bottom: 10px;
}

.spar-widget-no-levels-text {
	margin: 0;
	font-size: 13px;
}

.spar-widget-total-earned {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8f9fa;
	border-radius: 6px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 12px;
}

.spar-widget-total-earned-label {
	color: #6c757d;
}

.spar-widget-total-earned-value {
	font-weight: 600;
	color: #495057;
}

.spar-widget-levels-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.spar-widget-level-card {
	padding: 8px;
	background: #ffffff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	opacity: 0.6;
	position: relative;
	min-height: 60px;
	transition: all 0.2s ease;
}

.spar-widget-level-card.is-current {
	background: #e3f2fd;
	border-color: #007cba;
	opacity: 1;
}

.spar-widget-level-card.is-unlocked {
	border-color: #28a745;
	opacity: 1;
}

.spar-widget-level-card.is-locked {
	opacity: 0.6;
}

.spar-widget-level-card:hover {
	transition: all 0.2s ease;
}

.spar-widget-level-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spar-widget-level-card-badge {
	position: absolute;
	top: -1px;
	right: -1px;
	background: #007cba;
	color: white;
	font-size: 8px;
	padding: 1px 4px;
	border-radius: 0 5px 0 6px;
	font-weight: 600;
}

.spar-widget-level-card-check {
	position: absolute;
	top: 2px;
	right: 2px;
	color: #28a745;
	font-size: 10px;
}

.spar-widget-level-card-header {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 4px;
}

.spar-widget-level-card-icon {
	font-size: 14px;
}

.spar-widget-level-card-name {
	font-weight: 600;
	font-size: 11px;
	color: #495057;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
	min-width: 0;
}

.spar-widget-level-card-points {
	font-size: 10px;
	color: #6c757d;
	line-height: 1.2;
}

.spar-widget-level-card-benefits {
	font-size: 9px;
	color: #6c757d;
	margin-top: 2px;
	line-height: 1.1;
}

/* Level progress styling within widget */
.spar-widget-current-level .spar-level-progress-container {
	margin-top: 8px;
}

.spar-widget-current-level .spar-level-progress-bar {
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	height: 6px;
	overflow: hidden;
	margin: 6px 0;
}

.spar-widget-current-level .spar-level-progress-fill {
	background: linear-gradient(90deg, #007cba, #005a87);
	height: 100%;
	transition: width 0.3s ease;
	border-radius: 8px;
}

.spar-widget-current-level .spar-level-next {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 10px;
	color: #007cba;
	opacity: 0.8;
}

.spar-widget-current-level .spar-level-max {
	text-align: center;
	color: #007cba;
	font-weight: 600;
	margin: 6px 0;
	font-size: 11px;
}

/* Responsive adjustments for levels tab */
@media (max-width: 480px) {
	.spar-widget-levels-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	
	.spar-widget-current-level {
		padding: 10px;
		margin-bottom: 12px;
	}
}

/* Reward Countdown Timers */
.spar-claim-item .spar-reward-countdown {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
	font-size: 11px;
	color: #856404;
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 4px;
	padding: 4px 8px;
	width: fit-content;
}

.spar-claim-item .spar-reward-countdown.spar-countdown-urgent {
	color: #721c24;
	background: #f8d7da;
	border-color: #f5c6cb;
	animation: pulse-urgent 1.5s infinite;
}

.spar-claim-item .spar-countdown-icon {
	font-size: 10px;
	flex-shrink: 0;
}

.spar-claim-item .spar-countdown-text {
	font-weight: 500;
	font-size: 10px;
	white-space: nowrap;
}

@keyframes pulse-urgent {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* Expiring reward item styling */
.spar-claim-item.spar-reward-expiring {
	border-color: #ffc107;
	background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 234, 167, 0.2) 100%);
}

.spar-claim-item.spar-reward-expired {
	opacity: 0.6;
	background: #f8f9fa;
	border-color: #6c757d;
}

.spar-claim-item.spar-reward-expired .spar-claim-button {
	background: #6c757d;
	cursor: not-allowed;
}

/* Ensure countdown is visible in claim info */
.spar-claim-info {
	flex: 1;
	min-width: 0;
}

.spar-claim-name {
	font-weight: 600;
	color: #2c3e50;
	margin: 0 0 4px 0;
	font-size: 14px;
}

.spar-claim-description {
	color: #6c757d;
	font-size: 12px;
	margin: 0 0 4px 0;
}

.spar-claim-points {
	color: var(--spar-rewards-color-primary);
	font-size: 12px;
	font-weight: 600;
	margin: 0 0 6px 0;
}

/* Mobile responsive adjustments for countdown in widget */
@media (max-width: 480px) {
	.spar-claim-item .spar-reward-countdown {
		font-size: 10px;
		padding: 3px 6px;
		gap: 3px;
	}
	
	.spar-claim-item .spar-countdown-text {
		font-size: 9px;
	}
	
	.spar-claim-item .spar-countdown-icon {
		font-size: 9px;
	}
}

/* Dark Mode Theme */
#spar-rewards-widget-container.spar-rewards-widget--dark #spar-rewards-widget-popup {
	background: #141519 !important;
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-popup-header {
	background: #101114 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab {
	color: #d1d5db !important;
	background: #15161a !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab[data-tab="refer"] {
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab.active {
	background: #141519 !important;
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab:hover:not(.active) {
	background: #1f2024 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content {
	background: #141519 !important;
	scrollbar-color: #3b3d44 #1a1b1f;
	scrollbar-width: thin;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content::-webkit-scrollbar {
	width: 4px;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content::-webkit-scrollbar-track {
	background: #1a1b1f;
	border-radius: 2px;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content::-webkit-scrollbar-thumb {
	background: #3b3d44;
	border-radius: 2px;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content::-webkit-scrollbar-thumb:hover {
	background: #4a4c54;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-earn-item,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-entry,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-login-prompt,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-stat,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-link,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-guest-signup-message {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-entry {
	background: transparent !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-earn-name,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-name,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-action {
	color: #f8fafc !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-stat-number,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-stat-label {
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-link-label,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-coupon-label {
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-refer-input {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-description,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-date,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-tab-content p,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-earn-points,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-points {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-footer {
	background: #15161a !important;
	border-top-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-footer a,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-footer span {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-empty-message,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-points-discount-intro,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-no-levels {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-view-all {
	border-top-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-view-all-link {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-history-list {
	background: transparent !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-points-multiplier-badge,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-coupon-success-message {
	color: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-auth-button,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-rewards-view-all {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-panel-row {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-subtabs {
	background: #15161a !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-subtab {
	background: #15161a !important;
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-subtab.active {
	background: #141519 !important;
	color: #ffffff !important;
	box-shadow: inset 0 -2px 0 var(--spar-rewards-color-primary) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-subtab:hover:not(.active) {
	background: #1f2024 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level {
	background: linear-gradient(135deg, #1a1b1f 0%, #141519 100%) !important;
	border-left-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level-name {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level-label {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-total-earned {
	background: #15161a !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-total-earned-label {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-total-earned-value {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card.is-current {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card.is-unlocked {
	border-color: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card.is-locked {
	border-color: #3a3b41 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-levels-grid {
	background: transparent !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card-name {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card-points,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card-benefits {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card-badge {
	background: #4a4c54 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-level-card-check {
	color: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-no-levels {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item {
	background: #15161a !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item.can-claim {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item.spar-reward-expiring {
	background: rgba(245, 158, 11, 0.18) !important;
	border-color: #f59e0b !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item.spar-reward-expired {
	background: #15161a !important;
	border-color: #3a3b41 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-name,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-description,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-points {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-item .spar-reward-countdown {
	color: #fcd34d !important;
	background: rgba(245, 158, 11, 0.2) !important;
	border-color: rgba(245, 158, 11, 0.4) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-discount-box,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-redeem-summary {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-points-discount .spar-redeem-rate,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-claim-points-discount .spar-redeem-worth {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account {
	background: #141519 !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-redeem-header {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-discount-box {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-redeem-value-label,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-redeem-value {
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-redeem-compact--account .spar-redeem-input {
	color: #ffffff !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-vouchers-title {
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-vouchers-title::before,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-vouchers-title::after {
	background: linear-gradient(90deg, transparent 0%, #3a3b41 50%, transparent 100%) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item {
	background: rgb(60 60 60 / 35%) !important;
	border-color: #2a2b30 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item:hover {
	border-color: var(--spar-rewards-color-primary) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-value {
	color: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-code {
	color: #c7c9cf !important;
	background: rgba(148, 163, 184, 0.15) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-expiry {
	color: #fca5a5 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-applied-status {
	background: rgba(34, 197, 94, 0.15) !important;
	color: #86efac !important;
	border-color: rgba(34, 197, 94, 0.4) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-applied-icon {
	background: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.applied {
	background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0.08) 100%) !important;
	border-color: #22c55e !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.applied .spar-voucher-value,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.applied .spar-voucher-code {
	color: #86efac !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.applied .spar-voucher-code {
	background: rgba(34, 197, 94, 0.12) !important;
	border-color: rgba(34, 197, 94, 0.3) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-vouchers-divider {
	background: linear-gradient(90deg, transparent 0%, #3a3b41 50%, transparent 100%) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-vouchers-divider::after {
	background: #141519 !important;
	color: #c7c9cf !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-message {
	background: #141519 !important;
	border-color: #2a2b30 !important;
	color: #e5e7eb !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-message-success {
	background: rgba(34, 197, 94, 0.18) !important;
	color: #86efac !important;
	border-color: rgba(34, 197, 94, 0.4) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-voucher-message-error {
	background: rgba(248, 113, 113, 0.18) !important;
	color: #fecaca !important;
	border-color: rgba(248, 113, 113, 0.4) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.expired {
	background: linear-gradient(135deg, #15161a 0%, #1a1b1f 100%) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-unused-voucher-item.expired .spar-voucher-value {
	color: #94a3b8 !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level .spar-level-progress-bar {
	background: rgba(148, 163, 184, 0.2) !important;
}

#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level .spar-level-next,
#spar-rewards-widget-container.spar-rewards-widget--dark .spar-widget-current-level .spar-level-max {
	color: #c7c9cf !important;
}
