/* Reseñas Multired — widget flotante y listados */

.jrw-widget,
.jrw-inline,
.jrw-summary {
	--jrw-accent: #1a73e8;
	--jrw-gold: #fbbc04;
	--jrw-ink: #202124;
	--jrw-muted: #5f6368;
	--jrw-line: #e8eaed;
	--jrw-panel-w: 340px;
	--jrw-x: 20px;
	--jrw-y: 20px;
	--jrw-cols: 3;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	line-height: 1.45;
	box-sizing: border-box;
}

.jrw-widget *,
.jrw-inline *,
.jrw-summary * {
	box-sizing: border-box;
}

/* ---------- Estrellas ---------- */

.jrw-stars {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	color: var(--jrw-gold);
	vertical-align: middle;
}

.jrw-stars .jrw-star {
	fill: currentColor;
	flex: none;
}

.jrw-stars .jrw-star.is-empty {
	fill: #dadce0;
}

.jrw-stars .jrw-star.is-half {
	fill: #dadce0;
}

.jrw-verified {
	flex: none;
	margin-left: 4px;
}

/* ---------- Contenedor flotante ---------- */

.jrw-widget {
	position: fixed;
	bottom: var(--jrw-y);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	pointer-events: none;
}

.jrw-pos-right {
	right: var(--jrw-x);
	align-items: flex-end;
}

.jrw-pos-left {
	left: var(--jrw-x);
	align-items: flex-start;
}

.jrw-widget > * {
	pointer-events: auto;
}

/* ---------- Botón flotante (estado cerrado por defecto) ---------- */

.jrw-launcher {
	order: 2;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 3px 14px rgba(60, 64, 67, .22), 0 0 0 1px rgba(60, 64, 67, .06);
	color: var(--jrw-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: box-shadow .18s ease, transform .18s ease;
}

.jrw-launcher:hover,
.jrw-launcher:focus-visible {
	box-shadow: 0 6px 20px rgba(60, 64, 67, .3), 0 0 0 1px rgba(60, 64, 67, .08);
	transform: translateY(-1px);
	outline: none;
}

.jrw-launcher-logo {
	display: inline-flex;
	flex: none;
	line-height: 0;
}

.jrw-launcher-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
}

.jrw-launcher-meta {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
	line-height: 1;
}

.jrw-launcher-meta strong {
	font-size: 15px;
	font-weight: 700;
}

.jrw-launcher-count {
	color: var(--jrw-muted);
	font-size: 14px;
	font-weight: 400;
}

/* Variante estrecha: logo y nota en una sola línea. */
.jrw-launcher-pastilla .jrw-launcher {
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
}

.jrw-launcher-pastilla .jrw-launcher-body {
	flex-direction: row;
	align-items: center;
	gap: 7px;
}

.jrw-launcher-pastilla .jrw-launcher-count {
	display: none;
}

.jrw-launcher-pastilla .jrw-launcher-meta .jrw-sep {
	display: none;
}

/* ---------- Panel ---------- */

.jrw-panel {
	order: 1;
	width: min(var(--jrw-panel-w), calc(100vw - 24px));
	max-height: min(72vh, 640px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(32, 33, 36, .28);
	overflow: hidden;
	/* Cerrado pero presente en el DOM: los rastreadores siguen leyendo las reseñas. */
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
	pointer-events: none;
}

.jrw-pos-left .jrw-panel {
	transform-origin: bottom left;
}

.jrw-widget[data-open="1"] .jrw-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* ---------- Cabecera ---------- */

.jrw-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 44px 14px 16px;
	border-bottom: 1px solid var(--jrw-line);
	background: #fff;
	flex: none;
}

.jrw-head-img {
	width: 48px;
	height: 48px;
	border-radius: 4px;
	object-fit: cover;
	flex: none;
}

.jrw-head-info {
	min-width: 0;
}

.jrw-head-name {
	margin: 0 0 2px;
	font-size: 15px;
	font-weight: 700;
	color: var(--jrw-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jrw-head-meta {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--jrw-muted);
}

.jrw-head-meta strong {
	color: var(--jrw-ink);
	font-weight: 700;
}

.jrw-sep {
	margin: 0 4px;
	color: #bdc1c6;
}

.jrw-close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--jrw-muted);
	cursor: pointer;
}

.jrw-close:hover,
.jrw-close:focus-visible {
	background: #f1f3f4;
	color: var(--jrw-ink);
	outline: none;
}

/* ---------- Lista ---------- */

.jrw-list {
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.jrw-item {
	padding: 14px 16px;
	border-bottom: 1px solid #f1f3f4;
}

.jrw-list .jrw-item:last-child {
	border-bottom: 0;
}

.jrw-item-top {
	display: flex;
	align-items: center;
	gap: 10px;
}

.jrw-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.jrw-avatar-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 17px;
	font-weight: 600;
}

.jrw-item-id {
	flex: 1 1 auto;
	min-width: 0;
}

.jrw-author {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--jrw-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jrw-date {
	margin: 1px 0 0;
	font-size: 12.5px;
	color: #70757a;
}

.jrw-source-link {
	display: inline-flex;
	flex: none;
	line-height: 0;
	text-decoration: none;
}

.jrw-item-rating {
	display: flex;
	align-items: center;
	margin: 8px 0 6px;
}

.jrw-text {
	position: relative;
	font-size: 14px;
	color: #4a4f54;
}

.jrw-text p {
	margin: 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.jrw-text.is-clamped p {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.jrw-more {
	margin: 4px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: #70757a;
	font-size: 13.5px;
	cursor: pointer;
}

.jrw-more:hover,
.jrw-more:focus-visible {
	color: var(--jrw-accent);
	text-decoration: underline;
	outline: none;
}

.jrw-photo {
	float: right;
	width: 96px;
	height: 96px;
	margin: 0 0 8px 12px;
	border-radius: 8px;
	object-fit: cover;
}

.jrw-item::after {
	content: "";
	display: block;
	clear: both;
}

/* ---------- Pie ---------- */

.jrw-foot {
	flex: none;
	padding: 10px 16px;
	border-top: 1px solid var(--jrw-line);
	background: #fff;
	text-align: center;
}

.jrw-cta {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--jrw-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.jrw-cta:hover,
.jrw-cta:focus-visible {
	filter: brightness(1.08);
	color: #fff;
}

/* ---------- Listados en el contenido ---------- */

.jrw-inline .jrw-item {
	border: 1px solid var(--jrw-line);
	border-radius: 10px;
	background: #fff;
}

.jrw-layout-grid {
	display: grid;
	grid-template-columns: repeat(var(--jrw-cols), minmax(0, 1fr));
	gap: 16px;
}

.jrw-layout-lista {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.jrw-layout-carrusel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
}

.jrw-layout-carrusel .jrw-item {
	flex: 0 0 min(320px, 82%);
	scroll-snap-align: start;
}

.jrw-summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--jrw-ink);
}

.jrw-summary-value {
	font-size: 20px;
	font-weight: 700;
}

.jrw-summary-count {
	color: var(--jrw-muted);
	font-size: 14px;
}

/* ---------- Accesibilidad y responsive ---------- */

.jrw-widget .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 600px) {
	.jrw-widget {
		left: 12px;
		right: 12px;
		align-items: stretch;
	}

	.jrw-panel {
		width: 100%;
		max-height: 78vh;
	}

	.jrw-launcher {
		align-self: flex-end;
	}

	.jrw-pos-left .jrw-launcher {
		align-self: flex-start;
	}

	/* Botón en una sola línea para robar el mínimo de pantalla. */
	.jrw-mobile-compact .jrw-launcher {
		gap: 9px;
		padding: 8px 14px;
		border-radius: 999px;
	}

	.jrw-mobile-compact .jrw-launcher-body {
		flex-direction: row;
		align-items: center;
		gap: 7px;
	}

	.jrw-mobile-compact .jrw-launcher-count {
		display: none;
	}

	.jrw-mobile-compact .jrw-launcher-meta .jrw-sep {
		display: none;
	}

	/* Con el panel abierto el botón sobra: la X de la cabecera cierra. */
	.jrw-widget[data-open="1"] .jrw-launcher {
		display: none;
	}

	.jrw-layout-grid {
		grid-template-columns: 1fr;
	}

	.jrw-hide-mobile {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jrw-panel,
	.jrw-launcher {
		transition: none;
	}
}
