/**
 * Customer Points Table Styles
 */

.spar-customer-points-toolbar {
	margin: 1rem 0;
}

.spar-add-new-points-panel {
	max-width: 760px;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem 0.25rem;
	background: #ffffff;
	border: 1px solid #ccd0d4;
	border-left: 4px solid #2271b1;
}

.spar-add-new-points-panel .form-table {
	margin-top: 0;
}

.spar-add-new-points-panel .form-table th {
	width: 150px;
}

.spar-customer-points-bulk-page .spar-admin-content {
	margin-top: 1rem;
}

.spar-customer-points-bulk-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	margin: 0 0 1rem;
	padding: 1rem;
	background: #ffffff;
	border: 1px solid #ccd0d4;
}

.spar-customer-points-bulk-summary p {
	margin: 0;
}

.spar-customer-points-bulk-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1rem;
	flex-wrap: wrap;
}

.spar-customer-points-bulk-progress {
	margin: 0 0 1rem;
}

.spar-customer-points-bulk-progress p {
	margin: 0 0 0.5rem;
}

#spar-customer-points-bulk-progress {
	width: 100%;
	max-width: 760px;
	height: 1rem;
}

.spar-customer-points-bulk-table-wrap {
	max-height: 32rem;
	overflow: auto;
	background: #ffffff;
	border: 1px solid #ccd0d4;
}

.spar-customer-points-bulk-table {
	border: 0;
}

.spar-customer-points-bulk-table th,
.spar-customer-points-bulk-table td {
	vertical-align: middle;
}

.spar-bulk-row-muted {
	color: #646970;
}

.spar-bulk-status {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 12px;
}

.spar-bulk-status--updated {
	background: #e7f5ee;
	color: #006b3c;
}

.spar-bulk-status--unchanged,
.spar-bulk-status--skipped {
	background: #f6f7f7;
	color: #50575e;
}

.spar-bulk-status--undone {
	background: #f0f0ff;
	color: #3c3f8f;
}

.spar-customer-points-table {
	table-layout: fixed;
}

.spar-customer-points-table.spar-customer-points-columns-8 {
	--spar-customer-points-columns: 8;
}

.spar-customer-points-table.spar-customer-points-columns-9 {
	--spar-customer-points-columns: 9;
}

.spar-customer-points-table.spar-customer-points-columns-10 {
	--spar-customer-points-columns: 10;
}

.spar-customer-points-table th,
.spar-customer-points-table td {
	width: calc(100% / var(--spar-customer-points-columns, 8)) !important;
	word-wrap: break-word;
	overflow: hidden;
	vertical-align: middle;
	text-align: center;
}



.spar-customer-points-table th.column-cb,
.spar-customer-points-table td.column-cb,
.spar-customer-points-table th.check-column,
.spar-customer-points-table td.check-column {
	text-align: left !important;
	width: calc(100% / var(--spar-customer-points-columns, 8) * 0.4) !important;
}

.spar-customer-points-table th.column-display_name,
.spar-customer-points-table td.column-display_name {
	text-align: left;
	width: calc(100% / var(--spar-customer-points-columns, 8) * 0.8) !important;
}

.spar-customer-points-table th.column-points {
	text-align: center !important;
}

.spar-customer-points-table thead th.column-points {
	text-align: center !important;
}

/* Center the status dropdown in the Status column */
.spar-customer-points-table td.column-status .spar-user-status-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
}

.spar-activity-meta {
	font-size: 10px;
	line-height: 1.3;
}

.spar-activity-meta .description {
	display: block;
	color: #555d66;
}

/* Voucher info styling */
.spar-voucher-info {
	font-size: 8px;
	line-height: 1.1;
	max-width: 100%;
}

.spar-voucher-info strong {
	font-size: 9px;
	display: block;
	margin-bottom: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.spar-voucher-info code {
	background: #f8f9fa;
	padding: 1px;
	border-radius: 2px;
	font-size: 7px;
	display: block;
	margin: 1px 0;
	word-break: break-all;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.spar-voucher-info small {
	font-size: 7px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

/* Referral URL styling */
.spar-referral-url {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	max-width: 100%;
}

.spar-referral-url-input {
	width: 100% !important;
	max-width: 150px;
	font-size: 9px !important;
	padding: 2px !important;
}

.spar-copy-url {
	flex-shrink: 0;
	font-size: 10px !important;
	padding: 2px 6px !important;
}

/* Points actions styling */
.spar-points-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}

.spar-points-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
}

.spar-points-input {
	width: 70px;
	font-size: 12px;
}

.spar-points-loading {
	text-align: center;
}

/* Referral stats styling */
.spar-referral-stats {
	font-size: 9px;
	line-height: 1.2;
}

.spar-referral-stats div {
	margin-bottom: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Points display styling */
.spar-points-display {
	font-size: 14px;
}

.spar-points-display strong {
	color: #0073aa;
}

.spar-points-inline-message {
	margin-top: 6px;
	padding: 6px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 600;
}

.spar-points-inline-message.is-success {
	background: rgba(22, 163, 74, 0.12);
	color: #15803d;
}

.spar-points-inline-message.is-error {
	background: rgba(239, 68, 68, 0.12);
	color: #b91c1c;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
	.spar-referral-url-input {
		max-width: 100%;
	}
	
	.spar-voucher-info {
		font-size: 9px;
	}
	
	.spar-voucher-info strong {
		font-size: 10px;
	}
	
	.spar-voucher-info code {
		font-size: 8px;
	}
}