/**
 * Headline Analyzer - UI Components
 *
 * Popover, toast notifications, and confetti animation.
 *
 * @package AgenticWP
 */

/* ============================================
   Word Popover
   ============================================ */

.word-popover {
	position: fixed;
	z-index: var(--tool-z-dropdown);
	min-width: 200px;
	max-width: 280px;
	padding: 0.75rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.word-popover.visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.word-popover[hidden] {
	display: none;
}

.popover-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.popover-word-type {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.125rem 0.5rem;
	border-radius: 4px;
	background: var(--tool-bg-subtle);
	color: var(--ink);
}

.popover-category {
	font-size: 0.8125rem;
	color: var(--muted);
}

.popover-suggestions {
	padding-top: 0.5rem;
	border-top: 1px solid var(--line);
}

.suggestions-label {
	display: block;
	font-size: 0.75rem;
	color: var(--muted);
	margin-bottom: 0.375rem;
}

.suggestions-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.suggestion-btn {
	padding: 0.25rem 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--headline-accent-dark);
	background: rgba(167, 139, 250, 0.1);
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.suggestion-btn:hover {
	background: rgba(167, 139, 250, 0.2);
	border-color: var(--headline-accent);
}

/* Toast styles consolidated in shared/components.css */

/* ============================================
   Confetti Animation (for high scores)
   ============================================ */

@keyframes confetti-fall {
	0% {
		opacity: 1;
		transform: translateY(-100%) rotate(0deg);
	}
	100% {
		opacity: 0;
		transform: translateY(100vh) rotate(720deg);
	}
}

.confetti-piece {
	position: fixed;
	top: 0;
	width: 10px;
	height: 10px;
	z-index: 100;
	animation: confetti-fall 3s ease-out forwards;
	pointer-events: none;
}
