/**
 * Dashboard Achievements
 *
 * Achievement badges, progress cards, and summary displays.
 *
 * @package AgenticWP
 */

/* ==========================================================================
   Component: Achievements
   ========================================================================== */

.agenticwp-achievements-summary {
	text-align: center;
	padding: 24px;
	background: radial-gradient(circle at center, var(--agenticwp-bg-gray) 0%, var(--agenticwp-bg-white) 100%);
	border-radius: var(--agenticwp-radius-lg);
	border: 1px solid var(--agenticwp-border-light);
	margin-bottom: 24px;
}

.agenticwp-achievement-count {
	font-size: 48px;
	font-weight: 800;
	line-height: 1;
	margin-bottom: 8px;
	background: linear-gradient(135deg, var(--agenticwp-primary), #1e3a8a);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.agenticwp-achievement-count-total {
	font-size: 20px;
	color: var(--agenticwp-text-muted);
	-webkit-text-fill-color: var(--agenticwp-text-muted);
}

.agenticwp-achievement-count-label {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--agenticwp-text-secondary);
}

/* Progress Cards */
.agenticwp-next-achievements h3,
.agenticwp-recent-achievements h3 {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--agenticwp-text-muted);
	margin: 24px 0 12px 0;
}

.agenticwp-achievement-progress-card {
	background: var(--agenticwp-bg-gray);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	gap: 14px;
	margin-bottom: 10px;
	border: 1px solid transparent;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.agenticwp-achievement-progress-card:hover {
	background: white;
	border-color: var(--agenticwp-border-light);
	box-shadow: var(--agenticwp-shadow-md);
	transform: translateY(-2px);
}

.agenticwp-achievement-progress-icon-wrapper {
	position: relative;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.agenticwp-achievement-progress-icon-wrapper .agenticwp-badge-svg {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0.4;
	transition: opacity 0.3s ease;
}

.agenticwp-achievement-progress-card:hover .agenticwp-badge-svg {
	opacity: 0.7;
}

.agenticwp-achievement-progress-emoji {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 20px;
	line-height: 1;
	z-index: 1;
	filter: grayscale(30%);
	transition: filter 0.3s ease;
}

.agenticwp-achievement-progress-card:hover .agenticwp-achievement-progress-emoji {
	filter: grayscale(0%);
}

.agenticwp-achievement-progress-info {
	flex: 1;
	min-width: 0;
}

.agenticwp-achievement-progress-name {
	font-size: 13px;
	font-weight: 600;
	display: block;
	margin-bottom: 2px;
	color: var(--agenticwp-text-primary);
}

.agenticwp-achievement-progress-desc {
	font-size: 11px;
	color: var(--agenticwp-text-secondary);
	display: block;
	margin-bottom: 10px;
	line-height: 1.4;
}

.agenticwp-achievement-progress-bar-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.agenticwp-achievement-progress-bar {
	flex: 1;
	height: 6px;
	background: rgba(0,0,0,0.08);
	border-radius: 3px;
	overflow: hidden;
}

.agenticwp-achievement-progress-bar-fill {
	height: 100%;
	border-radius: 3px;
	width: var(--progress-width, 0%);
	animation: progressFillIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
	position: relative;
}

.agenticwp-achievement-progress-bar-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
	animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressFillIn {
	from {
		width: 0%;
	}
	to {
		width: var(--progress-width, 0%);
	}
}

@keyframes progressShimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.agenticwp-achievement-progress-text {
	font-size: 11px;
	font-weight: 500;
	color: var(--agenticwp-text-muted);
	white-space: nowrap;
}

/* Badge list */
.agenticwp-achievement-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background 0.2s, transform 0.2s;
}

.agenticwp-achievement-badge:hover {
	background: var(--agenticwp-bg-gray);
	transform: translateX(4px);
}

.agenticwp-achievement-badge-icon-wrapper {
	position: relative;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

.agenticwp-achievement-badge-icon-wrapper .agenticwp-badge-svg {
	position: absolute;
	top: 0;
	left: 0;
}

.agenticwp-achievement-badge-emoji {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 18px;
	line-height: 1;
	z-index: 1;
}

.agenticwp-achievement-badge-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.agenticwp-achievement-badge-name {
	font-size: 13px;
	font-weight: 500;
	color: var(--agenticwp-text-primary);
}

.agenticwp-achievement-badge-tier {
	font-size: 11px;
	color: var(--agenticwp-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
