/* ==========================================================================
   Testimonial Reel
   Colour cascade: block attribute → Kadence global palette → fallback
   ========================================================================== */

.ltp-testimonial-reel {
	--_tr-bg:       var(--ltp-tr-bg, var(--global-palette7, #f9f9f9));
	--_tr-text:     var(--ltp-tr-text, var(--global-palette3, #1a1a1a));
	--_tr-stars:    var(--ltp-tr-stars, var(--global-palette1, #c5a467));
	--_tr-controls: var(--ltp-tr-controls, var(--global-palette1, #c5a467));

	background: var(--_tr-bg);
	color: var(--_tr-text);
	text-align: center;
	padding: 60px 20px;
	position: relative;
	overflow: hidden;
	font-family: inherit;
}

/* ---------- Heading & Description ---------- */

.ltp-tr-heading {
	margin: 0 0 8px;
	font-family: inherit;
	font-size: var(--global-font-size-large, 28px);
	color: var(--_tr-text);
}

.ltp-tr-description {
	margin: 0 0 32px;
	font-size: 16px;
	opacity: 0.7;
}

/* ---------- Viewport & Slides ---------- */

.ltp-tr-viewport {
	position: relative;
	max-width: 700px;
	margin: 0 auto;
}

.ltp-tr-track {
	position: relative;
}

.ltp-tr-slide {
	opacity: 0;
	visibility: hidden;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

.ltp-tr-slide--active {
	opacity: 1;
	visibility: visible;
	position: relative;
}

/* ---------- Blockquote ---------- */

.ltp-tr-quote {
	position: relative;
	margin: 0;
	padding: 0;
}

.ltp-tr-quote-mark {
	color: var(--_tr-text);
	opacity: 0.2;
	display: block;
	margin: 0 auto 12px;
}

.ltp-tr-text {
	font-size: 18px;
	line-height: 1.7;
	font-style: italic;
	margin: 0 0 20px;
	font-family: inherit;
	white-space: pre-line;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(3 * 1.7em);
}

/* ---------- Read More ---------- */

.ltp-tr-read-more {
	display: none;
	background: none;
	border: none;
	color: var(--_tr-controls);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 0;
	margin: 0 0 16px;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ltp-tr-read-more--visible {
	display: inline-block;
}

.ltp-tr-read-more:hover,
.ltp-tr-read-more:focus-visible {
	opacity: 0.7;
}

/* ---------- Stars ---------- */

.ltp-tr-stars {
	display: flex;
	justify-content: center;
	gap: 3px;
	margin-bottom: 20px;
	color: var(--_tr-stars);
}

.ltp-tr-star--empty {
	opacity: 0.35;
}

/* ---------- Reviewer Footer ---------- */

.ltp-tr-reviewer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.ltp-tr-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--_tr-controls);
	margin-bottom: 8px;
}

.ltp-tr-name {
	font-style: normal;
	font-weight: 600;
	font-size: 16px;
}

.ltp-tr-role {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.6;
}

/* ---------- Navigation ---------- */

.ltp-tr-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
}

.ltp-tr-prev,
.ltp-tr-next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--_tr-controls);
	background: transparent;
	color: var(--_tr-controls);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	padding: 0;
}

.ltp-tr-prev:hover,
.ltp-tr-next:hover,
.ltp-tr-prev:focus-visible,
.ltp-tr-next:focus-visible {
	background: var(--_tr-controls);
	color: var(--_tr-bg);
}

.ltp-tr-dots {
	display: flex;
	gap: 8px;
	align-items: center;
}

.ltp-tr-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1px solid var(--_tr-controls);
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: transform 0.2s ease, background 0.2s ease;
}

.ltp-tr-dot--active {
	background: var(--_tr-controls);
	transform: scale(1.3);
}

.ltp-tr-dot:hover {
	background: var(--_tr-controls);
}

/* ---------- Dialog ---------- */

.ltp-tr-dialog {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 20px;
	z-index: 999999;
}

.ltp-tr-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.ltp-tr-dialog:not([open]) {
	display: none;
}

.ltp-tr-dialog-inner {
	background: #fff;
	color: var(--global-palette3, #1a1a1a);
	border-radius: 12px;
	padding: 40px 32px 32px;
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.ltp-tr-dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: inherit;
	opacity: 0.5;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: opacity 0.2s ease;
	padding: 0;
}

.ltp-tr-dialog-close:hover,
.ltp-tr-dialog-close:focus-visible {
	opacity: 1;
}

.ltp-tr-dialog-text {
	font-size: 18px;
	line-height: 1.7;
	font-style: italic;
	margin: 0 0 20px;
	white-space: pre-line;
}

.ltp-tr-dialog .ltp-tr-stars {
	margin-bottom: 20px;
}

.ltp-tr-dialog .ltp-tr-reviewer {
	margin-top: 0;
}

/* ---------- Responsive ---------- */

@media ( max-width: 719px ) {
	.ltp-testimonial-reel {
		padding: 40px 16px;
	}

	.ltp-tr-text {
		font-size: 16px;
	}

	.ltp-tr-heading {
		font-size: 22px;
	}

	.ltp-tr-prev,
	.ltp-tr-next {
		width: 36px;
		height: 36px;
	}

	.ltp-tr-dialog-inner {
		padding: 32px 20px 24px;
	}
}
