/* TGP Reviews: site ink + brand accent (#4b3190), inherits the theme's fonts. */
.tgp-reviews,
.tgp-reviews-badge {
	--tgpr-ink: #23232c;
	--tgpr-accent: #4b3190;
	--tgpr-muted: #7c7c80;
	--tgpr-line: #e5e5e8;
	--tgpr-soft: #f4f4f5;
}
.tgp-reviews {
	--tgpr-gap: 30px;
	display: grid;
	grid-template-columns: minmax(220px, 1fr) 3fr;
	gap: 60px;
	align-items: start;
	color: var(--tgpr-ink);
}

/* Summary */
.tgp-reviews__summary { max-width: 420px; }
.tgp-reviews__score {
	font-size: 64px;
	font-weight: 500;
	line-height: 1;
	margin-bottom: 12px;
}
.tgp-reviews__stars {
	display: inline-block;
	width: 5.8em;
	height: 1em;
	vertical-align: middle;
	background: linear-gradient(90deg, var(--tgpr-accent) var(--tgpr-fill, 100%), var(--tgpr-line) var(--tgpr-fill, 100%));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28.8 24'%3E%3Cpath d='M12 2.5l2.94 6.24 6.81.82-5.02 4.7 1.3 6.74L12 17.66 5.97 21l1.3-6.74-5.02-4.7 6.81-.82z'/%3E%3C/svg%3E") 0 0 / 1.2em 1em repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28.8 24'%3E%3Cpath d='M12 2.5l2.94 6.24 6.81.82-5.02 4.7 1.3 6.74L12 17.66 5.97 21l1.3-6.74-5.02-4.7 6.81-.82z'/%3E%3C/svg%3E") 0 0 / 1.2em 1em repeat-x;
}
.tgp-reviews__stars--big { font-size: 22px; }
.tgp-reviews__stars--small { font-size: 14px; }
.tgp-reviews__count {
	margin: 12px 0 24px;
	color: var(--tgpr-muted);
}
.tgp-reviews__dist {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}
.tgp-reviews__dist li {
	display: grid;
	grid-template-columns: 12px 1fr 36px;
	gap: 12px;
	align-items: center;
	margin: 0 0 6px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--tgpr-muted);
}
.tgp-reviews__dist-bar {
	height: 4px;
	background: var(--tgpr-soft);
}
.tgp-reviews__dist-bar span {
	display: block;
	height: 100%;
	background: var(--tgpr-accent);
}
.tgp-reviews__dist-n { text-align: right; }
.tgp-reviews__links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}
.tgp-reviews__links .sober-button { margin: 0; }

/* Carousel */
.tgp-reviews__main { min-width: 0; }
.tgp-reviews__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	outline: none;
	cursor: grab;
}
.tgp-reviews__viewport.is-dragging {
	scroll-snap-type: none;
	scroll-behavior: auto;
	cursor: grabbing;
	user-select: none;
}
.tgp-reviews__viewport.is-dragging * { pointer-events: none; }
.tgp-review__text,
.tgp-review__author { -webkit-user-drag: none; }
.tgp-review__author img { -webkit-user-drag: none; }
.tgp-reviews__viewport::-webkit-scrollbar { display: none; }
.tgp-reviews__viewport:focus-visible { outline: 1px solid var(--tgpr-accent); outline-offset: 4px; }
.tgp-reviews__track {
	display: flex;
	gap: var(--tgpr-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
.tgp-reviews__slide {
	flex: 0 0 calc((100% - 2 * var(--tgpr-gap)) / 3);
	scroll-snap-align: start;
	margin: 0;
}
.tgp-review {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 28px;
	border: 1px solid var(--tgpr-line);
	box-sizing: border-box;
	transition: border-color .2s;
}
.tgp-review:hover { border-color: var(--tgpr-accent); }
.tgp-review--more {
	justify-content: center;
	align-items: flex-start;
	gap: 24px;
}
.tgp-review--more__text {
	margin: 0;
	font-size: 18px;
	line-height: 1.5;
}
.tgp-review .tgp-reviews__stars { margin-bottom: 16px; align-self: flex-start; }
.tgp-review__body { flex: 1 0 auto; }
.tgp-review__text {
	margin: 0;
	line-height: 1.6;
	overflow-wrap: anywhere;
}
.tgp-reviews--js .tgp-review__text {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tgp-reviews--js .tgp-review.is-open .tgp-review__text {
	display: block;
	overflow: visible;
}
.tgp-review__tr {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--tgpr-muted);
	overflow-wrap: anywhere;
}
.tgp-review__tr-label { font-style: italic; }
.tgp-reviews--js .tgp-review__tr {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tgp-reviews--js .tgp-review.is-open .tgp-review__tr {
	display: block;
	overflow: visible;
}
.tgp-review__actions { margin-top: 8px; }
.tgp-review__actions button {
	padding: 0;
	margin: 0 16px 0 0;
	border: 0;
	background: none;
	color: var(--tgpr-muted);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.tgp-reviews .tgp-review__actions button:hover,
.tgp-reviews .tgp-review__actions button:focus,
.tgp-reviews .tgp-review__actions button:active {
	background: none;
	color: var(--tgpr-accent);
	box-shadow: none;
}
.tgp-reviews button:focus { outline: none; }
.tgp-reviews button:focus-visible { outline: 1px solid var(--tgpr-accent); outline-offset: 2px; }
.tgp-review__actions button[hidden] { display: none; }
.tgp-review__author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--tgpr-line);
	font-size: 13px;
	line-height: 1.4;
}
.tgp-review__author img,
.tgp-review__initials {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
}
.tgp-review__author img { filter: grayscale(100%); }
.tgp-review__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tgpr-soft);
	font-weight: 500;
}
.tgp-review__name {
	display: block;
	font-weight: 500;
}
.tgp-review__author time { color: var(--tgpr-muted); }

.tgp-reviews__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 24px;
}
.tgp-reviews__note {
	margin: 0;
	font-size: 12px;
	color: var(--tgpr-muted);
}
.tgp-reviews__arrows { display: none; flex: 0 0 auto; gap: 8px; }
.tgp-reviews--js .tgp-reviews__arrows { display: flex; }
.tgp-reviews__arrow {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--tgpr-accent);
	border-radius: 0;
	background: #fff;
	color: var(--tgpr-accent);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.tgp-reviews .tgp-reviews__arrow:focus,
.tgp-reviews .tgp-reviews__arrow:active { background: #fff; color: var(--tgpr-accent); box-shadow: none; }
.tgp-reviews .tgp-reviews__arrow:hover:not(:disabled) { background: var(--tgpr-accent); color: #fff; }
.tgp-reviews .tgp-reviews__arrow:disabled { background: #fff; border-color: var(--tgpr-line); color: var(--tgpr-line); cursor: default; }

@media (max-width: 1199px) {
	.tgp-reviews__slide { flex-basis: calc((100% - var(--tgpr-gap)) / 2); }
}
@media (max-width: 991px) {
	.tgp-reviews { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767px) {
	.tgp-reviews { --tgpr-gap: 16px; }
	.tgp-reviews__slide { flex-basis: 85%; }
	.tgp-review { padding: 22px; }
	.tgp-reviews__score { font-size: 52px; }
}

/* Anchor target on the reviews page: clear the sticky header. */
#reviews { scroll-margin-top: 120px; }

/* Footer badge */
.tgp-reviews-badge {
	display: flex;
	width: fit-content;
	flex-direction: column;
	gap: 6px;
	color: var(--tgpr-ink);
	text-decoration: none;
	line-height: 1.3;
}
.tgp-reviews-badge__top {
	display: flex;
	align-items: center;
	gap: 10px;
}
.tgp-reviews__stars--badge { font-size: 18px; }
.tgp-reviews-badge__score {
	font-size: 18px;
	font-weight: 500;
}
.tgp-reviews-badge__count {
	font-size: 14px;
	color: var(--tgpr-muted);
	transition: color .2s;
}
.tgp-reviews-badge:hover .tgp-reviews-badge__count { color: var(--tgpr-accent); }
/* The social links block above it in the footer leaves a 72px margin; bring the badge to the column's 40px rhythm. */
.footer-widgets .wp-block-social-links + * .tgp-reviews-badge,
.footer-widgets .widget:has(.wp-block-social-links) + .widget .tgp-reviews-badge { margin-top: -32px; }
