/**
 * ResolveVia Calculator Widget Styles
 *
 * Styles for the [rv_calculator] shortcode widget on SEO caller-acquisition pages.
 * Fully responsive. Tier C: mode switch hidden. Insurance note: restoration niches only.
 *
 * CSS selectors must match rv-calculator.js and class-calculator-generator.php exactly.
 *
 * F24 — Calculator System (Styles)
 *
 * @package ResolveVia
 * @since   1.0.0
 *
 * Schema: v2.37.39 / Migration 110 / 101 active tables
 */

/* ── Widget Wrapper ─────────────────────────────────────────────────────────── */

.rv-calculator-embed {
	margin: 2rem 0;
}

.rv-calculator-widget {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.75rem;
	max-width: 560px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.08 );
	position: relative;
}

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

.rv-calc-header {
	margin-bottom: 1.25rem;
}

.rv-calc-header h3 {
	font-size: 1.2rem;
	font-weight: var(--rv-weight-bold);
	color: #1a202c;
	margin: 0 0 0.375rem 0;
	line-height: 1.3;
}

.rv-calc-disclaimer {
	font-size: 0.75rem;
	color: #718096;
	margin: 0;
	font-style: italic;
}

/* ── Mode Toggle ────────────────────────────────────────────────────────────── */

.rv-calc-mode-toggle {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.rv-mode-btn {
	flex: 1;
	padding: 0.5rem 0.75rem;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	background: #f7fafc;
	color: #4a5568;
	font-size: 0.8rem;
	font-weight: var(--rv-weight-semibold);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
	text-align: center;
	white-space: nowrap;
}

.rv-mode-btn:hover {
	border-color: #4299e1;
	background: #ebf8ff;
	color: #2b6cb0;
}

.rv-mode-btn.active {
	border-color: #3182ce;
	background: #3182ce;
	color: #ffffff;
}

/* ── Input Fields ───────────────────────────────────────────────────────────── */

.rv-calc-inputs {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 1.375rem;
}

.rv-calc-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.rv-calc-field label {
	font-size: 0.875rem;
	font-weight: var(--rv-weight-semibold);
	color: #2d3748;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.rv-calc-val {
	font-weight: var(--rv-weight-bold);
	color: #3182ce;
	font-size: 0.9rem;
}

/* Range Slider ---------------------------------------------------------------- */

.rv-calc-range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 3px;
	background: #e2e8f0;
	outline: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.rv-calc-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #3182ce;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.2 );
	transition: background 0.15s ease, transform 0.1s ease;
}

.rv-calc-range::-webkit-slider-thumb:hover {
	background: #2b6cb0;
	transform: scale( 1.15 );
}

.rv-calc-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #3182ce;
	cursor: pointer;
	border: none;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.2 );
}

.rv-calc-range:focus {
	background: #bee3f8;
}

/* Select Dropdown ------------------------------------------------------------ */

.rv-calc-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #f7fafc;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5568' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	padding: 0.5rem 2.25rem 0.5rem 0.75rem;
	font-size: 0.875rem;
	color: #2d3748;
	cursor: pointer;
	width: 100%;
	transition: border-color 0.15s ease;
}

.rv-calc-select:focus {
	outline: none;
	border-color: #3182ce;
	box-shadow: 0 0 0 2px rgba( 49, 130, 206, 0.2 );
}

/* Number Input --------------------------------------------------------------- */

.rv-calc-number {
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	color: #2d3748;
	width: 100%;
	transition: border-color 0.15s ease;
}

.rv-calc-number:focus {
	outline: none;
	border-color: #3182ce;
	box-shadow: 0 0 0 2px rgba( 49, 130, 206, 0.2 );
}

/* ── Calculate Button ───────────────────────────────────────────────────────── */

.rv-calc-submit {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	background: #3182ce;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: var(--rv-weight-bold);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
	letter-spacing: 0.01em;
}

.rv-calc-submit:hover {
	background: #2b6cb0;
	transform: translateY( -1px );
}

.rv-calc-submit:active {
	transform: translateY( 0 );
}

.rv-calc-submit:disabled,
.rv-calc-submit.rv-loading {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.rv-calc-submit.rv-loading::after {
	content: ' ⟳';
	display: inline-block;
	animation: rv-spin 0.8s linear infinite;
}

@keyframes rv-spin {
	from { transform: rotate( 0deg ); }
	to   { transform: rotate( 360deg ); }
}

/* ── Result Section ─────────────────────────────────────────────────────────── */

.rv-calc-result {
	display: none;
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: linear-gradient( 135deg, #ebf8ff 0%, #f0fff4 100% );
	border: 1px solid #bee3f8;
	border-radius: 10px;
	text-align: center;
}

.rv-calc-estimate-range {
	font-size: 1.6rem;
	font-weight: var(--rv-weight-extrabold);
	color: #2b6cb0;
	margin-bottom: 0.5rem;
	line-height: 1.2;
}

.rv-calc-low,
.rv-calc-high {
	display: inline;
}

.rv-calc-separator {
	color: #a0aec0;
	margin: 0 0.375rem;
	font-weight: var(--rv-weight-normal);
}

.rv-calc-result-disclaimer {
	font-size: 0.75rem;
	color: #718096;
	margin: 0.5rem 0 0 0;
	font-style: italic;
}

.rv-calc-insurance-msg {
	font-size: 0.8rem;
	color: #276749;
	background: #f0fff4;
	border: 1px solid #9ae6b4;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	margin-top: 0.75rem;
}

/* ── CTA Section ────────────────────────────────────────────────────────────── */

.rv-calc-cta {
	display: none;
	margin-top: 1.25rem;
	text-align: center;
}

.rv-calc-cta.rv-calc-cta-visible {
	display: block;
}

.rv-calc-cta p {
	font-size: 0.875rem;
	color: #4a5568;
	margin-bottom: 0.75rem;
}

.rv-calc-cta a {
	display: inline-block;
	padding: 0.625rem 1.25rem;
	background: #48bb78;
	color: #ffffff;
	border-radius: 8px;
	font-weight: var(--rv-weight-bold);
	text-decoration: none;
	font-size: 1rem;
	transition: background 0.15s ease;
}

.rv-calc-cta a:hover {
	background: #38a169;
}

.rv-calc-cta a[href^="tel:"] {
	font-size: 1.1rem;
	letter-spacing: 0.02em;
}

/* ── Error State ────────────────────────────────────────────────────────────── */

.rv-calc-error {
	color: #c53030;
	font-size: 0.8rem;
	margin-top: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: #fff5f5;
	border: 1px solid #fed7d7;
	border-radius: 6px;
}

/* ── Spinner ────────────────────────────────────────────────────────────────── */

.rv-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba( 255, 255, 255, 0.4 );
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: rv-spin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 0.4rem;
}

.rv-calc-loading .rv-spinner {
	display: inline-block;
}

/* ── Mode-specific styles ───────────────────────────────────────────────────── */

.rv-calculator-widget[data-mode="commercial"] .rv-calc-result {
	background: linear-gradient( 135deg, #faf5ff 0%, #ebf8ff 100% );
	border-color: #d6bcfa;
}

.rv-calculator-widget[data-mode="commercial"] .rv-calc-estimate-range {
	color: #553c9a;
}

/* ── Tier C: Mode switch hidden ─────────────────────────────────────────────── */

.rv-calculator-widget[data-tier="complex"] .rv-calc-mode-toggle {
	display: none;
}

/* ── Mobile Responsive ──────────────────────────────────────────────────────── */

@media ( max-width: 640px ) {
	.rv-calculator-widget {
		padding: 1.25rem;
		border-radius: 8px;
	}

	.rv-calc-header h3 {
		font-size: 1.05rem;
	}

	.rv-calc-estimate-range {
		font-size: 1.35rem;
	}

	.rv-mode-btn {
		font-size: 0.75rem;
		padding: 0.45rem 0.5rem;
	}

	.rv-calc-range {
		height: 8px;
	}

	.rv-calc-range::-webkit-slider-thumb {
		width: 24px;
		height: 24px;
	}

	.rv-calc-submit {
		padding: 0.875rem 1rem;
		font-size: 1rem;
	}

	.rv-calc-cta a {
		display: block;
		text-align: center;
	}
}

@media ( max-width: 380px ) {
	.rv-calc-mode-toggle {
		flex-direction: column;
	}
}

/* ── Dark Mode Support ──────────────────────────────────────────────────────── */

@media ( prefers-color-scheme: dark ) {
	.rv-calculator-widget {
		background: #1a202c;
		border-color: #2d3748;
		box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.3 );
	}

	.rv-calc-header h3 {
		color: #f7fafc;
	}

	.rv-calc-disclaimer {
		color: #a0aec0;
	}

	.rv-calc-field label {
		color: #e2e8f0;
	}

	.rv-mode-btn {
		background: #2d3748;
		border-color: #4a5568;
		color: #e2e8f0;
	}

	.rv-mode-btn:hover {
		background: #2c5282;
		border-color: #4299e1;
		color: #bee3f8;
	}

	.rv-mode-btn.active {
		background: #2b6cb0;
		border-color: #2b6cb0;
		color: #ffffff;
	}

	.rv-calc-range {
		background: #4a5568;
	}

	.rv-calc-select {
		background-color: #2d3748;
		border-color: #4a5568;
		color: #e2e8f0;
	}

	.rv-calc-number {
		background: #2d3748;
		border-color: #4a5568;
		color: #e2e8f0;
	}

	.rv-calc-result {
		background: linear-gradient( 135deg, #1a365d 0%, #1c4532 100% );
		border-color: #2b6cb0;
	}

	.rv-calc-estimate-range {
		color: #90cdf4;
	}

	.rv-calc-result-disclaimer {
		color: #a0aec0;
	}

	.rv-calc-insurance-msg {
		background: #1c4532;
		border-color: #276749;
		color: #9ae6b4;
	}

	.rv-calc-cta p {
		color: #cbd5e0;
	}

	.rv-calc-error {
		background: #2d1515;
		border-color: #c53030;
		color: #fc8181;
	}
}

/* ── High-contrast / Accessibility ─────────────────────────────────────────── */

@media ( forced-colors: active ) {
	.rv-calc-submit,
	.rv-calc-cta a {
		forced-color-adjust: none;
	}
}

/* ── RTL Support ─────────────────────────────────────────────────────────────── */

[dir="rtl"] .rv-calc-field label {
	flex-direction: row-reverse;
}

[dir="rtl"] .rv-calc-select {
	background-position: left 0.75rem center;
	padding: 0.5rem 0.75rem 0.5rem 2.25rem;
}

[dir="rtl"] .rv-roi-currency-prefix {
	border-right: 1px solid #cbd5e0;
	border-left: none;
	border-radius: 0 6px 6px 0;
}

[dir="rtl"] .rv-roi-value-input {
	border-radius: 6px 0 0 6px !important;
	border-left: 1px solid #cbd5e0 !important;
	border-right: none !important;
}

[dir="rtl"] .rv-spinner {
	margin-right: 0;
	margin-left: 0.4rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BUYER ROI CALCULATOR STYLES
   Added C4-Build-B. Extends base widget styles — all .rv-calculator-widget
   rules above still apply. These selectors are scoped to .rv-roi-calculator.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── ROI Widget Wrapper ─────────────────────────────────────────────────────── */

.rv-calculator-embed--buyer .rv-roi-calculator {
	/* Distinct left border accent — differentiates from caller widget */
	border-left: 4px solid #3182ce;
}

/* ── ROI Slider Close Hint ──────────────────────────────────────────────────── */

.rv-roi-close-hint {
	display: block;
	font-size: 0.72rem;
	color: #718096;
	font-style: italic;
	margin-top: 0.25rem;
}

/* ── ROI Value Input Wrapper ────────────────────────────────────────────────── */

.rv-roi-value-wrap {
	display: flex;
	align-items: center;
	gap: 0;
}

.rv-roi-currency-prefix {
	padding: 0.5rem 0.5rem 0.5rem 0.75rem;
	background: #f7fafc;
	border: 1px solid #cbd5e0;
	border-right: none;
	border-radius: 6px 0 0 6px;
	font-size: 0.875rem;
	color: #4a5568;
	font-weight: var(--rv-weight-semibold);
	line-height: 1.5;
}

.rv-roi-value-input {
	border-radius: 0 6px 6px 0 !important;
	border-left: none !important;
	flex: 1;
}

.rv-roi-value-note {
	display: block;
	font-size: 0.72rem;
	color: #718096;
	font-style: italic;
	margin-top: 0.25rem;
}

/* ── ROI Lead Cost Display ──────────────────────────────────────────────────── */

.rv-roi-cost-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.625rem 0.75rem;
	background: #f7fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
}

.rv-roi-cost-label {
	font-size: 0.8rem;
	font-weight: var(--rv-weight-semibold);
	color: #4a5568;
}

.rv-roi-cost-range {
	font-size: 0.8rem;
	color: #2d3748;
	font-weight: var(--rv-weight-bold);
}

/* ── ROI Submit Button ──────────────────────────────────────────────────────── */

.rv-roi-submit {
	margin-top: 0.25rem;
}

/* ── ROI Result Section ─────────────────────────────────────────────────────── */

.rv-roi-result {
	display: none;
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: linear-gradient( 135deg, #ebf8ff 0%, #f0fff4 100% );
	border: 1px solid #bee3f8;
	border-radius: 10px;
}

/* ── ROI Metrics Grid ───────────────────────────────────────────────────────── */

.rv-roi-metrics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.875rem;
	margin-bottom: 0.875rem;
}

.rv-roi-metric {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.75rem;
	background: rgba( 255, 255, 255, 0.7 );
	border-radius: 8px;
	border: 1px solid rgba( 226, 232, 240, 0.8 );
}

.rv-roi-metric-label {
	font-size: 0.72rem;
	font-weight: var(--rv-weight-semibold);
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.rv-roi-metric-value {
	font-size: 1.15rem;
	font-weight: var(--rv-weight-bold);
	color: #2d3748;
	line-height: 1.2;
}

/* ── Profit Highlight ───────────────────────────────────────────────────────── */

.rv-roi-profit-highlight {
	background: linear-gradient( 135deg, #f0fff4, #c6f6d5 );
	border-color: #9ae6b4;
}

.rv-roi-profit-highlight .rv-roi-metric-label {
	color: #276749;
}

.rv-roi-profit-highlight .rv-roi-metric-value {
	color: #22543d;
	font-size: 1.3rem;
}

/* ── ROI Percentage Highlight ───────────────────────────────────────────────── */

.rv-roi-pct-highlight {
	background: linear-gradient( 135deg, #ebf8ff, #bee3f8 );
	border-color: #90cdf4;
}

.rv-roi-pct-highlight .rv-roi-metric-label {
	color: #2c5282;
}

.rv-roi-pct-highlight .rv-roi-metric-value {
	color: #2a4365;
	font-size: 1.3rem;
}

/* ── ROI Result Disclaimer ──────────────────────────────────────────────────── */

.rv-roi-result-disclaimer {
	font-size: 0.72rem;
	color: #718096;
	font-style: italic;
	margin: 0;
	text-align: center;
}

/* ── ROI Suppression Message ────────────────────────────────────────────────── */

.rv-roi-suppressed {
	display: none;
	margin-top: 1rem;
	padding: 0.875rem 1rem;
	background: #fffaf0;
	border: 1px solid #fbd38d;
	border-radius: 8px;
	text-align: center;
}

.rv-roi-suppressed p {
	font-size: 0.875rem;
	color: #744210;
	margin: 0;
}

/* ── ROI CTA Button ─────────────────────────────────────────────────────────── */

.rv-roi-cta-btn {
	display: inline-block;
	padding: 0.75rem 1.75rem;
	background: #38a169;
	color: #ffffff !important;
	border-radius: 8px;
	font-weight: var(--rv-weight-bold);
	text-decoration: none;
	font-size: 1rem;
	transition: background 0.15s ease, transform 0.1s ease;
	letter-spacing: 0.01em;
}

.rv-roi-cta-btn:hover {
	background: #276749;
	transform: translateY( -1px );
}

.rv-roi-cta-btn:active {
	transform: translateY( 0 );
}

/* ── ROI Mobile Responsive ──────────────────────────────────────────────────── */

@media ( max-width: 640px ) {
	.rv-roi-metrics {
		grid-template-columns: 1fr;
		gap: 0.625rem;
	}

	.rv-roi-metric-value {
		font-size: 1.05rem;
	}

	.rv-roi-profit-highlight .rv-roi-metric-value,
	.rv-roi-pct-highlight .rv-roi-metric-value {
		font-size: 1.15rem;
	}

	.rv-roi-cta-btn {
		display: block;
		text-align: center;
	}
}

/* ── ROI Dark Mode ──────────────────────────────────────────────────────────── */

@media ( prefers-color-scheme: dark ) {
	.rv-calculator-embed--buyer .rv-roi-calculator {
		border-left-color: #4299e1;
	}

	.rv-roi-cost-display {
		background: #2d3748;
		border-color: #4a5568;
	}

	.rv-roi-cost-label {
		color: #a0aec0;
	}

	.rv-roi-cost-range {
		color: #e2e8f0;
	}

	.rv-roi-currency-prefix {
		background: #2d3748;
		border-color: #4a5568;
		color: #a0aec0;
	}

	.rv-roi-result {
		background: linear-gradient( 135deg, #1a365d 0%, #1c4532 100% );
		border-color: #2b6cb0;
	}

	.rv-roi-metric {
		background: rgba( 0, 0, 0, 0.2 );
		border-color: rgba( 74, 85, 104, 0.6 );
	}

	.rv-roi-metric-label {
		color: #a0aec0;
	}

	.rv-roi-metric-value {
		color: #e2e8f0;
	}

	.rv-roi-profit-highlight {
		background: linear-gradient( 135deg, #1c4532, #276749 );
		border-color: #276749;
	}

	.rv-roi-profit-highlight .rv-roi-metric-label {
		color: #9ae6b4;
	}

	.rv-roi-profit-highlight .rv-roi-metric-value {
		color: #c6f6d5;
	}

	.rv-roi-pct-highlight {
		background: linear-gradient( 135deg, #1a365d, #2b6cb0 );
		border-color: #2b6cb0;
	}

	.rv-roi-pct-highlight .rv-roi-metric-label {
		color: #90cdf4;
	}

	.rv-roi-pct-highlight .rv-roi-metric-value {
		color: #bee3f8;
	}

	.rv-roi-suppressed {
		background: #2d2000;
		border-color: #744210;
	}

	.rv-roi-suppressed p {
		color: #fbd38d;
	}

	.rv-roi-close-hint,
	.rv-roi-value-note,
	.rv-roi-result-disclaimer {
		color: #a0aec0;
	}
}

/* ══════════════════════════════════════════════════════════════════════════════
   BUYER ROI DISPLAY VARIANT STYLE MODIFIERS
   10 CSS modifier classes — one per display variant.
   Applied via .rv-roi-style--{variant} on the .rv-roi-calculator wrapper.
   These use niche CSS custom properties (--rv-accent, --rv-accent-light, etc.)
   defined in niche-themes.css so each niche gets its own accent color automatically.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero metric modifier (applied by PHP when emphasis matches metric) ─────── */
/* Makes one metric cell span full width and display value larger */

.rv-roi-metric--hero {
	grid-column: 1 / -1;
}

.rv-roi-metric--hero .rv-roi-metric-value {
	font-size: 1.75rem;
	font-weight: var(--rv-weight-extrabold);
}

/* ── Extra metrics section ───────────────────────────────────────────────────── */

.rv-roi-extra-metrics {
	margin-top: 0.875rem;
	padding-top: 0.875rem;
	border-top: 1px solid rgba( 226, 232, 240, 0.6 );
}

.rv-roi-extra {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.625rem;
}

/* Single-cell extras (ratio) go full width */
.rv-roi-extra--ratio {
	grid-template-columns: 1fr;
}

/* Break-even note cell */
.rv-roi-metric--break-even-note {
	grid-column: 1 / -1;
	background: rgba( 236, 253, 245, 0.6 );
	border-color: #9ae6b4;
}

.rv-roi-metric--break-even-note .rv-roi-metric-value {
	font-size: 0.875rem;
	font-weight: var(--rv-weight-semibold);
	color: #276749;
}

/* ── Variant 1: Standard (rv-roi-style--standard) ───────────────────────────── */
/* Default balanced view. Blue left border already set on base widget. */

.rv-roi-style--standard .rv-roi-result {
	background: linear-gradient( 135deg, #ebf8ff 0%, #f0fff4 100% );
	border-color: #bee3f8;
}

/* ── Variant 2: Earnings (rv-roi-style--earnings) ───────────────────────────── */
/* Uses niche accent color on result card. Revenue metric prominent. */

.rv-roi-style--earnings .rv-calculator-embed--buyer .rv-roi-calculator,
.rv-roi-style--earnings.rv-roi-calculator {
	border-left-color: var( --rv-accent, #3182ce );
}

.rv-roi-style--earnings .rv-roi-result {
	background: linear-gradient( 135deg, var( --rv-accent-light, #ebf8ff ) 0%, #f0fff4 100% );
	border-color: var( --rv-accent, #3182ce );
	border-width: 2px;
}

.rv-roi-style--earnings .rv-roi-metric--revenue .rv-roi-metric-value {
	color: var( --rv-accent-dark, #2b6cb0 );
}

/* ── Variant 3: Profit (rv-roi-style--profit) ───────────────────────────────── */
/* Profit cell enlarged. Deep green emphasis. */

.rv-roi-style--profit .rv-roi-result {
	background: linear-gradient( 135deg, #f0fff4 0%, #c6f6d5 100% );
	border-color: #9ae6b4;
}

.rv-roi-style--profit .rv-roi-profit-highlight {
	background: linear-gradient( 135deg, #c6f6d5, #9ae6b4 );
	border-color: #48bb78;
}

.rv-roi-style--profit .rv-roi-profit-highlight .rv-roi-metric-value {
	color: #22543d;
}

/* ── Variant 4: Revenue (rv-roi-style--revenue) ─────────────────────────────── */
/* Clean revenue focus. Niche accent on result border. */

.rv-roi-style--revenue .rv-roi-result {
	background: linear-gradient( 135deg, var( --rv-accent-light, #ebf8ff ) 0%, #ffffff 100% );
	border-color: var( --rv-accent, #3182ce );
}

.rv-roi-style--revenue .rv-roi-metric--revenue {
	background: var( --rv-accent-light, #ebf8ff );
	border-color: var( --rv-accent, #3182ce );
}

.rv-roi-style--revenue .rv-roi-metric--revenue .rv-roi-metric-value {
	color: var( --rv-accent-dark, #2b6cb0 );
	font-size: 1.3rem;
}

/* ── Variant 5: Cost Per Lead (rv-roi-style--cpl) ───────────────────────────── */
/* Amber-to-green framing: "is it worth the cost?" — yes, here's why. */

.rv-roi-style--cpl .rv-roi-result {
	background: linear-gradient( 135deg, #fffbeb 0%, #f0fff4 100% );
	border-color: #f6ad55;
}

.rv-roi-style--cpl .rv-roi-metric--ratio .rv-roi-metric-value {
	color: #276749;
	font-size: 1.5rem;
	font-weight: var(--rv-weight-extrabold);
}

/* ── Variant 6: Territory (rv-roi-style--territory) ─────────────────────────── */
/* Premium dark feel. Annual projection is the story. */

.rv-roi-style--territory .rv-roi-result {
	background: linear-gradient( 135deg, #1a202c 0%, #2d3748 100% );
	border-color: #4a5568;
	color: #e2e8f0;
}

.rv-roi-style--territory .rv-roi-metric {
	background: rgba( 255, 255, 255, 0.06 );
	border-color: rgba( 255, 255, 255, 0.12 );
}

.rv-roi-style--territory .rv-roi-metric-label {
	color: #a0aec0;
}

.rv-roi-style--territory .rv-roi-metric-value {
	color: #e2e8f0;
}

.rv-roi-style--territory .rv-roi-profit-highlight {
	background: linear-gradient( 135deg, #1c4532, #276749 );
	border-color: #276749;
}

.rv-roi-style--territory .rv-roi-profit-highlight .rv-roi-metric-label {
	color: #9ae6b4;
}

.rv-roi-style--territory .rv-roi-profit-highlight .rv-roi-metric-value {
	color: #c6f6d5;
}

.rv-roi-style--territory .rv-roi-metric--annual-revenue .rv-roi-metric-value,
.rv-roi-style--territory .rv-roi-metric--annual-profit .rv-roi-metric-value {
	font-size: 1.5rem;
	font-weight: var(--rv-weight-extrabold);
}

.rv-roi-style--territory .rv-roi-extra-metrics {
	border-top-color: rgba( 255, 255, 255, 0.12 );
}

.rv-roi-style--territory .rv-roi-result-disclaimer {
	color: #718096;
}

/* ── Variant 7: Annual Earnings (rv-roi-style--annual) ──────────────────────── */
/* Growth green. Annual numbers lead. */

.rv-roi-style--annual .rv-roi-result {
	background: linear-gradient( 135deg, #f0fff4 0%, #ebf8ff 100% );
	border-color: #68d391;
}

.rv-roi-style--annual .rv-roi-metric--annual-revenue {
	background: linear-gradient( 135deg, #c6f6d5, #9ae6b4 );
	border-color: #48bb78;
}

.rv-roi-style--annual .rv-roi-metric--annual-revenue .rv-roi-metric-value {
	color: #22543d;
	font-size: 1.5rem;
}

.rv-roi-style--annual .rv-roi-metric--annual-profit .rv-roi-metric-value {
	color: #22543d;
	font-size: 1.3rem;
}

/* ── Variant 8: Lead Value (rv-roi-style--lead-value) ───────────────────────── */
/* Compact per-lead framing. Niche accent for per-lead cells. */

.rv-roi-style--lead-value .rv-roi-result {
	background: linear-gradient( 135deg, var( --rv-accent-light, #ebf8ff ) 0%, #f7fafc 100% );
	border-color: var( --rv-accent, #3182ce );
}

.rv-roi-style--lead-value .rv-roi-metric--revenue-per-lead .rv-roi-metric-value,
.rv-roi-style--lead-value .rv-roi-metric--profit-per-lead .rv-roi-metric-value {
	color: var( --rv-accent-dark, #2b6cb0 );
	font-size: 1.3rem;
}

/* ── Variant 9: Close Rate (rv-roi-style--close-rate) ───────────────────────── */
/* Analytical dark blue. ROI % is the hero. */

.rv-roi-style--close-rate .rv-roi-result {
	background: linear-gradient( 135deg, #ebf8ff 0%, #e0e7ff 100% );
	border-color: #a3bffa;
}

.rv-roi-style--close-rate .rv-roi-pct-highlight {
	background: linear-gradient( 135deg, #2b6cb0, #2c5282 );
	border-color: #2b6cb0;
}

.rv-roi-style--close-rate .rv-roi-pct-highlight .rv-roi-metric-label {
	color: #bee3f8;
}

.rv-roi-style--close-rate .rv-roi-pct-highlight .rv-roi-metric-value {
	color: #ffffff;
	font-size: 1.75rem;
}

/* ── Variant 10: Break-Even (rv-roi-style--break-even) ──────────────────────── */
/* Motivational. Shows the tipping point clearly. */

.rv-roi-style--break-even .rv-roi-result {
	background: linear-gradient( 135deg, #fffbeb 0%, #f0fff4 100% );
	border-color: #fbd38d;
}

.rv-roi-style--break-even .rv-roi-metric--break-even {
	background: linear-gradient( 135deg, #fefcbf, #fef08a );
	border-color: #f6e05e;
}

.rv-roi-style--break-even .rv-roi-metric--break-even .rv-roi-metric-label {
	color: #744210;
}

.rv-roi-style--break-even .rv-roi-metric--break-even .rv-roi-metric-value {
	color: #7b341e;
	font-size: 1.5rem;
}

/* ── Extra metrics mobile ────────────────────────────────────────────────────── */

@media ( max-width: 640px ) {
	.rv-roi-extra {
		grid-template-columns: 1fr;
	}

	.rv-roi-metric--hero .rv-roi-metric-value {
		font-size: 1.4rem;
	}
}

/* ── Variant dark mode overrides ────────────────────────────────────────────── */

@media ( prefers-color-scheme: dark ) {
	.rv-roi-style--territory .rv-roi-result {
		background: linear-gradient( 135deg, #0f1117 0%, #1a1d27 100% );
		border-color: #2d3748;
	}

	.rv-roi-style--profit .rv-roi-result,
	.rv-roi-style--annual .rv-roi-result {
		background: linear-gradient( 135deg, #1c4532 0%, #14532d 100% );
		border-color: #276749;
	}

	.rv-roi-style--cpl .rv-roi-result {
		background: linear-gradient( 135deg, #2d2500 0%, #1c4532 100% );
		border-color: #744210;
	}

	.rv-roi-style--break-even .rv-roi-result {
		background: linear-gradient( 135deg, #2d2500 0%, #1c4532 100% );
		border-color: #b7791f;
	}

	.rv-roi-style--break-even .rv-roi-metric--break-even {
		background: linear-gradient( 135deg, #2d1f00, #3d2a00 );
		border-color: #b7791f;
	}

	.rv-roi-style--break-even .rv-roi-metric--break-even .rv-roi-metric-label {
		color: #f6ad55;
	}

	.rv-roi-style--break-even .rv-roi-metric--break-even .rv-roi-metric-value {
		color: #fbd38d;
	}

	.rv-roi-metric--break-even-note {
		background: rgba( 28, 69, 50, 0.4 );
		border-color: #276749;
	}

	.rv-roi-metric--break-even-note .rv-roi-metric-value {
		color: #9ae6b4;
	}

	.rv-roi-extra-metrics {
		border-top-color: rgba( 74, 85, 104, 0.4 );
	}
}
