/* HCIP Google Reviews. Colors can be overridden per page with these variables. */
.hcip-gr,
.hcip-gr-badge {
	--hcip-gr-text: #1f2933;
	--hcip-gr-muted: #5f6b7a;
	--hcip-gr-card-bg: #ffffff;
	--hcip-gr-border: #e3e8ee;
	--hcip-gr-star: #fbbc04;
	--hcip-gr-star-empty: #d6dbe1;
	--hcip-gr-accent: #1a73e8;
	--hcip-gr-radius: 12px;
}

.hcip-gr {
	position: relative;
	color: var(--hcip-gr-text);
	box-sizing: border-box;
}
.hcip-gr *,
.hcip-gr *::before,
.hcip-gr *::after { box-sizing: border-box; }

.hcip-gr__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 20px;
}
.hcip-gr__title { margin: 0; }

/* Badge */
.hcip-gr-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: var(--hcip-gr-card-bg);
	border: 1px solid var(--hcip-gr-border);
	border-radius: 999px;
	color: var(--hcip-gr-text);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.2;
}
a.hcip-gr-badge:hover,
a.hcip-gr-badge:focus-visible { border-color: var(--hcip-gr-accent); }
.hcip-gr-badge__score { font-weight: 700; font-size: 17px; }
.hcip-gr-badge__count { color: var(--hcip-gr-muted); }

/* Stars: grey row with a gold row clipped to the rating */
.hcip-gr-stars {
	position: relative;
	display: inline-block;
	font-size: 17px;
	line-height: 1;
	letter-spacing: 2px;
	color: var(--hcip-gr-star-empty);
	white-space: nowrap;
}
.hcip-gr-stars::before { content: "\2605\2605\2605\2605\2605"; }
.hcip-gr-stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	color: var(--hcip-gr-star);
}
.hcip-gr-stars__fill::before { content: "\2605\2605\2605\2605\2605"; }

/* Track layouts */
.hcip-gr__track { display: grid; gap: 16px; }
.hcip-gr--grid .hcip-gr__track { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hcip-gr--list .hcip-gr__track { grid-template-columns: 1fr; }

.hcip-gr--carousel .hcip-gr__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	margin: 0 -4px;
	padding: 4px;
}
.hcip-gr--carousel .hcip-gr__viewport::-webkit-scrollbar { display: none; }
.hcip-gr--carousel .hcip-gr__track {
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 32px) / 3);
	align-items: start;
}
@media (max-width: 960px) {
	.hcip-gr--carousel .hcip-gr__track { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
	.hcip-gr--carousel .hcip-gr__track { grid-auto-columns: 86%; }
}
.hcip-gr--carousel .hcip-gr-card { scroll-snap-align: start; }

/* Card */
.hcip-gr-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px;
	background: var(--hcip-gr-card-bg);
	border: 1px solid var(--hcip-gr-border);
	border-radius: var(--hcip-gr-radius);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
	min-width: 0;
}
.hcip-gr-card__head { display: flex; align-items: center; gap: 12px; }
.hcip-gr-card__photo,
.hcip-gr-card__initial {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}
.hcip-gr-card__initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--hcip-gr-accent);
	color: #fff;
	font-weight: 700;
}
.hcip-gr-card__who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hcip-gr-card__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcip-gr-card__date { font-size: 13px; color: var(--hcip-gr-muted); }
.hcip-gr-g { flex: 0 0 auto; }

.hcip-gr .hcip-gr-card__text {
	font-size: 15px;
	line-height: 1.55;
	max-height: calc(1.55em * 5);
	overflow: hidden;
}
.hcip-gr .hcip-gr-card__text p {
	margin: 0 0 0.6em;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}
.hcip-gr-card__text p:last-child { margin-bottom: 0; }
.hcip-gr-card.is-open .hcip-gr-card__text { max-height: none; }
/* Fade the last lines of a shortened review so nothing looks cut in half */
.hcip-gr-card.is-clamped:not(.is-open) .hcip-gr-card__text {
	-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.hcip-gr-card__more {
	align-self: flex-start;
	padding: 0;
	background: none;
	border: 0;
	color: var(--hcip-gr-accent);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	text-decoration: underline;
}
.hcip-gr-card__loc { font-size: 13px; color: var(--hcip-gr-muted); }

/* Carousel arrows */
.hcip-gr__nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.hcip-gr__nav button {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--hcip-gr-border);
	background: var(--hcip-gr-card-bg);
	color: var(--hcip-gr-text);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.hcip-gr__nav button:hover,
.hcip-gr__nav button:focus-visible { border-color: var(--hcip-gr-accent); }
.hcip-gr__nav button:disabled { opacity: 0.35; cursor: default; }
.hcip-gr.is-static .hcip-gr__nav { display: none; }

/* Footer links */
.hcip-gr__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px 24px;
	margin-top: 20px;
}
.hcip-gr__all { color: var(--hcip-gr-accent); }
.hcip-gr__write {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--hcip-gr-accent);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
}
.hcip-gr__write:hover,
.hcip-gr__write:focus-visible { filter: brightness(0.92); }

@media (prefers-reduced-motion: reduce) {
	.hcip-gr--carousel .hcip-gr__viewport { scroll-behavior: auto; }
}
