/**
 * AI Visibility Score Detail Page — styles
 *
 * @package aiready-llms-txt-generator
 * @since   1.5.0
 */

.llmstxt-score-detail {
	max-width: 1100px;
}

.lvc-breadcrumb {
	margin: 0 0 8px;
}

/* ─── Header ─────────────────────────────────────────────────────────── */

.lvc-detail-header {
	display: flex;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
	padding: 24px;
}

.lvc-detail-header-dial {
	position: relative;
	flex: 0 0 auto;
}

.lvc-detail-header-num {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 32px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1;
}

.lvc-detail-header-num span {
	font-size: 14px;
	color: #999;
	font-weight: 500;
}

.lvc-detail-header-info {
	flex: 1 1 240px;
}

.lvc-detail-header-info h1 {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 600;
	padding: 0;
}

.lvc-detail-header-tier {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 500;
	color: #1d2327;
}

.lvc-detail-header-meta {
	margin: 0;
	font-size: 13px;
	color: #666;
}

.lvc-detail-header-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.lvc-detail-header-actions .button .dashicons {
	margin-top: 3px;
	margin-right: 2px;
}

/* ─── Drilldown sections ────────────────────────────────────────────── */

.lvc-detail-section {
	background: #fff;
	border: 1px solid #e6e8eb;
	border-radius: 6px;
	padding: 20px 24px;
	margin: 16px 0;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
	scroll-margin-top: 50px;
}

.lvc-detail-section--focus {
	box-shadow: 0 0 0 3px #60a5fa, 0 1px 4px rgba(0, 0, 0, .08);
	animation: lvc-focus-pulse 2s ease-out 1;
}

@keyframes lvc-focus-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(96, 165, 250, .8); }
	60%  { box-shadow: 0 0 0 8px rgba(96, 165, 250, 0); }
	100% { box-shadow: 0 0 0 3px #60a5fa, 0 1px 4px rgba(0, 0, 0, .08); }
}

.lvc-detail-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 8px;
	flex-wrap: wrap;
}

.lvc-detail-head h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
}

.lvc-detail-head-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
}

.lvc-detail-score {
	font-weight: 700;
	font-size: 22px;
	line-height: 1;
}

.lvc-detail-score span {
	font-size: 12px;
	color: #999;
	font-weight: 500;
}

.lvc-detail-weight {
	background: #f0f2f5;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	color: #555;
}

.lvc-detail-summary {
	margin: 4px 0 14px;
	color: #555;
	font-size: 13px;
}

.lvc-detail-warn {
	color: #d97706;
}

/* ─── Tables ────────────────────────────────────────────────────────── */

.lvc-detail-table {
	margin-top: 8px;
	font-size: 13px;
}

.lvc-detail-table th {
	font-weight: 600;
	color: #555;
}

.lvc-detail-table .lvc-col-name a {
	color: #1d2327;
	text-decoration: none;
	font-weight: 500;
}

.lvc-detail-table .lvc-col-name a:hover {
	color: #60a5fa;
	text-decoration: underline;
}

.lvc-detail-table .lvc-col-check {
	width: 80px;
	text-align: center;
}

.lvc-detail-table .lvc-col-action {
	width: 90px;
	text-align: right;
}

.lvc-row-warn .lvc-col-name a {
	color: #1d2327;
}

.lvc-no-action {
	color: #cbd2db;
}

/* ─── Check icons ───────────────────────────────────────────────────── */

.lvc-check {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: 14px;
}

.lvc-check-ok    { color: #16a34a; }
.lvc-check-bad   { color: #dc2626; }
.lvc-check-warn  { color: #d97706; }

.lvc-check-detail {
	font-size: 11px;
	color: #777;
	font-weight: 400;
	margin-left: 2px;
}

/* ─── Check grid (llms.txt section) ─────────────────────────────────── */

.lvc-check-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 14px 0;
}

.lvc-check-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 5px;
	border: 1px solid #e6e8eb;
	background: #fafbfc;
	font-size: 13px;
	cursor: help;
}

.lvc-check-cell-ok  { border-color: #bbf7d0; background: #f0fdf4; }
.lvc-check-cell-bad { border-color: #fecaca; background: #fef2f2; }

.lvc-check-cell .lvc-check-icon {
	font-size: 16px;
	font-weight: 700;
}

.lvc-check-cell-ok  .lvc-check-icon { color: #16a34a; }
.lvc-check-cell-bad .lvc-check-icon { color: #dc2626; }

.lvc-check-label {
	flex: 1;
	font-weight: 500;
	color: #1d2327;
}

@media (max-width: 782px) {
	.lvc-check-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.lvc-check-grid { grid-template-columns: 1fr; }
}

/* ─── Recommendation row ────────────────────────────────────────────── */

.lvc-detail-rec {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	margin-top: 12px;
	background: #fef3c7;
	border: 1px solid #fde68a;
	border-radius: 5px;
	font-size: 13px;
	flex-wrap: wrap;
}

.lvc-detail-rec-icon {
	font-size: 18px;
	flex: 0 0 auto;
}

.lvc-detail-rec-text {
	flex: 1 1 200px;
	color: #92400e;
}

/* ─── Snippet block (crawler section) ───────────────────────────────── */

.lvc-snippet-block {
	margin-top: 16px;
	padding: 14px;
	background: #f6f8fa;
	border: 1px solid #e6e8eb;
	border-radius: 5px;
}

.lvc-snippet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.lvc-snippet-pre {
	margin: 0;
	padding: 12px;
	background: #0c1018;
	color: #e6e8eb;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 4px;
	overflow-x: auto;
	white-space: pre;
}

.lvc-snippet-copy.lvc-copied {
	background: #bbf7d0;
	border-color: #16a34a;
	color: #14532d;
}

/* ─── Pro lock overlay (Content Quality + History when Free) ───────── */

.lvc-detail-section--locked {
	position: relative;
	min-height: 240px;
}

.lvc-locked-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.lvc-locked-content {
	max-width: 480px;
	text-align: center;
}

.lvc-locked-icon {
	font-size: 36px;
	display: block;
	margin-bottom: 10px;
}

.lvc-locked-content h3 {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
}

.lvc-locked-content p {
	margin: 0 0 14px;
	color: #555;
	font-size: 13px;
}

/* ─── Pro badge ─────────────────────────────────────────────────────── */

.lvc-detail-section .lvc-pro-badge {
	display: inline-block;
	padding: 2px 8px;
	background: linear-gradient(90deg, #f59e0b, #d97706);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	border-radius: 4px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	vertical-align: middle;
}

/* ─── noindex source badge ──────────────────────────────────────────── */

.lvc-source-badge {
	display: inline-block;
	padding: 2px 8px;
	background: #f0f2f5;
	border: 1px solid #e6e8eb;
	border-radius: 4px;
	font-size: 12px;
	color: #555;
}

/* ─── History sparkline ─────────────────────────────────────────────── */

.lvc-detail-section--history {
	background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.lvc-sparkline-wrap {
	margin: 14px 0;
	overflow-x: auto;
}

.lvc-sparkline {
	width: 100%;
	height: auto;
	max-width: 800px;
	display: block;
}

.lvc-history-footer {
	display: flex;
	gap: 16px;
	align-items: center;
	font-size: 13px;
	flex-wrap: wrap;
}

.lvc-history-stat strong {
	font-size: 16px;
}

.lvc-history-stat-meta {
	color: #777;
	margin-left: 4px;
	font-size: 12px;
}

.lvc-history-delta {
	padding: 3px 10px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 12px;
}

.lvc-delta-up   { background: #dcfce7; color: #166534; }
.lvc-delta-down { background: #fee2e2; color: #991b1b; }
.lvc-delta-flat { background: #f0f2f5; color: #555; }

/* ─── Mobile (WP admin breakpoint = 782px) ──────────────────────────── */

@media (max-width: 782px) {
	.lvc-detail-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.lvc-detail-header-actions {
		width: 100%;
		justify-content: flex-start;
	}

	.lvc-detail-section {
		padding: 16px;
	}

	.lvc-detail-table {
		font-size: 12px;
	}

	.lvc-detail-table th,
	.lvc-detail-table td {
		padding: 6px 4px;
	}

	.lvc-detail-table .lvc-col-action {
		width: auto;
	}
}

/* ─── v1.5.5 Loading skeleton ───────────────────────────────────────── */
.lvc-loading-card {
	text-align: center;
	padding: 48px 24px;
	max-width: 640px;
	margin: 24px auto;
}

.lvc-loading-spinner {
	margin: 0 auto 24px;
	width: 64px;
	height: 64px;
}

.lvc-loading-arc {
	animation: lvc-loading-rotate 1.2s linear infinite;
	transform-origin: 25px 25px;
}

@keyframes lvc-loading-rotate {
	0%   { transform: rotate(-90deg); }
	100% { transform: rotate(270deg); }
}

.lvc-loading-title {
	margin: 0 0 12px;
	font-size: 1.4em;
	color: #1d2327;
}

.lvc-loading-message {
	color: #50575e;
	font-size: 14px;
	line-height: 1.6;
	max-width: 480px;
	margin: 0 auto 28px;
}

.lvc-loading-progress {
	margin: 0 auto;
	max-width: 360px;
}

.lvc-loading-bar {
	width: 100%;
	height: 6px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 12px;
}

.lvc-loading-bar-fill {
	height: 100%;
	width: 35%;
	background: linear-gradient(90deg, #2271b1, #72aee6, #2271b1);
	background-size: 200% 100%;
	border-radius: 3px;
	animation: lvc-loading-slide 1.6s ease-in-out infinite;
}

@keyframes lvc-loading-slide {
	0%   { transform: translateX(-100%); background-position: 0% 0; }
	50%  { background-position: 100% 0; }
	100% { transform: translateX(285%); background-position: 0% 0; }
}

.lvc-loading-step {
	font-size: 13px;
	color: #2271b1;
	font-weight: 500;
	margin: 0;
	min-height: 1.4em;
}

.lvc-loading-hint {
	margin: 32px 0 0;
	font-size: 12px;
	color: #8c8f94;
	font-style: italic;
}

/* Skeleton sub-score placeholders */
.lvc-loading-skeleton {
	margin-top: 24px;
}

.lvc-skeleton-section {
	height: 80px;
	margin-bottom: 16px;
	background: linear-gradient(90deg, #f6f7f7 0%, #f0f0f1 50%, #f6f7f7 100%);
	background-size: 200% 100%;
	border-radius: 6px;
	border: 1px solid #dcdcde;
	animation: lvc-skeleton-shimmer 2s ease-in-out infinite;
}

@keyframes lvc-skeleton-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}