/* ── AB Recensioni Custom v1.2.3 ── */

:root {
	--grw-stars: #FBBC04;
	--grw-accent: #2E7498;
	--grw-text: #333333;
	--grw-bg-fallback: #ffffff;
	--grw-muted: #718096;
	--grw-cols: 3;

	--grw-outer-border-width: 0px;
	--grw-outer-border-color: #d1d5db;
	--grw-outer-radius: 0px 0px 0px 0px;

	--grw-summary-bg: #ffffff;
	--grw-summary-border-color: #e2e8f0;
	--grw-summary-border-width: 1px;
	--grw-summary-radius: 12px 12px 12px 12px;
	--grw-summary-shadow: 0 2px 8px rgba(0,0,0,.08);

	--grw-card-bg: #ffffff;
	--grw-card-border-color: #e2e8f0;
	--grw-card-border-width: 1px;
	--grw-card-radius: 12px 12px 12px 12px;
	--grw-card-shadow: 0 2px 8px rgba(0,0,0,.08);

	--grw-arrow-bg: #ffffff;
	--grw-arrow-border: #2E7498;
	--grw-arrow-color: #333333;
	--grw-arrow-hover-bg: #2E7498;
	--grw-arrow-hover-border: #2E7498;
	--grw-arrow-hover-color: #ffffff;
	--grw-arrow-top: 50%;

	--grw-card-gap: 16px;
	--grw-cards-pad-top: 18px;
	--grw-cards-pad-bottom: 18px;
	--grw-cards-side-pad: 18px;

	--grw-title-family: inherit;
	--grw-title-size: 0.92rem;
	--grw-title-weight: 600;
	--grw-title-style: normal;

	--grw-text-family: inherit;
	--grw-text-size: 0.85rem;
	--grw-text-weight: normal;
	--grw-text-style: normal;

	--grw-name-family: inherit;
	--grw-name-size: 0.90rem;
	--grw-name-weight: 600;
	--grw-name-style: normal;

	--grw-company-family: inherit;
	--grw-company-size: 0.80rem;
	--grw-company-weight: normal;
	--grw-company-style: normal;

	--grw-date-family: inherit;
	--grw-date-size: 0.78rem;
	--grw-date-weight: normal;
	--grw-date-style: normal;

	--grw-summary_title-family: inherit;
	--grw-summary_title-size: 0.85rem;
	--grw-summary_title-weight: 600;
	--grw-summary_title-style: normal;

	--grw-summary_count-family: inherit;
	--grw-summary_count-size: 0.85rem;
	--grw-summary_count-weight: normal;
	--grw-summary_count-style: normal;

	--grw-summary_link-family: inherit;
	--grw-summary_link-size: 0.80rem;
	--grw-summary_link-weight: normal;
	--grw-summary_link-style: normal;

	--grw-cta-bg: #1a73e8;
	--grw-cta-color: #ffffff;
	--grw-cta-border: #1a73e8;
	--grw-cta-border-width: 1px;
	--grw-cta-radius: 6px;
	--grw-cta-hover-bg: #005a87;
	--grw-cta-hover-color: #ffffff;
	--grw-cta-hover-border: #005a87;
	--grw-cta-font-size: 0.85rem;
	--grw-cta-padding: 10px 20px;
}

.grw-section-title {
	line-height: 1.3;
}

.grw-widget {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	font-family: inherit;
	color: var(--grw-text);
	border: var(--grw-outer-border-width) solid var(--grw-outer-border-color);
	border-radius: var(--grw-outer-radius);
	padding: 0;
	box-sizing: border-box;
}

.grw-summary {
	flex: 0 0 180px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px 16px;
	background: var(--grw-summary-bg, var(--grw-bg-fallback));
	border: var(--grw-summary-border-width) solid var(--grw-summary-border-color);
	border-radius: var(--grw-summary-radius);
	box-shadow: var(--grw-summary-shadow);
	box-sizing: border-box;
}

.grw-summary-title {
	font-family: var(--grw-summary_title-family);
	font-size: var(--grw-summary_title-size);
	font-weight: var(--grw-summary_title-weight);
	font-style: var(--grw-summary_title-style);
	color: var(--grw-summary-title-color, var(--grw-text));
	margin-bottom: 4px;
	line-height: 1.3;
}

.grw-avg-number {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
	color: var(--grw-text);
	margin-bottom: 8px;
}

.grw-count {
	font-family: var(--grw-summary_count-family);
	font-size: var(--grw-summary_count-size);
	font-weight: var(--grw-summary_count-weight);
	font-style: var(--grw-summary_count-style);
	color: var(--grw-summary-count-color, var(--grw-muted));
	margin: 8px 0 12px;
	line-height: 1.4;
}

.grw-source-link {
	font-family: var(--grw-summary_link-family);
	font-size: var(--grw-summary_link-size);
	font-weight: var(--grw-summary_link-weight);
	font-style: var(--grw-summary_link-style);
	color: var(--grw-summary-link-color, var(--grw-accent));
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}

.grw-source-link:hover {
	border-color: currentColor;
}

.grw-cta-button {
	display: inline-block;
	margin-top: 14px;
	padding: var(--grw-cta-padding);
	background: var(--grw-cta-bg);
	color: var(--grw-cta-color);
	border: var(--grw-cta-border-width) solid var(--grw-cta-border);
	border-radius: var(--grw-cta-radius);
	font-size: var(--grw-cta-font-size);
	font-weight: 500;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s, transform .1s;
	line-height: 1.2;
	box-sizing: border-box;
}

.grw-cta-button:hover {
	background: var(--grw-cta-hover-bg);
	border-color: var(--grw-cta-hover-border);
	color: var(--grw-cta-hover-color);
	text-decoration: none;
}

.grw-cta-button:active {
	transform: scale(0.97);
}

.grw-stars { display:flex; gap:2px; align-items:center; }
.grw-widget .grw-star { display:inline-block !important; flex:0 0 auto; width:16px !important; height:16px !important; max-width:16px !important; max-height:16px !important; }
.grw-widget .grw-stars--large .grw-star { width:22px !important; height:22px !important; max-width:22px !important; max-height:22px !important; }
.grw-stars--large .grw-star { width:22px; height:22px; }
.grw-star { width:16px; height:16px; }
.grw-star--full polygon { fill: var(--grw-stars); }
.grw-star--empty polygon { fill:none; stroke: var(--grw-stars); stroke-width:1.5; }
.grw-star--half .grw-star__bg { fill:none; stroke: var(--grw-stars); stroke-width:1.5; }
.grw-star--half polygon:not(.grw-star__bg) { fill: var(--grw-stars); }

.grw-slider-wrap {
	flex: 1;
	min-width: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--grw-cards-pad-top) var(--grw-cards-side-pad) var(--grw-cards-pad-bottom);
	box-sizing: border-box;
}

.grw-slider {
	overflow: hidden;
	flex: 1;
	min-height: 0;
	transition: height 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
	.grw-slider {
		transition: none;
	}
}

.grw-slide {
	display: none;
	grid-template-columns: repeat(var(--grw-cols, 3), 1fr);
	gap: var(--grw-card-gap);
}

.grw-slide--active {
	display: grid;
}

/* Fallback: se il JS non ha ancora ricostruito le slide, mantiene comunque le card in orizzontale. */
.grw-slider:not(:has(.grw-slide)) {
	display: grid;
	grid-template-columns: repeat(var(--grw-cols, 3), minmax(0, 1fr));
	gap: var(--grw-card-gap);
}

.grw-slider > .grw-card {
	min-width: 0;
}

.elementor-widget-container .grw-widget {
	width: 100%;
}

.grw-card {
	background: var(--grw-card-bg, var(--grw-bg-fallback));
	border: var(--grw-card-border-width) solid var(--grw-card-border-color);
	border-radius: var(--grw-card-radius);
	box-shadow: var(--grw-card-shadow);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
}

.grw-card__header { display:flex; flex-direction:column; gap:6px; }
.grw-card__meta { display:flex; flex-direction:column; }

.grw-card__name {
	font-family: var(--grw-name-family);
	font-size: var(--grw-name-size);
	font-weight: var(--grw-name-weight);
	font-style: var(--grw-name-style);
	color: var(--grw-color-name, var(--grw-text));
}

.grw-card__company {
	font-family: var(--grw-company-family);
	font-size: var(--grw-company-size);
	font-weight: var(--grw-company-weight);
	font-style: var(--grw-company-style);
	color: var(--grw-color-company, var(--grw-muted));
}

.grw-card__rating { display:flex; align-items:center; gap:8px; }

.grw-card__date {
	font-family: var(--grw-date-family);
	font-size: var(--grw-date-size);
	font-weight: var(--grw-date-weight);
	font-style: var(--grw-date-style);
	color: var(--grw-color-date, var(--grw-muted));
}

.grw-card__title {
	font-family: var(--grw-title-family);
	font-size: var(--grw-title-size);
	font-weight: var(--grw-title-weight);
	font-style: var(--grw-title-style);
	margin: 0;
	color: var(--grw-color-review-title, var(--grw-text));
	line-height: 1.3;
}

.grw-card__text-wrap {
	margin: 0;
}

.grw-card__text {
	font-family: var(--grw-text-family);
	font-size: var(--grw-text-size);
	font-weight: var(--grw-text-weight);
	font-style: var(--grw-text-style);
	line-height: 1.6;
	color: var(--grw-color-review-text, var(--grw-text));
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.grw-card__text.is-expanded {
	display: block;
	-webkit-line-clamp: unset;
	-webkit-box-orient: initial;
	overflow: visible;
}

.grw-read-toggle {
	display: none;
	appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 4px 0 0;
	font: inherit;
	font-size: var(--grw-text-size);
	line-height: 1.4;
	color: var(--grw-color-original-link, var(--grw-accent));
	text-decoration: underline;
	cursor: pointer;
}

.grw-read-toggle.is-visible {
	display: inline-block;
}

.grw-read-toggle:hover,
.grw-read-toggle:focus {
	color: var(--grw-accent);
	outline: none;
}

.grw-card__original-link {
	display: inline-block;
	font-size: 0.82rem;
	line-height: 1.4;
	text-decoration: none;
	color: var(--grw-color-original-link, var(--grw-accent));
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 3px 7px;
	margin-top: 2px;
	transition: color .2s, background-color .2s, border-color .2s;
}

.grw-card__original-link:hover,
.grw-card__original-link:focus {
	color: var(--grw-card-bg, #ffffff);
	background: var(--grw-color-original-link, var(--grw-accent));
	border-color: var(--grw-color-original-link, var(--grw-accent));
	text-decoration: none;
	outline: none;
}

.grw-card__translated {
	font-family: var(--grw-translated-family);
	font-size: var(--grw-translated-size);
	font-weight: var(--grw-translated-weight);
	font-style: var(--grw-translated-style);
	line-height: 1.4;
	color: var(--grw-color-translated, var(--grw-muted));
}

.grw-arrow {
	position: absolute;
	top: var(--grw-arrow-top, 50%);
	transform: translateY(-50%);
	background: var(--grw-arrow-bg);
	border: 1px solid var(--grw-arrow-border);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--grw-arrow-color);
	box-shadow: var(--grw-card-shadow);
	transition: background .2s, border-color .2s, color .2s;
	z-index: 2;
	padding: 0;
}

.grw-arrow:hover {
	background: var(--grw-arrow-hover-bg);
	border-color: var(--grw-arrow-hover-border);
	color: var(--grw-arrow-hover-color);
}

.grw-arrow--prev { left: 0; }
.grw-arrow--next { right: 0; }
.grw-arrow:disabled { opacity:.35; cursor:default; pointer-events:none; }

.grw-empty { color: var(--grw-muted); font-style: italic; }

/* Responsive: il numero di colonne è gestito dal JS via --grw-cols */

@media (max-width: 680px), (pointer: coarse) and (max-width: 1024px) {
	.grw-widget { flex-direction: column; gap: 20px; --grw-cols: 1 !important; }
	.grw-summary {
		flex: none;
		width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 12px;
		padding: 16px;
	}
	.grw-avg-number { font-size: 2.2rem; margin: 0; }
	.grw-count { margin: 0; }
	/* --grw-cols viene aggiornata da JS in base a data-per-slide-mobile.
	   Questa regola è anche fallback se il JS parte in ritardo. */
	.grw-slide,
	.grw-slider:not(:has(.grw-slide)) {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
	.grw-arrow--prev { left: 0; }
	.grw-arrow--next { right: 0; }
}
