/**
 * AI Visibility Score — main card (spec-conform).
 * Dial left, sub-score bars right, top-3 recommendations below.
 * @since 1.4.6
 */

.llmstxt-vscore { padding: 18px 20px; }

/* Header */
.lvc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f1;
}
.lvc-vscore h2,
.lvc-head h2 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #1d2327;
}

.lvc-tier {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 10px;
	letter-spacing: 0.02em;
}
.lvc-tier-excellent       { background: rgba(52, 211, 153, 0.14); color: #047857; }
.lvc-tier-good            { background: rgba(245, 158, 11, 0.14); color: #92400e; }
.lvc-tier-needs-attention { background: rgba(251, 146, 60, 0.16); color: #9a3412; }
.lvc-tier-critical        { background: rgba(248, 113, 113, 0.16); color: #991b1b; }

/* v1.5.3: Refresh button is now a clearly visible secondary button with text label */
.lvc-refresh {
	margin-left: auto;
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	font-size: .82rem !important;
	padding: 3px 12px !important;
	height: auto !important;
	line-height: 1.7 !important;
	white-space: nowrap;
}
.lvc-refresh .dashicons { font-size: 16px; line-height: 1; width: 16px; height: 16px; color: inherit; }
.lvc-refresh-label { font-weight: 500; }
.lvc-refresh.is-spinning {
	pointer-events: none;
	opacity: .85;
	cursor: wait;
}
.lvc-refresh.is-spinning .dashicons { animation: lvc-spin 1s linear infinite; }
@keyframes lvc-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* "see all" link in recommendations head */
.lvc-recs-more {
	font-size: .75rem;
	font-weight: 400;
	color: #2271b1;
	text-decoration: none;
	margin-left: 8px;
}
.lvc-recs-more:hover { text-decoration: underline; }

/* Body: dial + subs */
.lvc-body {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 28px;
	align-items: center;
	margin-bottom: 14px;
}
@media (max-width: 768px) {
	.lvc-body { grid-template-columns: 1fr; gap: 16px; }
}

.lvc-dial {
	position: relative;
	text-align: center;
}
.lvc-dial svg { display: block; margin: 0 auto; }
.lvc-dial-num {
	position: absolute;
	top: 48px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 2rem;
	font-weight: 800;
	color: #1d2327;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.lvc-dial-num span {
	display: block;
	font-size: 0.65rem;
	font-weight: 500;
	color: #8c8f94;
	margin-top: 2px;
	letter-spacing: 0.05em;
}

/* Sub-score list (5 rows × ~22px = ~110px) */
.lvc-subs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.lvc-sub {
	min-height: 20px;
}
.lvc-sub-link {
	display: grid;
	grid-template-columns: minmax(140px, 1.4fr) 32px 1.6fr 32px;
	gap: 10px;
	align-items: center;
	font-size: 0.85rem;
	min-height: 20px;
	text-decoration: none;
	color: inherit;
	padding: 4px 6px;
	margin: -4px -6px;
	border-radius: 4px;
	transition: background 0.15s ease;
}
.lvc-sub-link:hover { background: #f6f7f7; color: inherit; }
.lvc-sub-link:hover .lvc-sub-label { color: #2271b1; }
.lvc-sub-link:hover .lvc-sub-bar { filter: brightness(1.1); }
.lvc-sub-link:focus { outline: 2px solid #60a5fa; outline-offset: 1px; }
.lvc-sub-label { color: #1d2327; font-weight: 500; }
.lvc-sub-weight { color: #8c8f94; font-size: 0.75rem; text-align: right; }
.lvc-sub-bar-wrap { background: #f0f0f1; border-radius: 4px; height: 7px; overflow: hidden; }
.lvc-sub-bar { display: block; height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.lvc-sub-num { font-weight: 700; font-variant-numeric: tabular-nums; color: #1d2327; text-align: right; font-size: 0.88rem; }
.lvc-sub-pro .lvc-sub-label,
.lvc-sub-pro .lvc-sub-num,
.lvc-sub-pro .lvc-sub-weight { color: #8c8f94; }
.lvc-pro-badge {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 8px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Recommendations */
.lvc-recs {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f1;
}
.lvc-recs-head {
	font-size: 0.85rem;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
}
.lvc-recs ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.lvc-rec {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f6f7f7;
	border-radius: 4px;
	border-left: 3px solid transparent;
	font-size: 0.85rem;
}
.lvc-rec-high   { border-left-color: #f87171; }
.lvc-rec-medium { border-left-color: #f59e0b; }
.lvc-rec-low    { border-left-color: #60a5fa; }
.lvc-rec-text { flex: 1; color: #1d2327; min-width: 0; }
.lvc-rec .button { white-space: nowrap; flex-shrink: 0; font-size: 0.8rem; padding: 0 12px; line-height: 26px; height: 28px; }

/* Footer */
.lvc-foot {
	margin-top: 12px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f1;
	font-size: 0.75rem;
	color: #8c8f94;
	text-align: right;
}
.lvc-foot a { color: #2271b1; text-decoration: none; }
.lvc-foot a:hover { text-decoration: underline; }

/* v1.5.0: detail-page link in header */
.lvc-detail-link { margin-left: auto; margin-right: 8px; font-size: 0.8rem; color: #2271b1; text-decoration: none; font-weight: 500; }
.lvc-detail-link:hover { color: #135e96; text-decoration: underline; }
.lvc-head .lvc-refresh { margin-left: 0; }

/* Snippet modal */
.lvc-snippet-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 20px; }
.lvc-snippet-modal-inner { background: #fff; border-radius: 8px; padding: 24px; max-width: 600px; width: 100%; max-height: 80vh; overflow: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.lvc-snippet-modal h3 { margin: 0 0 12px; font-size: 1.1rem; }
.lvc-snippet-modal pre { background: #1d2327; color: #e8ecf2; padding: 14px 16px; border-radius: 6px; overflow: auto; font-family: Menlo, Consolas, monospace; font-size: 0.85rem; line-height: 1.5; }
.lvc-snippet-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }