/* Badges & Achievements */
.pcs-badges-section {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	padding: 1.5rem;
	margin-top: 2rem;
}

.pcs-badges-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.pcs-badges-header h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #1f2937;
}

/* Badge Grid */
.pcs-badges-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 1rem;
}

.pcs-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: #f9fafb;
	border: 2px solid #e5e7eb;
	border-radius: 0.5rem;
	text-align: center;
	transition: all 0.2s ease;
	position: relative;
	cursor: pointer;
}

.pcs-badge.earned {
	background: linear-gradient(135deg, #f3f4f6, #fff);
	border-color: #fbbf24;
	box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.pcs-badge.earned:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
}

.pcs-badge.locked {
	opacity: 0.6;
}

.pcs-badge.locked:hover {
	opacity: 0.8;
}

.pcs-badge-icon {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(79, 70, 229, 0.1);
	margin-left: auto;
	margin-right: auto;
}

.pcs-badge.earned .pcs-badge-icon {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
}

.pcs-badge.blue .pcs-badge-icon {
	background: rgba(59, 130, 246, 0.1);
	color: #3b82f6;
}

.pcs-badge.red .pcs-badge-icon {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
}

.pcs-badge.yellow .pcs-badge-icon {
	background: rgba(251, 191, 36, 0.1);
	color: #fbbf24;
}

.pcs-badge.green .pcs-badge-icon {
	background: rgba(34, 197, 94, 0.1);
	color: #22c55e;
}

.pcs-badge.purple .pcs-badge-icon {
	background: rgba(168, 85, 247, 0.1);
	color: #a855f7;
}

.pcs-badge.pink .pcs-badge-icon {
	background: rgba(236, 72, 153, 0.1);
	color: #ec4899;
}

.pcs-badge.gold .pcs-badge-icon {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
}

.pcs-badge-name {
	font-size: 0.75rem;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.pcs-badge.locked .pcs-badge-name {
	color: #9ca3af;
}

.pcs-badge-date {
	font-size: 0.65rem;
	color: #9ca3af;
}

.pcs-badge-earned-icon {
	position: absolute;
	top: -8px;
	right: -8px;
	background: #22c55e;
	color: #fff;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.875rem;
	border: 2px solid #fff;
	line-height: 1;
}

/* Badge Tooltip */
.pcs-badge-tooltip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #1f2937;
	color: #fff;
	padding: 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	white-space: nowrap;
	margin-bottom: 0.5rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 10;
}

.pcs-badge:hover .pcs-badge-tooltip {
	opacity: 1;
}

.pcs-badge-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #1f2937;
}

/* Badge Progress */
.pcs-badge-progress {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
}

.pcs-badge-progress-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 1rem;
}

.pcs-badge-progress-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.pcs-badge-progress-item:last-child {
	margin-bottom: 0;
}

.pcs-badge-progress-icon {
	font-size: 1.5rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(79, 70, 229, 0.1);
	flex-shrink: 0;
	line-height: 1;
}

.pcs-badge-progress-info {
	flex: 1;
}

.pcs-badge-progress-name {
	font-size: 0.875rem;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 0.25rem;
}

.pcs-badge-progress-bar {
	width: 100%;
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
}

.pcs-badge-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--pco-primary-color, #7A3FF2), color-mix(in srgb, var(--pco-primary-color, #7A3FF2) 55%, #6d28d9));
	transition: width 0.3s ease;
}

.pcs-badge-progress-text {
	font-size: 0.75rem;
	color: #9ca3af;
	margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
	.pcs-badges-grid {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	}

	.pcs-badge-icon {
		font-size: 2rem;
		width: 50px;
		height: 50px;
	}

	.pcs-badge-name {
		font-size: 0.65rem;
	}

	.pcs-badge-tooltip {
		white-space: normal;
		width: 150px;
	}
}
