/**
 * Rank Climber - Public & Editor Frontend Stylesheet
 * 
 * Clean, semantic, theme-neutral styling for AEO BLUF direct-answer callouts,
 * structured comparison tables, and accessible FAQ accordions.
 * Fully compatible with WordPress Full Site Editing (FSE), Classic themes, and dark mode.
 */

:root {
	--aeo-bluf-bg: #f8fafc;
	--aeo-bluf-border: #0284c7;
	--aeo-bluf-title-color: #0369a1;
	--aeo-bluf-text-color: #334155;
	--aeo-table-header-bg: #f1f5f9;
	--aeo-table-border: #e2e8f0;
	--aeo-table-text: #1e293b;
	--aeo-card-radius: 8px;
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
	:root {
		--aeo-bluf-bg: #0f172a;
		--aeo-bluf-border: #38bdf8;
		--aeo-bluf-title-color: #7dd3fc;
		--aeo-bluf-text-color: #cbd5e1;
		--aeo-table-header-bg: #1e293b;
		--aeo-table-border: #334155;
		--aeo-table-text: #f1f5f9;
	}
}

/* Also support theme dark class if theme uses it */
.dark-theme, [data-theme="dark"] {
	--aeo-bluf-bg: #0f172a;
	--aeo-bluf-border: #38bdf8;
	--aeo-bluf-title-color: #7dd3fc;
	--aeo-bluf-text-color: #cbd5e1;
	--aeo-table-header-bg: #1e293b;
	--aeo-table-border: #334155;
	--aeo-table-text: #f1f5f9;
}

/* 1. BLUF Direct-Answer Callout Box */
.aeo-bluf-box,
aside.aeo-bluf-box,
div.aeo-bluf-box {
	background-color: var(--aeo-bluf-bg);
	border-left: 4px solid var(--aeo-bluf-border);
	border-top: 1px solid var(--aeo-table-border);
	border-right: 1px solid var(--aeo-table-border);
	border-bottom: 1px solid var(--aeo-table-border);
	border-radius: var(--aeo-card-radius);
	padding: 16px 20px;
	margin: 24px 0;
	font-family: inherit;
	line-height: 1.6;
	color: var(--aeo-bluf-text-color);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease-in-out;
}

.aeo-bluf-title,
.aeo-bluf-box strong.aeo-bluf-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--aeo-bluf-title-color);
	margin-bottom: 8px;
	letter-spacing: -0.1px;
}

.aeo-bluf-text,
.aeo-bluf-box p.aeo-bluf-text,
.aeo-bluf-box p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--aeo-bluf-text-color);
}

/* 2. Structured Comparison Table */
.aeo-comparison-table,
table.aeo-comparison-table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
	border: 1px solid var(--aeo-table-border);
	border-radius: var(--aeo-card-radius);
	overflow: hidden;
}

.aeo-comparison-table thead tr {
	background-color: var(--aeo-table-header-bg);
}

.aeo-comparison-table th {
	padding: 12px 16px;
	font-weight: 700;
	color: var(--aeo-table-text);
	border-bottom: 2px solid var(--aeo-table-border);
	border-right: 1px solid var(--aeo-table-border);
}

.aeo-comparison-table th:last-child {
	border-right: none;
}

.aeo-comparison-table td {
	padding: 12px 16px;
	color: var(--aeo-bluf-text-color);
	border-bottom: 1px solid var(--aeo-table-border);
	border-right: 1px solid var(--aeo-table-border);
}

.aeo-comparison-table td:last-child {
	border-right: none;
}

.aeo-comparison-table tbody tr:last-child td {
	border-bottom: none;
}

.aeo-comparison-table tbody tr:hover {
	background-color: rgba(2, 132, 199, 0.03);
}

/* Responsive Table Wrapper */
@media (max-width: 640px) {
	.aeo-comparison-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* 3. Native Accessible Accordion FAQs */
.aeo-faq-accordion {
	margin: 24px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aeo-faq-details {
	background-color: var(--aeo-bluf-bg);
	border: 1px solid var(--aeo-table-border);
	border-radius: var(--aeo-card-radius);
	padding: 14px 18px;
	transition: all 0.2s ease;
}

.aeo-faq-details[open] {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.aeo-faq-summary {
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	color: var(--aeo-table-text);
	user-select: none;
	outline: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.aeo-faq-answer {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--aeo-table-border);
	font-size: 14px;
	line-height: 1.6;
	color: var(--aeo-bluf-text-color);
}

/* 4. E-E-A-T Reviewer Badge Box */
.aeo-eeat-trust-box {
	background-color: var(--aeo-bluf-bg);
	border: 1px solid var(--aeo-table-border);
	border-left: 4px solid #0284c7;
	border-radius: var(--aeo-card-radius);
	padding: 14px 18px;
	margin: 20px 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--aeo-bluf-text-color);
}
