/**
 * PXS Trustpilot Elementor widget — card chrome + :where() defaults for Elementor overrides.
 */

.pxs-trustpilot-widget {
	position: relative;
	box-sizing: border-box;
}

.pxs-trustpilot-widget__section-heading {
	margin: 0;
}

.pxs-trustpilot-widget__card-outer {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	justify-content: flex-start;
}

/* ---- CSS variables (Style → Trustpilot card colors) ---- */
.pxs-trustpilot-widget .trustpilot-card {
	--pxs-tp-text: #ffffff;
	--pxs-tp-accent: #00e676;
	--pxs-tp-muted: #b9ffd8;
	--pxs-tp-title: #eafff5;
	--pxs-tp-rim: #00ff96;
	--pxs-tp-bg-a: #0f2a1f;
	--pxs-tp-bg-b: #0d0d0d;
	--pxs-tp-btn-a: #00c853;
	--pxs-tp-btn-b: #00e676;
	--pxs-tp-btn-text: #003d1f;
	--pxs-tp-star-glow: 70%;
	/* Optional override for stars text-shadow color (Elementor → Stars glow). */
	--pxs-tp-stars-glow-base: var(--pxs-tp-accent);

	position: relative;
	border-radius: 14px;
	padding: 24px;
	overflow: hidden;
	color: var(--pxs-tp-text);
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;

	background-image:
		radial-gradient(
			circle at 20% 30%,
			color-mix(in srgb, var(--pxs-tp-accent) 12%, transparent) 1px,
			transparent 1px
		),
		radial-gradient(
			circle at 70% 60%,
			color-mix(in srgb, var(--pxs-tp-accent) 8%, transparent) 1px,
			transparent 1px
		),
		radial-gradient(
			circle at 40% 80%,
			color-mix(in srgb, var(--pxs-tp-accent) 8%, transparent) 1px,
			transparent 1px
		),
		radial-gradient(circle at 30% 20%, var(--pxs-tp-bg-a), var(--pxs-tp-bg-b));

	background-size:
		120px 120px,
		180px 180px,
		160px 160px,
		cover;

	border-style: solid;
	border-width: 3px;
	border-color: color-mix(in srgb, var(--pxs-tp-rim) 35%, transparent);
	box-shadow:
		0 0 0 1px color-mix(in srgb, var(--pxs-tp-rim) 15%, transparent),
		0 10px 30px rgba(0, 0, 0, 0.7),
		inset 0 0 25px color-mix(in srgb, var(--pxs-tp-accent) 8%, transparent);
}

.pxs-trustpilot-widget .trustpilot-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
	pointer-events: none;
	z-index: 0;
	box-shadow: 0 0 25px color-mix(in srgb, var(--pxs-tp-accent) 25%, transparent);
}

.pxs-trustpilot-widget .trustpilot-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
	pointer-events: none;
	z-index: 1;
	background: linear-gradient(
		120deg,
		transparent 30%,
		color-mix(in srgb, var(--pxs-tp-text) 6%, transparent),
		transparent 70%
	);
	transform: translateX(-100%);
	animation: pxs-tp-shine 4s infinite;
}

.pxs-trustpilot-widget .trustpilot-card.trustpilot-card--no-bg-animation::after {
	animation: none;
	opacity: 0;
}

@keyframes pxs-tp-shine {
	to {
		transform: translateX(100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pxs-trustpilot-widget .trustpilot-card::after {
		animation: none;
	}
}

.pxs-trustpilot-widget .trustpilot-content {
	position: relative;
	z-index: 2;
	text-align: center;
}

.pxs-trustpilot-widget .trustpilot-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 10px;
}

:where(.pxs-trustpilot-widget .tp-star) {
	color: var(--pxs-tp-accent);
	font-size: 20px;
	text-shadow: 0 0 10px color-mix(in srgb, var(--pxs-tp-accent) 80%, transparent);
}

:where(.pxs-trustpilot-widget .tp-title) {
	font-size: 20px;
	font-weight: 700;
	color: var(--pxs-tp-title);
}

:where(.pxs-trustpilot-widget .tp-rating-label) {
	text-align: center;
	font-size: 22px;
	margin: 6px 0;
	font-weight: 600;
	color: var(--pxs-tp-muted);
}

:where(.pxs-trustpilot-widget .tp-stars) {
	text-align: center;
	font-size: 22px;
	letter-spacing: 4px;
	color: var(--pxs-tp-accent);
	text-shadow: 0 0 12px
		color-mix(
			in srgb,
			var(--pxs-tp-stars-glow-base) var(--pxs-tp-star-glow),
			transparent
		);
}

.pxs-trustpilot-widget .tp-score {
	text-align: center;
	font-size: 14px;
	margin: 6px 0 0;
}

:where(.pxs-trustpilot-widget .tp-score) {
	opacity: 0.85;
	color: var(--pxs-tp-text);
}

:where(.pxs-trustpilot-widget .tp-score__suffix) {
	opacity: 0.6;
}

.pxs-trustpilot-widget .tp-button {
	margin: 16px auto 0;
	display: inline-block;
	padding: 10px 16px;
	border-radius: 8px;
	text-decoration: none;
	box-sizing: border-box;
	cursor: pointer;
	text-align: center;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease;
}

:where(.pxs-trustpilot-widget .tp-button) {
	border: none;
	font-weight: 700;
	background-image: linear-gradient(
		135deg,
		var(--pxs-tp-btn-a),
		var(--pxs-tp-btn-b)
	);
	color: var(--pxs-tp-btn-text);
	box-shadow:
		0 0 12px color-mix(in srgb, var(--pxs-tp-accent) 40%, transparent),
		inset 0 0 6px rgba(255, 255, 255, 0.2);
}

.pxs-trustpilot-widget .tp-button:hover {
	transform: translateY(-2px);
	box-shadow:
		0 0 18px color-mix(in srgb, var(--pxs-tp-accent) 70%, transparent),
		inset 0 0 8px rgba(255, 255, 255, 0.25);
}

@media (prefers-reduced-motion: reduce) {
	.pxs-trustpilot-widget .tp-button {
		transition: none;
	}

	.pxs-trustpilot-widget .tp-button:hover {
		transform: none;
	}
}
