/* ----------------------------------------
   🌈 VindXit Score Bar (Glossy Animated Version)
---------------------------------------- */

/* 📄 styles/scorebar.css */
/* 🌈 Glossy VindXit Score Bar – Final Polished Version (no overshoot, strong colors) */

.score-bar-container {
	position: relative;
	width: 100%;
	max-width: 340px;
	height: 32px;
	border-radius: 999px;
	background: linear-gradient(to right, #e74c3c, #f39c12, #f1c40f, #2ecc71, #27ae60); /* added more range in green */
	/* 🌈 Vivid color track */
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	margin: 60px auto 60px auto;
	overflow: visible;
}

/* 💎 Glossy overlay sits *above* gradient via pseudo-element */
.score-bar-container::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(to bottom, rgba(255,255,255,0.12), rgba(255,255,255,0));
	pointer-events: none;
	z-index: 1;
	overflow: hidden;
}

/* ⚫ Marker knob */
.marker {
	position: absolute;
	top: -6px;
	left: 0;
	width: 8px;
	height: 40px;
	background-color: #111;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
	transform: translateX(-50%);
	transition: left 1.8s cubic-bezier(.8,.1,.1,1);
	z-index: 3;
}

/* 💬 Popup score tag */
.score-popup {
	position: absolute;
	top: -48px;
	left: 0;
	transform: translateX(-50%);
	padding: 5px 10px;
	font-size: 0.85em;
	font-weight: bold;
	color: #111;
	background: #fff;
	border-radius: 12px;
	border: 1px solid #ccc;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	opacity: 0;
	z-index: 4;
	transition:
		left 1.8s cubic-bezier(.8,.1,.1,1),
		opacity 0.3s ease .8s;
}

/* ✨ Twinkle Animation (debug at 30px for visibility) */
.twinkle-star {
	position: absolute;
	top: -12px;
	right: -5px;
	width: 30px;
	height: 30px;
	background: radial-gradient(closest-side, #fff, transparent);
	border-radius: 50%;
	opacity: 0;
	z-index: 5;
	animation: twinkle 0.5s ease-out forwards;
	pointer-events: none;
}

@keyframes twinkle {
	0% {
		transform: scale(0.2);
		opacity: 0;
	}
	40% {
		transform: scale(1.8);
		opacity: 1;
	}
	100% {
		transform: scale(0.8);
		opacity: 0;
	}
}

/* ----------------------------------------
   📱 Mobile Fixes: Score Bar
---------------------------------------- */
/*@media (max-width: 900px) {

	.score-bar-container {
		position: relative;
		max-width: 75%;
		width: 75%;
		height: 28px;
		margin: 40px auto;
	}

	.score-bar-container::after {
		width: 100%;
		height: 70%;
		top: 15%;
		left: 0;
		border-radius: 20px;
		background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
	}

	.marker {
		height: 34px;
		top: -3px;
	}

	.score-popup {
		font-size: 0.75em;
		top: -42px;
	}

}*/

/* ✅ Keep the scorebar's bits visible even inside animated/overflowed cards */
.score-bar-container { 
  position: relative !important; 
  overflow: visible !important; 
  isolation: isolate; /* makes a new stacking context just for the bar */
}

/* ✅ Make the marker transition reliable on iOS Safari */
.marker {
  will-change: left;
  transform: translate3d(-50%,0,0) !important; /* GPU promotes & keeps the translate */
  transition: left 1.8s cubic-bezier(.8,.1,.1,1) !important;
}

/* ✅ Let the popup float above card clipping */
.score-popup {
  position: absolute !important;
  z-index: 9999 !important;
  pointer-events: none;
}

/* ✅ Only relax clipping around the scorebar area inside compare cards */
.cmp-card { overflow: visible; }          /* easiest: stop clipping entirely */
/* …or safer, just around the bar: */
.cmp-card .score-bar-container { overflow: visible; }
