/* ELEMENTARNO Reviews. Every value is a custom property, so a theme can restyle without !important. */
.er,
.er-badge {
	--er-accent: currentColor;
	--er-star: #f5a623;
	--er-star-off: rgba(128, 128, 128, 0.3);
	--er-card-bg: #fff;
	--er-card-color: inherit;
	--er-card-border: 1px solid rgba(128, 128, 128, 0.22);
	--er-card-shadow: none;
	--er-radius: 14px;
	--er-padding: 22px;
	--er-gap: 20px;
	--er-muted: rgba(100, 100, 100, 0.9);
	--er-font-size: 15px;
	--er-line-height: 1.55;
	--er-avatar: 44px;
	--er-star-size: 18px;
	--er-label-size: 0.8em;
	--er-label-color: var(--er-muted);
}

.er {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	container-type: inline-size;
}

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

.er--grid .er-track {
	display: grid;
	grid-template-columns: repeat(var(--er-columns, 3), minmax(0, 1fr));
	gap: var(--er-gap);
}

.er--list .er-track {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--er-gap);
}

.er--carousel .er-track {
	display: flex;
	gap: var(--er-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	padding: 2px;
	margin: -2px;
}

.er--carousel .er-track::-webkit-scrollbar {
	display: none;
}

.er--carousel .er-track:focus-visible {
	outline: 2px solid var(--er-accent);
	outline-offset: 4px;
}

.er--carousel .er-item {
	flex: 0 0 calc((100% - (var(--er-columns, 3) - 1) * var(--er-gap)) / var(--er-columns, 3));
	min-width: 0;
	scroll-snap-align: start;
}

.er-item {
	display: flex;
	min-width: 0;
}

.er-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	min-width: 0;
	padding: var(--er-padding);
	background: var(--er-card-bg);
	color: var(--er-card-color);
	border: var(--er-card-border);
	border-radius: var(--er-radius);
	box-shadow: var(--er-card-shadow);
	font-size: var(--er-font-size);
	line-height: var(--er-line-height);
}

.er-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.er-avatar {
	flex: 0 0 var(--er-avatar);
	width: var(--er-avatar);
	height: var(--er-avatar);
	border-radius: 50%;
	object-fit: cover;
}

.er-avatar--letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(128, 128, 128, 0.18);
	font-weight: 600;
	font-size: calc(var(--er-avatar) * 0.42);
	line-height: 1;
}

.er-card__who {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.er-card__author {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.er-card__date {
	color: var(--er-muted);
	font-size: 0.87em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.er-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
}

.er-source {
	flex: 0 0 auto;
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--er-muted);
	font-size: 0.87em;
	font-weight: 600;
	text-decoration: none;
}

a.er-source:hover,
a.er-source:focus-visible {
	color: var(--er-accent);
	text-decoration: underline;
}

.er-source img,
.er-source svg {
	width: 20px;
	height: 20px;
}

.er-stars {
	display: inline-flex;
	line-height: 0;
}

.er-stars svg {
	width: calc(var(--er-star-size) * 5);
	height: var(--er-star-size);
}

.er-stars__off {
	fill: var(--er-star-off);
}

.er-stars__on {
	fill: var(--er-star);
}

.er-card__text {
	overflow-wrap: anywhere;
}

.er-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--er-lines, 5);
	line-clamp: var(--er-lines, 5);
	overflow: hidden;
}

.er-clamp.is-open {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

/* Buttons are reset with .er in front: themes and Elementor kits style every <button>, also on hover. */
.er .er-more,
.er .er-more:hover,
.er .er-more:focus {
	align-self: flex-start;
	min-width: 0;
	min-height: 0;
	margin: -4px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--er-accent);
	font: inherit;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	cursor: pointer;
}

.er .er-more[hidden],
.er .er-nav[hidden] {
	display: none;
}

.er-card__reply {
	padding: 10px 12px;
	border-left: 3px solid rgba(128, 128, 128, 0.35);
	background: rgba(128, 128, 128, 0.08);
	border-radius: 0 8px 8px 0;
	font-size: 0.93em;
}

.er-card__reply-title {
	display: block;
	font-weight: 600;
}

.er-card__report {
	margin-top: auto;
	align-self: flex-start;
	color: var(--er-muted);
	font-size: 0.8em;
}

.er-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 18px;
}

.er .er-nav__btn,
.er .er-nav__btn:hover,
.er .er-nav__btn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	min-width: 0;
	height: 40px;
	min-height: 0;
	padding: 0;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 50%;
	background: var(--er-card-bg);
	box-shadow: none;
	color: inherit;
	line-height: 1;
	cursor: pointer;
}

.er .er-nav__btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.er-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.er .er-dot,
.er .er-dot:hover,
.er .er-dot:focus {
	width: 9px;
	min-width: 0;
	height: 9px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(128, 128, 128, 0.35);
	box-shadow: none;
	cursor: pointer;
}

.er .er-dot[aria-current="true"] {
	background: var(--er-accent);
}

.er .er-nav__btn:focus-visible,
.er .er-dot:focus-visible,
.er .er-more:focus-visible {
	outline: 2px solid var(--er-accent);
	outline-offset: 2px;
}

.er .er-item[hidden] {
	display: none;
}

.er-all {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.er .er-all__btn {
	cursor: pointer;
}

.er-badge {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	line-height: 1.3;
}

.er-badge__score {
	font-weight: 700;
}

.er-badge__count {
	color: var(--er-muted);
}

/* Quote card: stars, text, then "AUTHOR · SOURCE" in one line at the bottom. */
.er--card-quote .er-card {
	gap: 16px;
}

.er--card-quote .er-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin-top: auto;
	color: var(--er-label-color);
	font-size: var(--er-label-size);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.er--card-quote .er-card__foot .er-card__author,
.er--card-quote .er-card__foot .er-source,
.er--card-quote .er-card__foot .er-card__date {
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	white-space: normal;
	margin: 0;
}

.er--card-quote .er-card__foot .er-source::before,
.er--card-quote .er-card__foot .er-card__date::before {
	content: "·";
	margin-right: 2px;
}

.er--card-quote .er-card__foot a.er-source:hover,
.er--card-quote .er-card__foot a.er-source:focus-visible {
	color: var(--er-accent);
}

.er--card-quote .er-card__report {
	margin-top: 0;
}

/* Columns follow the width of the place the reviews sit in, not the screen. */
@container (max-width: 860px) {
	.er--grid .er-track {
		grid-template-columns: repeat(min(var(--er-columns, 3), 2), minmax(0, 1fr));
	}

	.er--carousel .er-item {
		flex-basis: calc((100% - var(--er-gap)) / min(var(--er-columns, 3), 2));
	}
}

@container (max-width: 560px) {
	.er--grid .er-track {
		grid-template-columns: minmax(0, 1fr);
	}

	.er--carousel .er-item {
		flex-basis: 88%;
	}
}

@media (max-width: 640px) {
	.er,
	.er-badge {
		--er-padding: 18px;
		--er-gap: 14px;
	}
}

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