/* Move360 Google Reviews — [m360_reviews]
 *
 * Desktop:  [G 4.9 ★★★★★ 31 reviews ............ Review us on Google  ‹  ›]
 *           [card] [card] [card]
 *                        • — •
 * Mobile:   [G 4.9 ★★★★★ 31 reviews]
 *           [card]
 *           ‹      • — • •      ›
 *           [Review us on Google]
 */

.m360r {
	--m360r-per: var(--m360r-count, 3);
	--m360r-gap: 16px;
	--m360r-card-bg: #fff;
	--m360r-card-fg: #000;
	--m360r-card-border: rgba(0, 0, 0, 0.07);
	--m360r-muted: rgba(0, 0, 0, 0.55);
	--m360r-star: #f5b301;
	--m360r-star-empty: rgba(0, 0, 0, 0.15);
	--m360r-btn-bg: #000;
	--m360r-btn-fg: #fff;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto auto;
	grid-template-areas:
		"sum cta prev next"
		"vp  vp  vp   vp"
		"dot dot dot  dot";
	align-items: center;
	column-gap: 10px;
	width: 100%;
	box-sizing: border-box;
	font-family: var(--m360-font-body, inherit);
	position: relative;
}
@media (max-width: 1023px) { .m360r { --m360r-per: var(--m360r-tablet, 2); } }

/* Placed straight into a page rather than inside a section block: give it the
   same breathing room the theme's sections have, so it doesn't run edge to
   edge or butt up against the section above / the footer. */
.entry-content > .m360r,
.wp-block-post-content > .m360r,
.entry-content > p > .m360r {
	padding: var(--m360-pad-y, clamp(3rem, 7vw, 6rem)) var(--m360-pad-x, 4vw);
}

/* Dark sections (black/navy): theme="dark", or detected by JS for theme="auto". */
.m360r--dark {
	--m360r-card-bg: rgba(255, 255, 255, 0.07);
	--m360r-card-fg: #fff;
	--m360r-card-border: rgba(255, 255, 255, 0.14);
	--m360r-muted: rgba(255, 255, 255, 0.65);
	--m360r-star-empty: rgba(255, 255, 255, 0.22);
	--m360r-btn-bg: #fff;
	--m360r-btn-fg: #000;
}

/* ---- Rating bar ---- */
.m360r__summary {
	grid-area: sum;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-bottom: 20px;
	min-width: 0;
}
.m360r__summary-logo { width: 24px; height: 24px; flex: none; }
.m360r__score {
	font-family: var(--m360-font-heading, inherit);
	font-size: 1.5rem;
	line-height: 1;
}
.m360r__summary .m360r__stars { font-size: 1.1rem; }
.m360r__total { font-size: 0.95rem; font-weight: 600; opacity: 0.75; }
.m360r__cta {
	grid-area: cta;
	justify-self: end;
	margin: 0 6px 20px 0;
	padding: 0.7em 1.4em;
	border-radius: 300px;
	background: var(--m360r-btn-bg);
	color: var(--m360r-btn-fg) !important;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none !important;
	transition: opacity 0.15s;
}
.m360r__cta:hover { opacity: 0.8; }

/* ---- Arrows ---- */
.m360r__arrow {
	width: 42px;
	height: 42px;
	margin-bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 50%;
	border: 2px solid currentColor;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.m360r__arrow--prev { grid-area: prev; }
.m360r__arrow--next { grid-area: next; }
.m360r__arrow svg { width: 18px; height: 18px; }
.m360r__arrow:hover,
.m360r__arrow:focus-visible { background: var(--m360r-btn-bg); color: var(--m360r-btn-fg); border-color: var(--m360r-btn-bg); }

/* ---- Track ---- */
.m360r__viewport { grid-area: vp; overflow: hidden; min-width: 0; }
.m360r__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: var(--m360r-gap);
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}
/* Without JS the row simply scrolls sideways. */
.m360r:not(.is-ready) .m360r__viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
.m360r:not(.is-ready) .m360r__card { scroll-snap-align: start; }

.m360r__card {
	flex: 0 0 calc((100% - (var(--m360r-per) - 1) * var(--m360r-gap)) / var(--m360r-per));
	min-width: 0;
	box-sizing: border-box;
	margin: 0;
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--m360r-card-bg);
	color: var(--m360r-card-fg);
	border: 1px solid var(--m360r-card-border);
	border-radius: 14px;
	text-align: left;
}
.m360r__card-top { display: flex; align-items: center; justify-content: space-between; }
.m360r__card-logo { width: 18px; height: 18px; flex: none; }

.m360r__stars {
	position: relative;
	display: inline-block;
	font-size: 1rem;
	line-height: 1;
	letter-spacing: 1px;
	white-space: nowrap;
}
.m360r__stars-bg { color: var(--m360r-star-empty); }
.m360r__stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--m360r-star); }

.m360r__text { margin: 0; padding: 0; border: 0; font-style: normal; }
.m360r__text p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.m360r__card.is-expanded .m360r__text p { -webkit-line-clamp: unset; display: block; }
.m360r__more {
	align-self: flex-start;
	margin-top: -4px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Author pinned to the bottom so names line up across cards of unequal text. */
.m360r__author { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.m360r__avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}
.m360r__avatar--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--m360-navy, #253551);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
}
.m360r--dark .m360r__avatar--initial { background: #fff; color: #000; }
.m360r__name { display: block; font-size: 0.95rem; font-weight: 700; line-height: 1.25; color: inherit !important; text-decoration: none !important; }
a.m360r__name:hover { text-decoration: underline !important; }
.m360r__date { display: block; font-size: 0.8rem; color: var(--m360r-muted); }

/* ---- Dots ---- */
.m360r__dots {
	grid-area: dot;
	justify-self: center;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
}
.m360r__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	color: inherit; /* buttons don't inherit colour by default */
	background: currentColor;
	opacity: 0.25;
	cursor: pointer;
	transition: opacity 0.2s, width 0.2s;
}
.m360r__counter { font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; }
.m360r__dot[aria-current="true"] { opacity: 1; width: 22px; border-radius: 8px; }

/* Everything fits on one page → no arrows or dots. */
.m360r:not(.has-nav) .m360r__arrow,
.m360r:not(.has-nav) .m360r__dots { display: none; }

/* ---- Phones: arrows + dots under the card (thumb reach), button last ---- */
@media (max-width: 767px) {
	.m360r {
		--m360r-per: 1;
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"sum  sum sum"
			"vp   vp  vp"
			"prev dot next"
			"cta  cta cta";
	}
	.m360r__summary { margin-bottom: 16px; }
	.m360r__arrow { margin: 16px 0 0; }
	.m360r__dots { margin-top: 16px; }
	.m360r__cta { justify-self: center; margin: 20px 0 0; }
	.m360r__card { padding: 18px 20px; }
}

.m360r-missing { padding: 12px 16px; border: 2px dashed #b32d2e; color: #b32d2e; }

@media (prefers-reduced-motion: reduce) {
	.m360r__track, .m360r__dot { transition: none; }
}
