/**
 * OGEEAT Shadow Indexing — AI Visibility Dashboard Styles.
 *
 * @since 2.0.0
 */

/* Page wrapper */
.ogeeat-shadow-wrap {
	max-width: 1100px;
}

.ogeeat-shadow-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 23px;
	font-weight: 600;
}

.ogeeat-shadow-title .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #2271b1;
}

.ogeeat-shadow-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: #f0f6fc;
	color: #2271b1;
	padding: 3px 10px;
	border-radius: 12px;
	border: 1px solid #c3daf5;
}

.ogeeat-shadow-subtitle {
	color: #646970;
	margin: 4px 0 20px;
	font-size: 14px;
}

/* Cards grid */
.ogeeat-shadow-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

@media (max-width: 1024px) {
	.ogeeat-shadow-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ogeeat-shadow-cards {
		grid-template-columns: 1fr;
	}
}

.ogeeat-shadow-card {
	background: #fff;
	border: 1px solid #dcdde1;
	border-radius: 8px;
	padding: 20px;
}

.ogeeat-shadow-card--score {
	text-align: center;
}

.ogeeat-shadow-card-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #646970;
	margin-bottom: 8px;
}

.ogeeat-shadow-card-value {
	font-size: 28px;
	font-weight: 700;
	color: #1d2327;
	line-height: 1.2;
	margin-bottom: 6px;
}

.ogeeat-shadow-card-detail {
	font-size: 12px;
	color: #646970;
}

/* Score ring */
.ogeeat-shadow-score-ring {
	position: relative;
	width: 80px;
	height: 80px;
	margin: 8px auto;
}

.ogeeat-shadow-score-ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ogeeat-shadow-score-ring .ring-bg {
	fill: none;
	stroke: #f0f0f1;
	stroke-width: 2.5;
}

.ogeeat-shadow-score-ring .ring-fill {
	fill: none;
	stroke: #00a32a;
	stroke-width: 2.5;
	stroke-linecap: round;
	transition: stroke-dasharray 0.6s ease;
}

.ogeeat-shadow-score-value {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

/* Trend badge */
.ogeeat-shadow-trend {
	font-size: 13px;
	font-weight: 600;
	margin-left: 4px;
}

/* Source dot */
.ogeeat-shadow-source-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 4px;
	vertical-align: 1px;
}

/* Sections */
.ogeeat-shadow-section {
	background: #fff;
	border: 1px solid #dcdde1;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 24px;
}

.ogeeat-shadow-section h2 {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 16px;
	padding: 0;
}

.ogeeat-shadow-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.ogeeat-shadow-section-header h2 {
	margin: 0;
}

.ogeeat-shadow-period-btns {
	display: flex;
	gap: 4px;
}

.ogeeat-shadow-period-btns button:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

/* Chart container */
.ogeeat-shadow-chart {
	width: 100%;
	min-height: 200px;
	position: relative;
}

.ogeeat-shadow-chart svg {
	width: 100%;
	height: 200px;
}

.ogeeat-shadow-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
	font-size: 12px;
	color: #646970;
}

.ogeeat-shadow-legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

/* Two-column grid */
.ogeeat-shadow-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 24px;
}

@media (max-width: 782px) {
	.ogeeat-shadow-grid {
		grid-template-columns: 1fr;
	}
}

.ogeeat-shadow-grid .ogeeat-shadow-section {
	margin-bottom: 0;
}

/* Tables */
.ogeeat-shadow-table {
	width: 100%;
	border-spacing: 0;
	font-size: 13px;
}

.ogeeat-shadow-table th {
	text-align: left;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #646970;
	padding: 8px;
	border-bottom: 1px solid #f0f0f1;
}

.ogeeat-shadow-table td {
	padding: 8px;
	border-bottom: 1px solid #f0f0f1;
	color: #1d2327;
}

.ogeeat-shadow-table tr:last-child td {
	border-bottom: none;
}

.ogeeat-shadow-table a {
	color: #2271b1;
	text-decoration: none;
}

.ogeeat-shadow-table a:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Empty state */
.ogeeat-shadow-empty {
	color: #a7aaad;
	font-style: italic;
	text-align: center;
	padding: 24px 0;
}
.ogeeat-shadow-empty-state {
	text-align: center;
	padding: 32px 16px;
}
.ogeeat-shadow-empty-state .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #dcdde1;
	margin-bottom: 8px;
}
.ogeeat-shadow-empty-state p {
	margin: 0 0 4px;
	font-size: 13px;
	color: #646970;
}
.ogeeat-shadow-empty-hint {
	font-size: 12px !important;
	color: #a7aaad !important;
}

/* GEO pill in top pages table */
.ogeeat-shadow-geo-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	line-height: 1.4;
	white-space: nowrap;
}

/* LLMS stat */
.ogeeat-shadow-llms-stat {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	padding: 10px 12px;
	background: #f0f6fc;
	border-radius: 4px;
	font-size: 13px;
	color: #2271b1;
}

.ogeeat-shadow-llms-stat .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* E-E-A-T Correlation hint */
.ogeeat-shadow-correlation {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #fef8e8;
	border: 1px solid #e5d5a0;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 24px;
}

.ogeeat-shadow-correlation .dashicons {
	color: #dba617;
	font-size: 20px;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}

.ogeeat-shadow-correlation strong {
	display: block;
	font-size: 13px;
	margin-bottom: 4px;
}

.ogeeat-shadow-correlation p {
	font-size: 13px;
	color: #646970;
	margin: 0;
	line-height: 1.5;
}

/* Tooltip — click-to-toggle score breakdown panel */
.ogeeat-shadow-tooltip {
	position: relative;
	display: inline-flex;
	margin-top: 8px;
	justify-content: center;
}

.ogeeat-shadow-tooltip-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #dcdcde;
	background: #fff;
	border-radius: 20px;
	cursor: pointer;
	font-size: 12px;
	color: #2271b1;
	font-weight: 500;
	transition: background .15s, border-color .15s;
}

.ogeeat-shadow-tooltip-trigger:hover,
.ogeeat-shadow-tooltip-trigger:focus-visible {
	background: #f0f6fc;
	border-color: #2271b1;
	outline: none;
}

.ogeeat-shadow-tooltip-trigger .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #2271b1;
}

.ogeeat-shadow-tooltip-caret {
	transition: transform .2s ease;
}

.ogeeat-shadow-tooltip-trigger[aria-expanded="true"] .ogeeat-shadow-tooltip-caret {
	transform: rotate(180deg);
}

.ogeeat-shadow-tooltip-label {
	white-space: nowrap;
}

.ogeeat-shadow-tooltip-text {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	width: 280px;
	padding: 12px 14px;
	background: #1d2327;
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0,0,0,.2);
	z-index: 10;
}

.ogeeat-shadow-tooltip-text[hidden] {
	display: none;
}

/* Score breakdown in tooltip */
.ogeeat-shadow-breakdown {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
}
.ogeeat-shadow-breakdown li {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
	font-size: 11px;
}
.ogeeat-shadow-breakdown-label {
	width: 55px;
	flex-shrink: 0;
	opacity: .8;
}
.ogeeat-shadow-breakdown-bar {
	flex: 1;
	height: 4px;
	background: rgba(255,255,255,.15);
	border-radius: 2px;
	overflow: hidden;
}
.ogeeat-shadow-breakdown-bar span {
	display: block;
	height: 100%;
	background: #2271b1;
	border-radius: 2px;
	transition: width .4s ease;
}
.ogeeat-shadow-breakdown-val {
	width: 32px;
	flex-shrink: 0;
	text-align: right;
	font-weight: 600;
	font-size: 10px;
}

.ogeeat-shadow-tooltip-text::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #1d2327;
}
