/* ==========================================================================
   PHHP Trustpilot Reviews — front-end styles
   Scoped under .phhp-tp so nothing leaks into the Divi theme.
   ========================================================================== */

.phhp-tp {
	--tp-green: #00b67a;
	--tp-green-dark: #019267;
	--tp-star-empty: #dcdce6;
	--tp-ink: #0f172a;
	--tp-body: #48566a;
	--tp-muted: #7a879c;
	--tp-card-bg: #ffffff;
	--tp-border: #e7ecf3;
	--tp-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
	--tp-shadow-hover: 0 14px 30px -12px rgba(16, 24, 40, .22), 0 4px 10px -6px rgba(16, 24, 40, .12);
	--tp-radius: 16px;
	--tp-gap: 22px;
	--tp-cols: 3;

	box-sizing: border-box;
	width: 100%;
	/* No max-width / centering here — let the Divi section or row control the width. */
	color: var(--tp-body);
	font-family: inherit;     /* inherit Divi's typeface */
	-webkit-font-smoothing: antialiased;
}

/* --- Divi width integration ---------------------------------------------
   The rest of this site uses the 80%-of-viewport content width, but a default
   Divi row caps at max-width:1080px. When the shortcode sits inside a Divi row,
   lift that cap so the reviews span the same 80% as everything else. Divi rows
   are already width:80%; only the 1080px ceiling needs removing.
   ------------------------------------------------------------------------ */
.et_pb_row:has(.phhp-tp) {
	max-width: 100% !important;
}

.phhp-tp *,
.phhp-tp *::before,
.phhp-tp *::after {
	box-sizing: border-box;
}

/* ---------- Header / aggregate rating ---------- */

.phhp-tp__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px 32px;
	margin-bottom: 28px;
}

.phhp-tp__eyebrow {
	margin: 0 0 10px;
	font-size: 1.55rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--tp-ink);
	letter-spacing: -.01em;
}

.phhp-tp__scorebar {
	display: flex;
	align-items: center;
	gap: 12px;
}

.phhp-tp__scoreword {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--tp-ink);
	letter-spacing: -.01em;
}

.phhp-tp__summary {
	margin: 12px 0 0;
	font-size: .95rem;
	color: var(--tp-body);
}

.phhp-tp__summary strong { color: var(--tp-ink); }

.phhp-tp__header-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.phhp-tp__cta {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 999px;
	background: var(--tp-green);
	color: #fff !important;
	font-weight: 700;
	font-size: .92rem;
	text-decoration: none !important;
	box-shadow: none;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.phhp-tp__cta:hover {
	background: var(--tp-green-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 18px -8px rgba(0, 182, 122, .7);
	color: #fff !important;
}

/* ---------- Trustpilot logo ---------- */

.phhp-tp-logo {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-weight: 800;
	font-size: 1.15rem;
	color: var(--tp-ink);
	letter-spacing: -.02em;
}

.phhp-tp-logo__star {
	width: 24px;
	height: 24px;
	fill: var(--tp-green);
}

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

.phhp-tp-stars {
	display: inline-flex;
	gap: 3px;
	line-height: 0;
}

.phhp-tp-star {
	display: inline-flex;
	width: 22px;
	height: 22px;
	background: var(--tp-star-empty);
	border-radius: 4px;
	padding: 3px;
}

.phhp-tp-star svg {
	width: 100%;
	height: 100%;
	fill: #fff;
}

.phhp-tp-star.is-on { background: var(--tp-green); }

/* Partial (aggregate) stars: green overlay clipped by width */
.phhp-tp-stars--partial {
	position: relative;
	display: inline-block;
	height: 22px;
}

.phhp-tp-stars--partial .phhp-tp-stars__bg,
.phhp-tp-stars--partial .phhp-tp-stars__fill {
	display: inline-flex;
	gap: 3px;
	position: absolute;
	top: 0;
	left: 0;
}

.phhp-tp-stars--partial .phhp-tp-stars__bg { position: static; }
.phhp-tp-stars--partial .phhp-tp-stars__bg .phhp-tp-star { background: var(--tp-star-empty); }
.phhp-tp-stars--partial .phhp-tp-stars__fill {
	overflow: hidden;
	white-space: nowrap;
}
.phhp-tp-stars--partial .phhp-tp-stars__fill .phhp-tp-star { background: var(--tp-green); }

/* ---------- Layout: grid ---------- */

.phhp-tp--grid .phhp-tp__track {
	display: grid;
	grid-template-columns: repeat(var(--tp-cols), minmax(0, 1fr));
	gap: var(--tp-gap);
	align-items: stretch;   /* every card in a row shares the tallest card's height */
}

/* ---------- Layout: carousel ---------- */

.phhp-tp--carousel { position: relative; }

.phhp-tp--carousel .phhp-tp__track {
	display: flex;
	gap: var(--tp-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 6px 2px 18px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.phhp-tp--carousel .phhp-tp__track::-webkit-scrollbar { height: 8px; }
.phhp-tp--carousel .phhp-tp__track::-webkit-scrollbar-thumb {
	background: var(--tp-border);
	border-radius: 999px;
}

.phhp-tp--carousel .phhp-tp-card {
	flex: 0 0 clamp(260px, 33%, 360px);
	scroll-snap-align: start;
}

.phhp-tp__nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 4px;
}

.phhp-tp__arrow {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--tp-border);
	background: var(--tp-card-bg);
	color: var(--tp-ink);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.phhp-tp__arrow:hover {
	background: var(--tp-green);
	border-color: var(--tp-green);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--tp-shadow);
}

.phhp-tp__arrow[disabled] {
	opacity: .4;
	cursor: default;
	transform: none;
	background: var(--tp-card-bg);
	border-color: var(--tp-border);
	color: var(--tp-ink);
	box-shadow: none;
}

/* ---------- Card ---------- */

.phhp-tp-card {
	display: flex;
	flex-direction: column;
	background: var(--tp-card-bg);
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius);
	padding: 22px 22px 18px;
	box-shadow: var(--tp-shadow);
	transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s ease, border-color .22s ease;
	animation: phhp-tp-in .45s cubic-bezier(.2, .7, .3, 1) both;
}

.phhp-tp-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--tp-shadow-hover);
	border-color: #dbe3ee;
}

.phhp-tp-card.is-hidden { display: none; }

@keyframes phhp-tp-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.phhp-tp-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.phhp-tp-verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: .72rem;
	font-weight: 700;
	color: var(--tp-green-dark);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.phhp-tp-verified svg {
	width: 15px;
	height: 15px;
	fill: var(--tp-green);
}

.phhp-tp-card__date {
	font-size: .8rem;
	color: var(--tp-muted);
	margin-bottom: 10px;
}

.phhp-tp-card__title {
	margin: 0 0 8px;
	font-family: inherit;   /* use Divi's typeface, not the theme's heading override */
	font-size: 1.06rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--tp-ink);
	letter-spacing: -.01em;
}

.phhp-tp-card__body { position: relative; }

.phhp-tp-card__text {
	margin: 0;
	font-size: .945rem;
	line-height: 1.62;
	color: var(--tp-body);
	white-space: normal;
	overflow-wrap: anywhere;
}

.phhp-tp-card__body.is-clamped .phhp-tp-card__text {
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.phhp-tp-card__more {
	align-self: flex-start;
	margin-top: 8px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--tp-green-dark);
	font-weight: 700;
	font-size: .875rem;
	cursor: pointer;
	font-family: inherit;
}

.phhp-tp-card__more:hover { text-decoration: underline; }

/* ---------- Reply ---------- */

.phhp-tp-reply {
	margin-top: 14px;
	border-left: 3px solid var(--tp-border);
	padding-left: 14px;
}

.phhp-tp-reply__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--tp-ink);
	font-weight: 700;
	font-size: .82rem;
	font-family: inherit;
}

.phhp-tp-reply__chev {
	transition: transform .2s ease;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--tp-muted);
}

.phhp-tp-reply__toggle[aria-expanded="true"] .phhp-tp-reply__chev { transform: rotate(90deg); }

.phhp-tp-reply__body {
	margin-top: 8px;
	font-size: .88rem;
	line-height: 1.6;
	color: var(--tp-body);
}

.phhp-tp-reply__body p { margin: 0; }

.phhp-tp-reply__date {
	font-size: .74rem;
	color: var(--tp-muted);
	margin-bottom: 4px;
}

/* ---------- Card footer ---------- */

.phhp-tp-card__foot {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-top: auto;   /* push footer to the bottom so equal-height cards align */
	padding-top: 16px;
	border-top: 1px solid var(--tp-border);
}

.phhp-tp-avatar {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
}

.phhp-tp-card__who {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.phhp-tp-card__name {
	font-weight: 700;
	color: var(--tp-ink);
	font-size: .92rem;
	line-height: 1.3;
}

.phhp-tp-card__sub {
	font-size: .78rem;
	color: var(--tp-muted);
	line-height: 1.3;
}

/* ---------- Load more ---------- */

.phhp-tp__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.phhp-tp__loadmore {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 30px;
	border-radius: 999px;
	border: 1px solid var(--tp-border);
	background: var(--tp-card-bg);
	color: var(--tp-ink);
	font-weight: 700;
	font-size: .95rem;
	cursor: pointer;
	font-family: inherit;
	transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.phhp-tp__loadmore:hover {
	background: var(--tp-green);
	border-color: var(--tp-green);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 10px 22px -10px rgba(0, 182, 122, .6);
}

.phhp-tp__count { opacity: .7; font-weight: 600; }

.phhp-tp__foot-link {
	text-align: center;
	margin: 20px 0 0;
	font-size: .9rem;
}

.phhp-tp__foot-link a {
	color: var(--tp-green-dark);
	font-weight: 700;
	text-decoration: none;
}

.phhp-tp__foot-link a:hover { text-decoration: underline; }

/* ---------- Dark theme ---------- */

.phhp-tp--dark {
	--tp-ink: #f1f5f9;
	--tp-body: #c2ccd8;
	--tp-muted: #8b98a9;
	--tp-card-bg: #161c26;
	--tp-border: #29323f;
	--tp-star-empty: #39424f;
	--tp-shadow: 0 1px 2px rgba(0, 0, 0, .4);
	--tp-shadow-hover: 0 18px 36px -14px rgba(0, 0, 0, .7);
}

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

@media (max-width: 1024px) {
	.phhp-tp--grid .phhp-tp__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
	.phhp-tp--grid .phhp-tp__track { grid-template-columns: 1fr; }

	.phhp-tp__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		margin-bottom: 22px;
	}
	.phhp-tp__header-side {
		align-items: stretch;
		width: 100%;
	}
	.phhp-tp__cta {
		width: 100%;
		text-align: center;
	}
	.phhp-tp__eyebrow { font-size: 1.35rem; }

	/* Slightly tighter cards free up text width on narrow screens. */
	.phhp-tp-card { padding: 20px 18px 16px; }

	/* Thumb-friendly (~44px) tap targets for the inline controls.
	   Negative margins expand the hit area without adding visible space. */
	.phhp-tp-card__more {
		padding: 11px 8px;
		margin: 2px -8px 0;
	}
	.phhp-tp-reply__toggle {
		min-height: 44px;
		padding: 10px 8px;
		margin: 4px -8px 0;
	}
}

/* Bigger tap targets on any touch device, not just narrow viewports. */
@media (hover: none) and (pointer: coarse) {
	.phhp-tp-card__more { padding: 10px 6px; margin: 2px -6px 0; }
	.phhp-tp-reply__toggle { min-height: 44px; padding: 9px 6px; margin: 3px -6px 0; }
}

@media (prefers-reduced-motion: reduce) {
	.phhp-tp-card { animation: none; }
	.phhp-tp-card:hover { transform: none; }
	.phhp-tp--carousel .phhp-tp__track { scroll-behavior: auto; }
}
