/* Floating Credit Tracker Styles */
.credit-tracker-new {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 300px;
	overflow: visible;
}

.plan-info-wrapper {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	width: 100%;
	overflow: visible;
}

.credit-info-wrapper {
	display: flex;
	align-items: center;
	width: 100%;
	overflow: visible;
}

.credit-details {
	overflow: visible;
}

.credit-usage {
	flex: 1;
	overflow: visible;
}
.floating-credit-tracker {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: linear-gradient(135deg, #2271b1, #135e96);
	border-radius: 12px;
	padding: 12px 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 159999;
	transition: transform 0.3s ease, opacity 0.3s ease;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 400px;
}

.floating-credit-tracker:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.floating-credit-content {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
}

.floating-credit-icon {
	background: rgba(255, 255, 255, 0.1);
	padding: 8px;
	border-radius: 8px;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
}

.floating-credit-details {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 16px;
	flex: 1;
}

.floating-credit-title {
	color: rgba(255, 255, 255, 0.9);
	font-size: 12px;
	margin-bottom: 2px;
}

.floating-credit-count {
	color: white;
	font-size: 18px;
	font-weight: 600;
	overflow: visible;
	white-space: nowrap;
	position: relative;
	display: inline-block;
	min-height: 22px;
	min-width: 20px;
}

/* Animation for when credit value changes */
@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.7; }
	100% { opacity: 1; }
}

.animated-count.updated {
	animation: pulse 0.5s ease;
	position: relative;
}

/* Floating Generate Button */
.floating-generate-btn {
	background-color: #fff;
	color: #2271b1;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
}

.floating-generate-btn:hover {
	background-color: #f0f0f1;
	transform: translateY(-2px);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.floating-generate-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.floating-generate-btn svg {
	color: #2271b1;
}

/* New elements for enhanced credit tracker */
.floating-credit-info {
	display: flex;
	flex-direction: column;
	min-width: 100px;
	position: relative;
	overflow: visible;
	height: auto;
}

.available-credits {
	color: #4caf50;
}

.low-credits {
	color: #ffeb3b; /* Yellow color for warning */
}

.zero-credits {
	color: #f44336; /* Red color for critical */
}

.floating-credit-plan {
	color: white;
	font-size: 16px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.1);
	padding: 2px 8px;
	border-radius: 4px;
	display: inline-block;
}

.floating-credit-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
	width: 100%;
	justify-content: flex-end;
}

.floating-credit-btn {
	background-color: #4caf50;
	color: white;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
	text-decoration: none;
}

.floating-credit-btn:hover {
	background-color: #43a047;
	transform: translateY(-2px);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.floating-credit-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.floating-upgrade-btn {
	background-color: #ff9800;
	color: white;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
	text-decoration: none;
}

.floating-upgrade-btn:hover {
	background-color: #f57c00;
	transform: translateY(-2px);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.floating-upgrade-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 782px) {
	.floating-credit-tracker {
		bottom: 60px; /* Adjust for mobile admin bar */
		padding: 10px 14px;
		max-width: 100%;
		left: 0;
		right: 0;
		border-radius: 0;
	}

	.floating-credit-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.floating-credit-details {
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
		overflow: visible;
	}

	.floating-credit-info {
		min-width: auto;
		flex: 1;
		overflow: visible;
	}

	.floating-credit-actions {
		margin-top: 12px;
		justify-content: space-between;
	}

	.floating-generate-btn,
	.floating-credit-btn,
	.floating-upgrade-btn {
		flex: 1;
		justify-content: center;
		text-align: center;
		min-width: 0;
		padding: 10px 8px;
	}

	/* Ensure credit tracker elements are visible on mobile */
	.credit-tracker-new {
		min-width: 100%;
	}

	.credit-details,
	.credit-count,
	.available-count,
	.plan-name,
	.usage-text {
		overflow: visible !important;
		white-space: nowrap !important;
	}
}
