/* Smile on the Square - reviews.
   Values mirror the previous Trustindex widget so the section is visually unchanged. */

.sots-reviews {
	--sots-star: #f6bb06;
	--sots-card-bg: #f4f4f4;
	--sots-card-border: #f4f4f4;
	--sots-name: #000;
	--sots-muted: #767676;
	--sots-gap: 20px;
	font-size: 15px;
	line-height: 1.45;
}

.sots-reviews *,
.sots-reviews *::before,
.sots-reviews *::after {
	box-sizing: border-box;
}

/* ---------- summary bar ---------- */

.sots-summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-bottom: 18px;
	text-align: center;
	color: var(--sots-name);
}

.sots-summary-score {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
}

.sots-summary .sots-stars {
	margin: 2px 0 3px;
}

.sots-summary .sots-star {
	width: 22px;
	height: 21px;
}

.sots-summary-count {
	font-size: 15px;
}

.sots-summary-logo {
	display: inline-flex;
	margin-top: 6px;
}

.sots-summary-logo .sots-google-logo {
	width: 92px;
	height: 30px;
}

/* ---------- stars ---------- */

.sots-stars {
	display: block;
	line-height: 0;
	white-space: nowrap;
}

.sots-star {
	width: 16px;
	height: 15px;
	display: inline-block;
	margin-right: 2px;
	fill: #dadada;
}

.sots-star--on {
	fill: var(--sots-star);
}

/* ---------- slider ---------- */

.sots-viewport {
	position: relative;
	padding: 0 34px;
}

.sots-track {
	display: flex;
	gap: var(--sots-gap);
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.sots-track::-webkit-scrollbar {
	display: none;
}

.sots-track:focus-visible {
	outline: 2px solid var(--sots-star);
	outline-offset: 4px;
}

.sots-card {
	flex: 0 0 calc((100% - (var(--sots-gap) * 2)) / 3);
	max-width: calc((100% - (var(--sots-gap) * 2)) / 3);
	scroll-snap-align: start;
}

.sots-reviews[data-columns="1"] .sots-card {
	flex-basis: 100%;
	max-width: 100%;
}

.sots-reviews[data-columns="2"] .sots-card {
	flex-basis: calc((100% - var(--sots-gap)) / 2);
	max-width: calc((100% - var(--sots-gap)) / 2);
}

.sots-reviews[data-columns="4"] .sots-card {
	flex-basis: calc((100% - (var(--sots-gap) * 3)) / 4);
	max-width: calc((100% - (var(--sots-gap) * 3)) / 4);
}

.sots-card-inner {
	background: var(--sots-card-bg);
	border: 1px solid var(--sots-card-border);
	border-radius: 12px;
	padding: 20px;
	height: 100%;
	text-align: left;
}

/* ---------- card content ---------- */

.sots-card-head {
	display: flex;
	align-items: flex-start;
	position: relative;
}

.sots-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-right: 15px;
	object-fit: cover;
	object-position: top;
	flex: 0 0 40px;
}

.sots-avatar--letter {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--sots-muted);
	font-weight: 600;
	font-size: 17px;
	text-transform: uppercase;
}

.sots-meta {
	min-width: 0;
	flex: 1 1 auto;
	padding-right: 26px;
}

.sots-name {
	font-weight: 600;
	font-size: 15px;
	color: var(--sots-name);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sots-date {
	display: block;
	color: var(--sots-muted);
	font-size: 13px;
}

.sots-source {
	position: absolute;
	top: 0;
	right: 0;
	line-height: 0;
}

.sots-source .sots-google-mark {
	width: 20px;
	height: 20px;
	display: block;
}

.sots-card .sots-stars {
	margin: 11px 0;
}

.sots-text {
	font-size: 15px;
	line-height: 21.75px;
	color: #000;
	word-break: break-word;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

.sots-text p {
	margin: 0 0 8px;
}

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

.sots-text--expanded {
	display: block;
	-webkit-line-clamp: unset;
}

.sots-text--empty {
	color: var(--sots-muted);
	font-style: italic;
	display: block;
}

/* Must beat the class rule below, which would otherwise override [hidden]. */
.sots-more[hidden] {
	display: none;
}

.sots-more {
	display: block;
	margin-top: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sots-muted);
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
}

.sots-more:hover,
.sots-more:focus-visible {
	color: #000;
}

/* ---------- owner reply ---------- */

.sots-reply {
	margin-top: 14px;
	padding: 12px 14px;
	background: #fff;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.sots-reply-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 4px;
	color: var(--sots-muted);
}

.sots-reply p {
	margin: 0 0 6px;
}

.sots-reply p:last-child {
	margin-bottom: 0;
}

/* ---------- nav ---------- */

.sots-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
	cursor: pointer;
	z-index: 2;
}

.sots-nav::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #555;
	border-bottom: 2px solid #555;
}

.sots-nav--prev {
	left: 0;
}

.sots-nav--prev::before {
	transform: translate(-30%, -50%) rotate(135deg);
}

.sots-nav--next {
	right: 0;
}

.sots-nav--next::before {
	transform: translate(-70%, -50%) rotate(-45deg);
}

.sots-nav:disabled {
	opacity: .35;
	cursor: default;
}

.sots-nav:focus-visible {
	outline: 2px solid var(--sots-star);
	outline-offset: 2px;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.sots-reviews .sots-card,
	.sots-reviews[data-columns="4"] .sots-card {
		flex-basis: calc((100% - var(--sots-gap)) / 2);
		max-width: calc((100% - var(--sots-gap)) / 2);
	}
}

@media (max-width: 680px) {
	.sots-viewport {
		padding: 0;
	}

	.sots-reviews .sots-card,
	.sots-reviews[data-columns="2"] .sots-card,
	.sots-reviews[data-columns="4"] .sots-card {
		flex-basis: 85%;
		max-width: 85%;
	}

	.sots-nav {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sots-track {
		scroll-behavior: auto;
	}
}
