.rpr {
	position: fixed;
	left: 16px;
	bottom: calc(var(--rpr-bottom, 16px) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	width: min(330px, calc(100vw - 32px));
	box-sizing: border-box;
	font: 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.rpr--in {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .3s ease, transform .3s ease, visibility 0s;
}

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

/* Card compatta */
.rpr .rpr-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 30px 10px 10px;
	background: #fff;
	color: #1f2933;
	text-decoration: none;
	border-radius: 12px;
	border: 1px solid rgba(17, 24, 39, .07);
	box-shadow: 0 6px 20px rgba(17, 24, 39, .13);
}

.rpr a.rpr-card:hover,
.rpr a.rpr-card:focus-visible {
	color: #1f2933;
	text-decoration: none;
}

.rpr a.rpr-card:focus-visible,
.rpr .rpr-close:focus-visible {
	outline: 2px solid #1f2933;
	outline-offset: 2px;
}

/* Foto piccola con angoli arrotondati */
.rpr .rpr-img {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	min-height: 0;
	margin: 0;
	border-radius: 8px;
	object-fit: cover;
	background: #eef0f2;
}

.rpr .rpr-card--noimg .rpr-img {
	display: none;
}

/* Testo: nome + stelle sulla stessa riga, poi recensione, poi link */
.rpr .rpr-body {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 7px;
	align-items: center;
}

.rpr .rpr-name {
	grid-column: 1;
	margin: 0;
	max-width: 150px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	color: #111827;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rpr .rpr-stars {
	grid-column: 2;
	margin: 0;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 1px;
	white-space: nowrap;
}

.rpr .rpr-star {
	color: #dcdfe4;
}

.rpr .rpr-star.is-on {
	color: var(--rpr-star, #f5b301);
}

.rpr .rpr-text {
	grid-column: 1 / -1;
	margin: 2px 0 0;
	font-size: 12.5px;
	line-height: 1.35;
	color: #4b5563;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rpr .rpr-foot {
	grid-column: 1 / -1;
	margin-top: 3px;
	font-size: 10.5px;
	font-weight: 600;
	color: #047857;
}

/* Chiusura piccola, dentro la card */
.rpr .rpr-close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	width: 22px;
	height: 22px;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9ca3af;
	font: 17px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.rpr .rpr-close:hover {
	background: rgba(17, 24, 39, .07);
	color: #111827;
}

/* Telefono: striscia a tutta larghezza, sempre compatta */
@media (max-width: 600px) {
	.rpr {
		left: 10px;
		right: 10px;
		width: auto;
	}

	.rpr .rpr-name {
		font-size: 14px;
		max-width: 55%;
	}

	.rpr .rpr-text {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rpr,
	.rpr--in {
		transition: none;
		transform: none;
	}
}
