/**
 * Pworld Testimonial Slider — frontend styles
 * Brand tokens are exposed as CSS variables so the admin color pickers
 * (see PWTS_Shortcode::enqueue_assets) can override them per-site.
 */

.pwts-wrapper {
	--pwts-primary: #008bc9;
	--pwts-primary-dark: #006d9e;
	--pwts-accent: #feeb41;
	--pwts-star: #feeb41;
	--pwts-quote-color: #182634;
	--pwts-quote-size: 19px;
	--pwts-name-color: #182634;
	--pwts-name-size: 15px;
	--pwts-role-color: #5b6b78;
	--pwts-role-size: 13px;
	--pwts-ink: #182634;
	--pwts-ink-soft: #5b6b78;
	--pwts-panel: #eef3f6;
	--pwts-white: #ffffff;
	--pwts-radius: 18px;

	box-sizing: border-box;
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pwts-wrapper *,
.pwts-wrapper *::before,
.pwts-wrapper *::after {
	box-sizing: border-box;
}

.pwts-heading {
	text-align: center;
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 800;
	letter-spacing: 0.01em;
	color: var(--pwts-ink);
	margin: 0 0 32px;
	text-transform: uppercase;
}

.pwts-heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 14px auto 0;
	background: var(--pwts-accent);
	border-radius: 4px;
}

/* ---------- Slider shell ---------- */

.pwts-slider {
	position: relative;
	background: var(--pwts-panel);
	border-radius: var(--pwts-radius);
	padding: 16px;
}

.pwts-slider-frame {
	overflow: hidden;
	border-radius: calc(var(--pwts-radius) - 4px);
}

.pwts-slides {
	position: relative;
	display: flex;
	width: 100%;
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pwts-slider[data-transition="fade"] .pwts-slides {
	transition: none;
}

/* ---------- Individual slide ---------- */

.pwts-slide {
	flex: 0 0 100%;
	width: 100%;
	display: grid;
	grid-template-columns: minmax(220px, 360px) 1fr;
	align-items: stretch;
	gap: 0;
	background: var(--pwts-white);
	border-radius: calc(var(--pwts-radius) - 4px);
	height: 440px;
}

.pwts-slider[data-transition="fade"] .pwts-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.pwts-slider[data-transition="fade"] .pwts-slide.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.pwts-slide-media {
	position: relative;
	overflow: hidden;
	background: var(--pwts-ink);
	border-radius: calc(var(--pwts-radius) - 4px) 0 0 calc(var(--pwts-radius) - 4px);
}

.pwts-photo,
.pwts-photo-placeholder {
	width: 100% !important;
	height: 100% !important;
	min-height: 280px;
	object-fit: cover !important;
	display: block !important;
	max-width: none !important;
}

.pwts-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.5);
	background: linear-gradient(160deg, var(--pwts-primary) 0%, var(--pwts-ink) 100%);
}

.pwts-slide-content {
	position: relative;
	padding: 36px 44px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow-y: auto;
	height: 100%;
}

.pwts-slide-content::-webkit-scrollbar {
	width: 6px;
}
.pwts-slide-content::-webkit-scrollbar-thumb {
	background: rgba(24, 38, 52, 0.15);
	border-radius: 3px;
}

.pwts-rating {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-bottom: 10px;
}

.pwts-star {
	color: rgba(24, 38, 52, 0.18);
	fill: rgba(24, 38, 52, 0.18);
}

.pwts-star.is-filled {
	color: var(--pwts-star);
	fill: var(--pwts-star);
}

.pwts-quote-mark {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 64px;
	line-height: 1;
	color: var(--pwts-accent);
	-webkit-text-stroke: 1px rgba(0, 0, 0, 0.04);
	margin-bottom: 4px;
}

.pwts-quote-text {
	font-size: var(--pwts-quote-size);
	line-height: 1.55;
	color: var(--pwts-quote-color);
	font-weight: 400;
}

.pwts-quote-text p {
	margin: 0 0 12px;
}

.pwts-quote-text p:last-child {
	margin-bottom: 0;
}

.pwts-author {
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pwts-author-name {
	font-weight: 700;
	color: var(--pwts-name-color);
	font-size: var(--pwts-name-size);
}

.pwts-author-role {
	font-size: var(--pwts-role-size);
	color: var(--pwts-role-color);
}

.pwts-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
	padding: 14px 26px;
	background: var(--pwts-primary);
	color: var(--pwts-white);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 8px;
	border: 2px solid var(--pwts-primary);
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
	align-self: flex-start;
}

.pwts-button:hover,
.pwts-button:focus-visible {
	background: var(--pwts-white);
	color: var(--pwts-primary-dark);
	transform: translateY(-1px);
}

/* ---------- Controls ---------- */

.pwts-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 18px;
}

.pwts-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(24, 38, 52, 0.15);
	background: var(--pwts-white);
	color: var(--pwts-ink);
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pwts-arrow:hover,
.pwts-arrow:focus-visible {
	background: var(--pwts-primary);
	border-color: var(--pwts-primary);
	color: var(--pwts-white);
}

.pwts-dots {
	display: flex;
	align-items: center;
	gap: 9px;
}

.pwts-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(24, 38, 52, 0.2);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.pwts-dot:hover {
	background: var(--pwts-accent);
}

.pwts-dot.is-active {
	background: var(--pwts-primary);
	transform: scale(1.25);
}

/* ---------- Empty state (admin-only notice) ---------- */

.pwts-empty-notice {
	max-width: 1100px;
	margin: 24px auto;
	padding: 14px 18px;
	background: #fff8e1;
	border-left: 4px solid #feeb41;
	color: #5b4b00;
	font-size: 14px;
}

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

@media (max-width: 760px) {
	.pwts-wrapper {
		padding: 32px 14px;
	}

	.pwts-slide {
		grid-template-columns: 1fr;
		height: auto;
	}

	.pwts-slide-content {
		height: auto;
		overflow-y: visible;
	}

	.pwts-slide-media {
		border-radius: calc(var(--pwts-radius) - 4px) calc(var(--pwts-radius) - 4px) 0 0;
	}

	.pwts-photo,
	.pwts-photo-placeholder {
		aspect-ratio: 16 / 9 !important;
		min-height: 0 !important;
	}

	.pwts-slide-content {
		padding: 30px 24px 28px;
	}

	.pwts-quote-text {
		font-size: calc(var(--pwts-quote-size) - 2px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pwts-slides,
	.pwts-slide,
	.pwts-button,
	.pwts-arrow,
	.pwts-dot {
		transition: none !important;
	}
}
