/**
 * Headline Analyzer - Word Breakdown
 *
 * Highlighted headline display, word type legend, breakdown chart,
 * and emotional categories.
 *
 * @package AgenticWP
 */

/* ============================================
   Breakdown Card Layout
   ============================================ */

.results-breakdown-card {
	grid-column: span 2;
}

/* ============================================
   Highlighted Headline
   ============================================ */

.headline-highlight {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: var(--tool-bg-subtle);
	border-radius: 10px;
}

.highlighted-text {
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.6;
	color: var(--ink);
	margin-bottom: 0.75rem;
}

.highlighted-text .word {
	display: inline-block;
	padding: 0.125rem 0.25rem;
	border-radius: 4px;
	cursor: default;
	transition: transform 0.2s ease;
	position: relative;
}

.highlighted-text .word:hover {
	transform: scale(1.05);
}

/* Word type colors */
.highlighted-text .word.emotional {
	background: rgba(236, 72, 153, 0.2);
	color: #9d174d;
}

.highlighted-text .word.power {
	background: rgba(167, 139, 250, 0.2);
	color: var(--headline-accent-dark);
}

.highlighted-text .word.common {
	background: rgba(156, 163, 175, 0.2);
	color: #374151;
}

.highlighted-text .word.uncommon {
	background: rgba(59, 130, 246, 0.2);
	color: #1d4ed8;
}

.highlighted-text .word.weak {
	cursor: pointer;
	border-bottom: 2px dashed currentColor;
}

/* ============================================
   Highlight Legend
   ============================================ */

.highlight-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.8125rem;
	color: var(--muted);
}

.legend-item::before {
	content: '';
	width: 12px;
	height: 12px;
	border-radius: 3px;
}

.legend-emotional::before {
	background: rgba(236, 72, 153, 0.3);
}

.legend-power::before {
	background: rgba(167, 139, 250, 0.3);
}

.legend-common::before {
	background: rgba(156, 163, 175, 0.3);
}

.legend-uncommon::before {
	background: rgba(59, 130, 246, 0.3);
}

/* ============================================
   Word Breakdown Chart
   ============================================ */

.word-breakdown-chart {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.breakdown-bar {
	display: grid;
	grid-template-columns: 80px 1fr 40px;
	align-items: center;
	gap: 0.75rem;
}

.bar-label {
	font-size: 0.875rem;
	color: var(--muted);
	text-align: right;
}

.bar-track {
	height: 8px;
	background: var(--line);
	border-radius: 4px;
	overflow: hidden;
}

.bar-fill {
	height: 100%;
	width: var(--bar-width, 0%);
	border-radius: 4px;
	transition: width 0.8s ease;
}

.breakdown-bar[data-type="emotional"] .bar-fill {
	background: linear-gradient(90deg, #EC4899, #f472b6);
}

.breakdown-bar[data-type="power"] .bar-fill {
	background: var(--gradient-violet);
}

.breakdown-bar[data-type="common"] .bar-fill {
	background: linear-gradient(90deg, #9ca3af, #d1d5db);
}

.breakdown-bar[data-type="uncommon"] .bar-fill {
	background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.bar-value {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

/* ============================================
   Emotional Categories
   ============================================ */

.emotional-categories {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.categories-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
	margin: 0 0 0.75rem;
}

.categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.category-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 500;
	border-radius: 20px;
	background: var(--tool-bg-subtle);
	color: var(--ink);
}

.category-tag.intellectual {
	background: rgba(59, 130, 246, 0.1);
	color: #1d4ed8;
}

.category-tag.empathetic {
	background: rgba(236, 72, 153, 0.1);
	color: #9d174d;
}

.category-tag.spiritual {
	background: rgba(167, 139, 250, 0.1);
	color: var(--headline-accent-dark);
}
