/**
 * Testimonial Fader component — read-more dialog
 */

.jx-tf-popup {
	--jx-tf-popup-accent: #1819ED;
	--jx-tf-popup-accent-hover: #3D38FF;
	--jx-tf-popup-accent-soft: rgba(24, 25, 237, 0.12);
	--jx-tf-popup-radius: 20px;
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
		max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	pointer-events: none;
}

.jx-tf-popup.is-open,
.jx-tf-popup.is-closing {
	pointer-events: auto;
}

.jx-tf-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.52);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.24s ease;
}

.jx-tf-popup.is-open .jx-tf-popup__backdrop {
	opacity: 1;
}

.jx-tf-popup.is-closing .jx-tf-popup__backdrop {
	opacity: 0;
}

.jx-tf-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(560px, 100%);
	max-height: min(78vh, 640px);
	display: flex;
	flex-direction: column;
	transform: translateY(16px) scale(0.97);
	opacity: 0;
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.jx-tf-popup.is-open .jx-tf-popup__dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.jx-tf-popup.is-closing .jx-tf-popup__dialog {
	transform: translateY(10px) scale(0.98);
	opacity: 0;
}

.jx-tf-popup__panel {
	display: flex;
	flex-direction: column;
	max-height: min(78vh, 640px);
	background: #fff;
	border-radius: var(--jx-tf-popup-radius);
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.6) inset,
		0 24px 48px rgba(15, 23, 42, 0.16),
		0 8px 16px rgba(15, 23, 42, 0.06);
	overflow: hidden;
}

.jx-tf-popup__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 20px 0;
	flex-shrink: 0;
}

.jx-tf-popup__eyebrow {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--jx-tf-popup-accent);
	margin-bottom: 4px;
}

.jx-tf-popup__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.jx-tf-popup__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.05);
	color: #475569;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.jx-tf-popup__close:hover {
	background: var(--jx-tf-popup-accent-soft);
	color: var(--jx-tf-popup-accent-hover);
}

.jx-tf-popup__close:focus-visible {
	outline: 2px solid var(--jx-tf-popup-accent-hover);
	outline-offset: 2px;
}

.jx-tf-popup__body {
	flex: 1 1 auto;
	overflow: auto;
	padding: 16px 24px 24px;
	font-size: 1rem;
	line-height: 1.7;
	color: #334155;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-overflow-scrolling: touch;
}

.jx-tf-popup__body p:first-child {
	margin-top: 0;
}

.jx-tf-popup__body p:last-child {
	margin-bottom: 0;
}

.jx-tf-popup-src {
	display: none !important;
}

html.jx-tf-popup-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.jx-tf-popup {
		padding: 12px;
		align-items: flex-end;
	}

	.jx-tf-popup__dialog {
		width: 100%;
		max-height: 88vh;
	}

	.jx-tf-popup__panel {
		border-radius: 18px 18px 14px 14px;
		max-height: 88vh;
	}

	.jx-tf-popup__header {
		padding: 18px 18px 0;
	}

	.jx-tf-popup__body {
		padding: 14px 18px 22px;
		font-size: 0.9375rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jx-tf-popup__backdrop,
	.jx-tf-popup__dialog {
		transition: none;
	}
}
