/**
 * AP ROI Calculator — scoped styles.
 */

.ap-roi-calculator {
	--ap-roi-bg: #0f1419;
	--ap-roi-surface: #161d26;
	--ap-roi-surface-2: #1c2530;
	--ap-roi-border: rgba(255, 255, 255, 0.08);
	--ap-roi-text: #e8eef5;
	--ap-roi-muted: #8b9cb0;
	--ap-roi-accent: #3dd68c;
	--ap-roi-accent-2: #3b82f6;
	--ap-roi-glow: rgba(61, 214, 140, 0.35);
	--ap-roi-radius: 16px;
	--ap-roi-radius-sm: 12px;
	--ap-roi-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);

	box-sizing: border-box;
	max-width: 960px;
	margin: 1.75rem auto;
	padding: clamp(1.25rem, 3vw, 2rem);
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
	color: var(--ap-roi-text);
	background: linear-gradient(160deg, var(--ap-roi-bg) 0%, #121a22 50%, #0c1118 100%);
	border: 1px solid var(--ap-roi-border);
	border-radius: var(--ap-roi-radius);
	box-shadow: var(--ap-roi-shadow);
}

.ap-roi-calculator *,
.ap-roi-calculator *::before,
.ap-roi-calculator *::after {
	box-sizing: inherit;
}

.ap-roi-calculator__header {
	text-align: center;
	margin-bottom: 1.75rem;
}

.ap-roi-calculator__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.35rem, 3vw, 1.65rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	background: linear-gradient(90deg, var(--ap-roi-accent), var(--ap-roi-accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.ap-roi-calculator__subtitle {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ap-roi-muted);
	line-height: 1.5;
}

.ap-roi-calculator__control {
	margin-bottom: 2rem;
	padding: 1.25rem 1.35rem;
	background: var(--ap-roi-surface);
	border: 1px solid var(--ap-roi-border);
	border-radius: var(--ap-roi-radius-sm);
}

.ap-roi-calculator__label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ap-roi-muted);
	margin-bottom: 0.75rem;
}

.ap-roi-calculator__slider-row {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.ap-roi-calculator__value {
	min-width: 3.5rem;
	padding: 0.35rem 0.65rem;
	font-size: 1.1rem;
	font-weight: 700;
	text-align: center;
	color: var(--ap-roi-accent);
	background: var(--ap-roi-surface-2);
	border: 1px solid var(--ap-roi-border);
	border-radius: 8px;
}

/* Sleek range: WebKit */
.ap-roi-calculator__range {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		var(--ap-roi-accent) 0%,
		#2ea574 35%,
		var(--ap-roi-accent-2) 100%
	);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
	outline: none;
}

.ap-roi-calculator__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--ap-roi-accent-2);
	box-shadow: 0 2px 12px var(--ap-roi-glow), 0 2px 6px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ap-roi-calculator__range::-webkit-slider-thumb:hover {
	transform: scale(1.06);
	box-shadow: 0 4px 18px var(--ap-roi-glow), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ap-roi-calculator__range::-webkit-slider-thumb:active {
	transform: scale(0.98);
}

/* Firefox */
.ap-roi-calculator__range::-moz-range-track {
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		var(--ap-roi-accent) 0%,
		#2ea574 35%,
		var(--ap-roi-accent-2) 100%
	);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ap-roi-calculator__range::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--ap-roi-accent-2);
	box-shadow: 0 2px 12px var(--ap-roi-glow);
	cursor: pointer;
}

.ap-roi-calculator__ticks {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.75rem;
	color: var(--ap-roi-muted);
}

.ap-roi-calculator__compare {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 720px) {
	.ap-roi-calculator__compare {
		grid-template-columns: 1fr 1fr;
		gap: 1.5rem;
		align-items: stretch;
	}
}

.ap-roi-card {
	position: relative;
	padding: 1.35rem 1.4rem 1.5rem;
	background: var(--ap-roi-surface);
	border: 1px solid var(--ap-roi-border);
	border-radius: var(--ap-roi-radius-sm);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ap-roi-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	opacity: 0.95;
}

.ap-roi-card--server::before {
	background: linear-gradient(90deg, var(--ap-roi-accent), #2ea574);
}

.ap-roi-card--mobile::before {
	background: linear-gradient(90deg, var(--ap-roi-accent-2), #6366f1);
}

.ap-roi-card:hover {
	border-color: rgba(255, 255, 255, 0.14);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.ap-roi-card__badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.3rem 0.55rem;
	border-radius: 6px;
	margin-bottom: 0.65rem;
	background: rgba(255, 255, 255, 0.06);
	color: var(--ap-roi-muted);
}

.ap-roi-card--server .ap-roi-card__badge {
	color: var(--ap-roi-accent);
	background: rgba(61, 214, 140, 0.12);
}

.ap-roi-card--mobile .ap-roi-card__badge {
	color: #93c5fd;
	background: rgba(59, 130, 246, 0.15);
}

.ap-roi-card__heading {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ap-roi-card__lines {
	list-style: none;
	margin: 0 0 1.15rem;
	padding: 0;
	border-top: 1px solid var(--ap-roi-border);
}

.ap-roi-card__lines li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--ap-roi-border);
	font-size: 0.9rem;
}

.ap-roi-card__k {
	color: var(--ap-roi-muted);
	flex: 1;
	line-height: 1.4;
}

.ap-roi-card__v {
	font-weight: 600;
	white-space: nowrap;
	color: var(--ap-roi-text);
}

.ap-roi-card__total {
	padding-top: 0.25rem;
}

.ap-roi-card__total-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ap-roi-muted);
	margin-bottom: 0.35rem;
}

.ap-roi-card__total-value {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
}

.ap-roi-card__eur {
	color: #a7f3d0;
}

.ap-roi-card__usd {
	color: #bfdbfe;
}
