/* Planete Karia — Theme v3 "Nexus" — Components */

/* —— Animations —— */
@keyframes fadeSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes scaleIn {
	from { opacity: 0; transform: scale(0.94); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@keyframes floatOrb1 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(40px, -30px) scale(1.1); }
	66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes floatOrb2 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-40px, -25px) scale(1.08); }
}

.anim-in {
	opacity: 0;
}

.anim-in.is-visible {
	animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-in.anim-in--fade.is-visible {
	animation-name: fadeIn;
}

.anim-in.anim-in--scale.is-visible {
	animation-name: scaleIn;
}

.anim-in.anim-in--delay-1 { animation-delay: 0.06s; }
.anim-in.anim-in--delay-2 { animation-delay: 0.12s; }
.anim-in.anim-in--delay-3 { animation-delay: 0.18s; }
.anim-in.anim-in--delay-4 { animation-delay: 0.24s; }

.flash {
	animation: fadeSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ==========================================
   FLOATING REWARD NUMBER
   ========================================== */
@keyframes float-reward-up {
	0%   { opacity: 0; transform: translateY(0) scale(0.9); }
	15%  { opacity: 1; transform: translateY(-10px) scale(1.05); }
	80%  { opacity: 1; transform: translateY(-55px) scale(1); }
	100% { opacity: 0; transform: translateY(-80px) scale(0.95); }
}

.float-reward {
	position: fixed;
	top: 72px;
	right: 20px;
	padding: 8px 18px;
	border-radius: var(--radius-pill);
	background: rgba(var(--success-rgb), 0.12);
	border: 1px solid rgba(var(--success-rgb), 0.35);
	color: var(--success);
	font-weight: 700;
	font-size: var(--font-105);
	animation: float-reward-up 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	pointer-events: none;
	z-index: var(--z-toast);
	white-space: nowrap;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.float-reward--xp {
	background: rgba(var(--secondary-rgb), 0.12);
	border-color: rgba(var(--secondary-rgb), 0.35);
	color: var(--secondary);
}

@media (max-width: 900px) {
	.float-reward {
		right: 12px;
		font-size: var(--font-95);
	}
}

/* ==========================================
   BUTTON RIPPLE
   ========================================== */
@keyframes btn-ripple-expand {
	to { transform: scale(4); opacity: 0; }
}

.btn__ripple {
	position: absolute;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	margin-left: -20px;
	background: rgba(var(--overlay-white-rgb), 0.28);
	transform: scale(0);
	animation: btn-ripple-expand 0.55s ease-out forwards;
	pointer-events: none;
}

/* ==========================================
   BUTTON LOADING STATE
   ========================================== */
.btn.btn--loading,
.btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
	cursor: wait;
}

/* ==========================================
   CARD SUCCESS GLOW (after action)
   ========================================== */
@keyframes card-glow-success {
	0%   { box-shadow: var(--shadow); }
	35%  { box-shadow: var(--shadow), 0 0 0 6px rgba(var(--success-rgb), 0.22); }
	100% { box-shadow: var(--shadow); }
}

.card--action-done {
	animation: card-glow-success 1.6s ease-out;
}

/* ==========================================
   REDUCED MOTION OVERRIDES
   ========================================== */
@media (prefers-reduced-motion: reduce) {
	.anim-in,
	.anim-in.is-visible,
	.anim-in.anim-in--fade.is-visible,
	.anim-in.anim-in--scale.is-visible,
	.flash {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.content::before,
	.content::after,
	.card::before {
		animation: none !important;
	}

	.btn__ripple { animation: none !important; opacity: 0; }
	.card--action-done { animation: none !important; }
}

