/**
 * Headline Analyzer - Score Display
 *
 * Circular score gauge, rating, percentile, and headline type badge.
 *
 * @package AgenticWP
 */

/* ============================================
   Score Card Layout
   ============================================ */

.results-score-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.score-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 1rem;
}

/* ============================================
   Circular Score Ring
   ============================================ */

.score-circle {
	position: relative;
	width: 140px;
	height: 140px;
	margin-bottom: 0.75rem;
}

.score-ring {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.score-ring-bg {
	fill: none;
	stroke: var(--line);
	stroke-width: 8;
}

.score-ring-progress {
	fill: none;
	stroke: var(--headline-accent);
	stroke-width: 8;
	stroke-linecap: round;
	stroke-dasharray: 339.292; /* 2 * PI * 54 */
	stroke-dashoffset: 339.292;
	transition: stroke-dashoffset 1.5s ease, stroke 0.3s ease;
}

/* Score color based on value */
.score-display[data-level="poor"] .score-ring-progress {
	stroke: var(--tool-error);
}

.score-display[data-level="average"] .score-ring-progress {
	stroke: var(--tool-warning);
}

.score-display[data-level="good"] .score-ring-progress {
	stroke: #84cc16;
}

.score-display[data-level="excellent"] .score-ring-progress {
	stroke: var(--tool-success);
}

/* ============================================
   Score Value (inside circle)
   ============================================ */

.score-value {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.score-number {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--ink);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.score-label {
	font-size: 0.8125rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ============================================
   Score Meta (Rating & Percentile)
   ============================================ */

.score-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.score-rating {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ink);
}

.score-rating[data-level="poor"] {
	color: var(--tool-error);
}

.score-rating[data-level="average"] {
	color: var(--tool-warning);
}

.score-rating[data-level="good"] {
	color: #84cc16;
}

.score-rating[data-level="excellent"] {
	color: var(--tool-success);
}

.score-percentile {
	font-size: 0.875rem;
	color: var(--muted);
}

.percentile-value {
	font-weight: 600;
	color: var(--ink);
}

/* ============================================
   Headline Type Badge
   ============================================ */

.headline-type {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	margin-bottom: 1rem;
}

.type-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--headline-accent-dark);
	background: rgba(167, 139, 250, 0.15);
	border-radius: 20px;
}

.type-info-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	transition: color 0.2s ease;
}

.type-info-btn:hover,
.type-info-btn[aria-expanded="true"] {
	color: var(--headline-accent);
}

.type-info-tooltip {
	margin: 0.75rem 0 0;
	padding: 0.75rem 1rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--muted);
	background: var(--tool-bg-subtle);
	border-radius: 8px;
	text-align: left;
}

/* ============================================
   Accuracy Disclaimer
   ============================================ */

.accuracy-disclaimer {
	width: 100%;
	text-align: center;
}

.accuracy-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0;
	font-size: 0.8125rem;
	color: var(--muted);
	background: none;
	border: none;
	cursor: pointer;
	transition: color 0.2s ease;
}

.accuracy-toggle:hover {
	color: var(--ink);
}

.accuracy-toggle svg {
	flex-shrink: 0;
}

.accuracy-details {
	margin-top: 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--muted);
	background: var(--tool-bg-subtle);
	border-radius: 8px;
	text-align: left;
}

.accuracy-details p {
	margin: 0;
}
