/**
 * Front-end styling for SignalMind generated content.
 *
 * Every color here is a CSS variable read from the host theme first, with the
 * plugin's original light-theme palette as the fallback. On SignalMind (a
 * dark theme with a mint/cyan accent, tokens defined in assets/css/tokens.css)
 * these resolve to the real brand colors automatically; on any other site
 * using this plugin, where --sm-color-* is not defined, every rule falls back
 * to the original values unchanged. One file, correct on every deployment.
 */

.abp-toc {
	background: var(--sm-color-surface-raised, #f9f9fb);
	border-left: 4px solid var(--sm-color-primary, #5b4fe8);
	border-radius: 6px;
	padding: 16px 20px;
	margin: 0 0 28px;
	color: var(--sm-color-text, inherit);
}

.abp-toc p {
	margin: 0 0 8px;
}

.abp-toc ul {
	margin: 0;
	padding-left: 20px;
}

.abp-toc li {
	margin-bottom: 4px;
}

.abp-table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	color: var(--sm-color-text, inherit);
}

.abp-table th,
.abp-table td {
	border: 1px solid var(--sm-color-border, #e2e4e7);
	padding: 10px 14px;
	text-align: left;
}

.abp-table th {
	background: var(--sm-color-surface-raised, #f3f2fd);
	color: var(--sm-color-text, inherit);
	font-weight: 600;
}

.abp-table td {
	background: var(--sm-color-surface, transparent);
}

.abp-table tr:nth-child(even) td {
	background: var(--sm-color-surface-hover, #fafafa);
}

.abp-stat-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 10px 0;
}

.abp-stat-bar__label {
	flex: 0 0 auto;
	min-width: 120px;
	font-size: 14px;
	color: var(--sm-color-text, inherit);
}

.abp-stat-bar__track {
	flex: 1 1 auto;
	background: var(--sm-color-surface-raised, #eceaf9);
	border-radius: 6px;
	height: 10px;
	overflow: hidden;
}

.abp-stat-bar__fill {
	height: 100%;
	background: var(--sm-color-primary, #5b4fe8);
	border-radius: 6px;
}

.abp-stat-bar__value {
	flex: 0 0 auto;
	font-weight: 600;
	min-width: 44px;
	text-align: right;
	color: var(--sm-color-text, inherit);
}

.abp-stat-callout {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	background: var(--sm-color-surface-raised, #f9f9fb);
	border-left: 4px solid var(--sm-color-primary, #5b4fe8);
	border-radius: 6px;
	padding: 10px 16px;
	margin: 10px 12px 10px 0;
}

.abp-stat-callout__value {
	font-size: 22px;
	font-weight: 700;
	color: var(--sm-color-text, #1d2327);
}

.abp-stat-callout__label {
	font-size: 13px;
	color: var(--sm-color-text-muted, #555);
}

.abp-inline-image {
	margin: 24px 0;
}

.abp-inline-image img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.abp-faq {
	margin-top: 32px;
}

.abp-faq details {
	border: 1px solid var(--sm-color-border, #e2e4e7);
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 8px;
	color: var(--sm-color-text, inherit);
}

.abp-faq summary {
	font-weight: 600;
	cursor: pointer;
}

.abp-faq details p {
	margin: 10px 0 0;
}

/**
 * The gradient runs between the primary accent and its active/hover variant
 * rather than a flat fill, so it keeps depth on brand instead of just
 * swapping one flat purple for one flat green.
 */
.abp-cta {
	background: linear-gradient(135deg, var(--sm-color-primary, #5b4fe8) 0%, var(--sm-color-primary-active, #4038c2) 100%);
	border-radius: 12px;
	padding: 28px 32px;
	margin: 32px 0;
	text-align: center;
	color: var(--sm-color-primary-contrast, #fff);
}

.abp-cta__title {
	margin: 0 0 8px;
	color: var(--sm-color-primary-contrast, #fff);
	font-size: 20px;
	font-weight: 700;
}

.abp-cta p {
	margin: 0 0 18px;
	color: var(--sm-color-primary-contrast, rgba(255, 255, 255, 0.9));
	opacity: 0.9;
	font-size: 15px;
}

.abp-cta__button {
	display: inline-block;
	background: var(--sm-color-surface, #fff);
	color: var(--sm-color-primary, #4038c2);
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 8px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.abp-cta__button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	color: var(--sm-color-primary, #4038c2);
}

.abp-disclaimer {
	background: var(--sm-color-surface-raised, #fbf7ec);
	border-left: 4px solid #dba617;
	border-radius: 6px;
	padding: 12px 16px;
	margin: 16px 0;
	font-size: 14px;
	color: var(--sm-color-text, inherit);
}
