/*!
 * PDD Testimonial Slider — Frontend
 */

.pdd-ts-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #1a1a1a;
	min-height: var(--pdd-ts-min-height, 420px);
}

.pdd-ts-track {
	position: relative;
	width: 100%;
	min-height: var(--pdd-ts-min-height, 420px);
}

/* Auto-height mode: slider grows to the tallest slide */
.pdd-ts-slider.pdd-ts-auto-height,
.pdd-ts-slider.pdd-ts-auto-height .pdd-ts-track {
	min-height: 0;
}
.pdd-ts-slider.pdd-ts-auto-height .pdd-ts-track {
	display: grid;
	grid-template-columns: 1fr;
}
.pdd-ts-slider.pdd-ts-auto-height .pdd-ts-slide {
	position: relative;
	inset: auto;
	grid-column: 1;
	grid-row: 1;
}
.pdd-ts-slider.pdd-ts-auto-height .pdd-ts-slide:not(.is-active) {
	visibility: hidden;
	pointer-events: none;
}

/* Defensive reset — prevent editor/theme styles from leaking in */
.pdd-ts-slider,
.pdd-ts-slider * { box-sizing: border-box; }
.pdd-ts-slider .pdd-ts-quote { border: 0 !important; padding: 0 !important; background: transparent !important; }
.pdd-ts-slider .pdd-ts-quote::before,
.pdd-ts-slider .pdd-ts-quote::after { content: none !important; }
.pdd-ts-slider a.pdd-ts-button { box-shadow: none; }

/* Slides — stacked, fade transition */
.pdd-ts-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	transition: opacity 600ms ease;
	pointer-events: none;
	color: #fff;
}
.pdd-ts-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 2;
}

/* Overlay */
.pdd-ts-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Content */
.pdd-ts-content {
	position: relative;
	z-index: 2;
	max-width: var(--pdd-ts-content-max, 70%);
	width: 100%;
	padding: 60px clamp(24px, 5vw, 72px);
	text-align: center;
	color: inherit;
}

/* Stars */
.pdd-ts-stars {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 22px;
	justify-content: center;
}
.pdd-ts-star { width: 22px; height: 22px; display: inline-flex; }
.pdd-ts-star svg { width: 100%; height: 100%; fill: rgba(255,255,255,.25); }
.pdd-ts-star.is-filled svg { fill: #f5b400; }

/* Quote */
.pdd-ts-quote {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	font-style: italic;
	font-size: clamp(15px, 1.35vw, 18px);
	line-height: 1.65;
	color: inherit;
	font-weight: 400;
	letter-spacing: .005em;
}
.pdd-ts-quote p { margin: 0 0 .6em; }
.pdd-ts-quote p:last-child { margin-bottom: 0; }

/* Name */
.pdd-ts-name {
	margin: 0 0 28px;
	font-size: 15px;
	font-style: normal;
	font-weight: 400;
	color: inherit;
	opacity: .95;
}

/* Button — outlined ghost style */
.pdd-ts-button {
	display: inline-block;
	padding: 12px 28px;
	border: 2px solid currentColor;
	background: transparent;
	color: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .02em;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color .25s ease, color .25s ease, transform .15s ease;
	cursor: pointer;
	line-height: 1.2;
}
.pdd-ts-button:hover,
.pdd-ts-button:focus {
	background: currentColor;
	color: #1a1a1a;
	text-decoration: none;
	outline: none;
}
.pdd-ts-button:focus-visible {
	box-shadow: 0 0 0 3px rgba(255,255,255,.4);
}

/* Arrows */
.pdd-ts-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(20, 22, 30, .85);
	color: #fff;
	cursor: pointer;
	padding: 0;
	border-radius: 2px;
	transition: background-color .2s ease, transform .15s ease;
}
.pdd-ts-arrow:hover { background: rgba(20, 22, 30, 1); }
.pdd-ts-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pdd-ts-arrow svg { width: 22px; height: 22px; }
.pdd-ts-arrow-prev { left: 0; }
.pdd-ts-arrow-next { right: 0; }

/* Dots */
.pdd-ts-dots {
	position: absolute;
	bottom: 18px;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	gap: 8px;
	justify-content: center;
}
.pdd-ts-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 0;
	background: rgba(255,255,255,.4);
	cursor: pointer;
	padding: 0;
	transition: background .2s ease, transform .15s ease;
}
.pdd-ts-dot.is-active,
.pdd-ts-dot:hover { background: #fff; }
.pdd-ts-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.pdd-ts-slide { transition: none; }
}

/* Small screens */
@media (max-width: 640px) {
	.pdd-ts-content { padding: 48px 24px; }
	.pdd-ts-arrow { width: 36px; height: 36px; }
	.pdd-ts-arrow svg { width: 18px; height: 18px; }
	.pdd-ts-stars { margin-bottom: 16px; }
	.pdd-ts-star { width: 18px; height: 18px; }
}
