/* ==========================================================================
   Awesome Testimonials Widget (Global Token Edition v2.5.0)
   ========================================================================== */

@property --awea-ts-angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.awea-ts-grid {
	--awea-ts-primary: var(--e-global-color-primary);
	--awea-ts-secondary: var(--e-global-color-secondary);
	--awea-ts-text: var(--e-global-color-text);
	--awea-ts-accent: var(--e-global-color-accent);
	--awea-ts-border: color-mix(in srgb, currentColor 12%, transparent);

	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
	width: 100%;
	box-sizing: border-box;
	align-items: stretch;
}

.awea-ts-grid *,
.awea-ts-grid *::before,
.awea-ts-grid *::after {
	box-sizing: border-box;
}

.awea-ts-card {
	--awea-ts-active-accent: var(--awea-ts-item-accent, var(--awea-ts-accent));
	--awea-ts-beam: var(--awea-ts-active-accent);

	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
	padding: 32px 30px;
	border-radius: 16px;
	background-color: color-mix(in srgb, currentColor 3%, transparent);
	border: 1px solid var(--awea-ts-border);
	overflow: hidden;
	box-sizing: border-box;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.3s ease,
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.awea-ts-card.awea-ts-featured {
	border-color: var(--awea-ts-active-accent);
	box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--awea-ts-active-accent) 22%, transparent);
}

.awea-ts-card:hover {
	border-color: var(--awea-ts-active-accent);
	box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--awea-ts-primary) 12%, transparent);
}

.awea-ts-motion-lift .awea-ts-card:hover {
	transform: translateY(-5px);
}

.awea-ts-motion-scale .awea-ts-card:hover {
	transform: scale(1.02);
}

/* Kinetic Border Glow */
.awea-ts-beam-yes .awea-ts-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1.5px;
	background: conic-gradient(from var(--awea-ts-angle), transparent 70%, var(--awea-ts-beam), transparent);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

@keyframes aweaTsSpin {
	to {
		--awea-ts-angle: 360deg;
	}
}

.awea-ts-beam-yes .awea-ts-card:hover::after {
	opacity: 1;
	animation: aweaTsSpin 3.5s linear infinite;
}

/* Quote Watermark */
.awea-ts-quote-mark {
	position: absolute;
	top: 24px;
	inset-inline-end: 24px;
	width: 40px;
	height: 40px;
	opacity: 0.1;
	color: var(--awea-ts-active-accent);
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.awea-ts-card:hover .awea-ts-quote-mark {
	opacity: 0.18;
}

/* Rating Stars */
.awea-ts-stars {
	display: flex;
	align-items: center;
	gap: 5px;
	position: relative;
	z-index: 2;
	margin-bottom: 16px;
}

.awea-ts-stars i {
	font-size: 14px;
	line-height: 1;
}

.awea-star-on {
	color: #f59e0b;
}

.awea-star-off {
	color: color-mix(in srgb, currentColor 20%, transparent);
}

/* Review Headline & Speech */
.awea-ts-headline {
	margin: 0 0 8px 0;
	position: relative;
	z-index: 2;
	color: var(--awea-ts-primary);
	word-break: break-word;
}

.awea-ts-text {
	margin: 0 0 24px 0;
	position: relative;
	z-index: 2;
	color: var(--awea-ts-text);
	font-style: italic;
	word-break: break-word;
}

/* Customer Footer (Bottom-Anchored Across Equal-Height Cards) */
.awea-ts-footer {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 18px;
	border-top: 1px solid color-mix(in srgb, currentColor 8%, transparent);
	position: relative;
	z-index: 2;
}

.awea-ts-avatar {
	width: 48px;
	height: 48px;
	border-radius: 100%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--awea-ts-border);
}

.awea-ts-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.awea-ts-name {
	margin: 0;
	color: var(--awea-ts-primary);
	word-break: break-word;
}

.awea-ts-role {
	font-style: normal;
	color: var(--awea-ts-secondary);
	display: block;
	word-break: break-word;
}

/* Verified Badge */
.awea-ts-verify {
	margin-inline-start: auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: color-mix(in srgb, var(--awea-ts-active-accent) 14%, transparent);
	color: var(--awea-ts-active-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.awea-ts-verify svg {
	width: 12px;
	height: 12px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.awea-ts-beam-yes .awea-ts-card:hover::after {
		animation: none !important;
	}

	.awea-ts-card,
	.awea-ts-quote-mark {
		transition: none !important;
		transform: none !important;
	}
}

/* Mobile (<= 767px) */
@media (max-width: 767px) {
	.awea-ts-card {
		padding: 24px 20px;
		border-radius: 14px;
	}

	.awea-ts-quote-mark {
		top: 18px;
		inset-inline-end: 18px;
		width: 32px;
		height: 32px;
	}

	.awea-ts-footer {
		gap: 12px;
	}
}