/* FC Gamification — member profile badges */

#fcpm-user-badges {
	margin: 0 0 20px;
	padding: 12px 10px;
	box-sizing: border-box;
	background: var(--fcom-primary-bg, #fff);
	border: 1px solid var(--fcom-primary-border, #e5e7eb);
	border-radius: 10px;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
	color: var(--fcom-primary-text, #0f172a);
}

.fcpm-badges-msg {
	text-align: center;
	color: #666;
	margin: 0;
}
.fcpm-badges-empty { opacity: 0.7; }
.fcpm-badges-error { color: #d63638; }

.fcpm-badges-heading {
	margin: 10px 0;
	font-size: 16px;
	font-weight: 600;
	color: #0073aa;
}

.fcpm-badge-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.fcpm-badge-item {
	text-align: center;
	width: 65px;
}

.fcpm-badge-img-wrap {
	width: 55px;
	height: 55px;
	border-radius: 50%;
	overflow: hidden;
	margin: 0 auto;
	background: #fff;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

.fcpm-badge-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fcpm-badge-title {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
}

.fcpm-badge-date {
	display: block;
	font-size: 9px;
	color: #888;
}

/* "View All Badges" button */
.fcpm-badges-viewall {
	display: block;
	margin: 10px auto 0;
	padding: 5px 15px;
	cursor: pointer;
	border: 1px solid #0073aa;
	border-radius: 6px;
	background: #fff;
	color: #0073aa;
	font-size: 13px;
	line-height: 1.5;
	transition: background .15s ease, color .15s ease;
}
.fcpm-badges-viewall:hover {
	background: #0073aa;
	color: #fff;
}

/* Modal */
#fcpm-badge-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fcpm-badge-modal-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.5);
}

.fcpm-badge-modal-content {
	position: relative;
	background: #fff;
	color: #0f172a;
	border-radius: 10px;
	padding: 20px;
	max-width: 600px;
	width: 90%;
	max-height: 80%;
	overflow-y: auto;
	box-sizing: border-box;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fcpm-badge-modal-content h3 {
	margin: 0 0 15px;
	font-size: 22px;
	font-weight: 600;
}

.fcpm-badge-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
}

/* Pop-in then bounce, staggered by --delay (set per badge in JS) */
#fcpm-badge-modal .fcpm-badge-item {
	transform: scale(0);
	opacity: 0;
	animation: fcpm-badge-pop 0.3s forwards, fcpm-badge-bounce 0.4s ease-out forwards;
	animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + 0.3s);
}

@keyframes fcpm-badge-pop {
	to { transform: scale(1); opacity: 1; }
}

@keyframes fcpm-badge-bounce {
	0%   { transform: scale(1) translateY(0); }
	30%  { transform: scale(1.05) translateY(-8px); }
	60%  { transform: scale(0.98) translateY(4px); }
	100% { transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	#fcpm-badge-modal .fcpm-badge-item {
		animation: none;
		transform: none;
		opacity: 1;
	}
}
