/**
 * MMLocal Pulse — public review widgets.
 *
 * Every visual decision reads a CSS custom property so the Elementor style
 * controls (or any theme) can restyle without touching markup:
 *
 *   --mmlp-star         star color            (#fbbc04)
 *   --mmlp-text         body text             (#202124)
 *   --mmlp-muted        secondary text        (#5f6368)
 *   --mmlp-card-bg      card background       (#fff)
 *   --mmlp-card-border  card border color     (#dadce0)
 *   --mmlp-radius       card corner radius    (14px)
 *   --mmlp-accent       big average number    (inherits text)
 *   --mmlp-cols         grid columns          (3, set inline)
 *   --mmlp-show         carousel visible cards(3, set inline)
 */

.mmlp-reviews {
	margin: 1.5em 0;
	font-family: Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--mmlp-text, #202124);
}

/* ---- Header ----------------------------------------------------------- */

.mmlp-reviews-header {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.mmlp-reviews-avg {
	font-size: 2.2em;
	font-weight: 600;
	line-height: 1;
	color: var(--mmlp-accent, var(--mmlp-text, #202124));
}

.mmlp-reviews-stars {
	color: var(--mmlp-star, #fbbc04);
	font-size: 1.3em;
	letter-spacing: 2px;
}

.mmlp-reviews-count { color: var(--mmlp-muted, #5f6368); font-size: 0.95em; }

/* ---- Review cards ------------------------------------------------------ */

.mmlp-reviews-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mmlp-reviews-grid .mmlp-reviews-items {
	display: grid;
	grid-template-columns: repeat(var(--mmlp-cols, 3), 1fr);
	gap: 14px;
}

.mmlp-review {
	background: var(--mmlp-card-bg, #fff);
	border: 1px solid var(--mmlp-card-border, #dadce0);
	border-radius: var(--mmlp-radius, 14px);
	padding: 16px 18px;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.mmlp-review-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.mmlp-review-author { font-weight: 600; }

.mmlp-review-stars {
	color: var(--mmlp-star, #fbbc04);
	letter-spacing: 1px;
	white-space: nowrap;
}

.mmlp-review-text { margin: 8px 0 4px; line-height: 1.55; }

.mmlp-review-date { color: var(--mmlp-muted, #5f6368); font-size: 0.85em; }

@media (max-width: 760px) {
	.mmlp-reviews-grid .mmlp-reviews-items { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
	.mmlp-reviews-grid .mmlp-reviews-items { grid-template-columns: 1fr; }
}

/* ---- Carousel ----------------------------------------------------------- */

.mmlp-carousel {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 6px;
}

.mmlp-carousel-viewport {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	flex: 1;
	padding-bottom: 4px;
}

.mmlp-carousel-viewport::-webkit-scrollbar { display: none; }

.mmlp-reviews-carousel .mmlp-review {
	flex: 0 0 calc((100% - (var(--mmlp-show, 3) - 1) * 14px) / var(--mmlp-show, 3));
	scroll-snap-align: start;
	box-sizing: border-box;
}

.mmlp-car-btn {
	flex: 0 0 auto;
	align-self: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--mmlp-card-border, #dadce0);
	background: var(--mmlp-card-bg, #fff);
	color: var(--mmlp-text, #202124);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
	transition: background 0.15s ease;
}

.mmlp-car-btn:hover { background: #f1f3f4; }

@media (max-width: 640px) {
	.mmlp-reviews-carousel .mmlp-review { flex-basis: 100%; }
}

/* ---- Badge: ★ 4.6 (123 reviews) ----------------------------------------- */

.mmlp-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
	font-size: 1em;
}

.mmlp-badge-star { color: var(--mmlp-star, #fbbc04); }
.mmlp-badge-avg  { color: var(--mmlp-accent, var(--mmlp-text, #202124)); }
.mmlp-badge-count { color: var(--mmlp-muted, #5f6368); }

/* ---- Line: ★★★★★ 4.6 Google Reviews (123 reviews) ----------------------- */

.mmlp-line {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
	margin: 0;
}

.mmlp-line-stars { color: var(--mmlp-star, #fbbc04); letter-spacing: 1px; }
.mmlp-line-avg   { color: var(--mmlp-accent, var(--mmlp-text, #202124)); }
.mmlp-line-label { font-weight: 500; }
.mmlp-line-count { color: var(--mmlp-muted, #5f6368); }

/* ---- Bars: rating breakdown ---------------------------------------------- */

.mmlp-bars { max-width: 420px; }

.mmlp-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 6px 0;
}

.mmlp-bar-label {
	flex: 0 0 36px;
	color: var(--mmlp-muted, #5f6368);
	font-size: 0.9em;
	white-space: nowrap;
}

.mmlp-bar-track {
	flex: 1;
	height: 10px;
	background: #f1f3f4;
	border-radius: 999px;
	overflow: hidden;
}

.mmlp-bar-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--mmlp-star, #fbbc04);
}

.mmlp-bar-count {
	flex: 0 0 40px;
	text-align: right;
	color: var(--mmlp-muted, #5f6368);
	font-size: 0.9em;
}

/* ---- Write-a-review button -------------------------------------------------
 *   --mmlp-btn-bg      button background   (#1a73e8)
 *   --mmlp-btn-text    button text         (#fff)
 *   --mmlp-btn-radius  button radius       (999px)
 */

.mmlp-btn,
.mmlp-btn:visited {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--mmlp-btn-bg, #1a73e8);
	color: var(--mmlp-btn-text, #fff) !important;
	border-radius: var(--mmlp-btn-radius, 999px);
	padding: 10px 24px;
	text-decoration: none !important;
	font-weight: 600;
	line-height: 1.2;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.25);
	transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.mmlp-btn:hover {
	filter: brightness(0.93);
	box-shadow: 0 2px 6px rgba(60, 64, 67, 0.3);
	color: var(--mmlp-btn-text, #fff) !important;
}

.mmlp-btn-star { color: var(--mmlp-star, #fbbc04); }

.mmlp-btn-disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---- Attribution ---------------------------------------------------------- */

.mmlp-reviews-attribution {
	margin-top: 10px;
	color: var(--mmlp-muted, #5f6368);
	font-size: 0.8em;
}
