/* ==========================================================
   Star Rating Schema Pro — Frontend (card + glass)
   ========================================================== */

.srs-rating-wrapper {
	--srs-star-color: #3b9eff;
	--srs-empty-color: #c8d4e0;
	--srs-star-size: 20px;
	display: block;
	margin: 16px 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	max-width: 100%;
	box-sizing: border-box;
}

/* ---- Style: simple (inline) ---- */
.srs-rating-wrapper.srs-style-simple {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* ---- Style: card (glass / blur) ---- */
.srs-rating-wrapper.srs-style-card {
	position: relative;
	isolation: isolate;
	border-radius: 16px;
	padding: 18px 20px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.55);
	box-shadow:
		0 10px 30px rgba(26, 80, 140, 0.10),
		0 2px 8px rgba(0, 0, 0, 0.04);
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.72) 0%,
		rgba(240, 247, 255, 0.65) 50%,
		rgba(230, 242, 255, 0.7) 100%
	);
	backdrop-filter: blur(14px) saturate(1.35);
	-webkit-backdrop-filter: blur(14px) saturate(1.35);
}

.srs-rating-wrapper.srs-style-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse 80% 60% at 10% 20%, rgba(59, 158, 255, 0.22), transparent 55%),
		radial-gradient(ellipse 70% 50% at 90% 80%, rgba(138, 92, 246, 0.14), transparent 50%),
		linear-gradient(135deg, rgba(255,255,255,0.5), rgba(227, 241, 255, 0.4));
	pointer-events: none;
}

.srs-rating-wrapper.srs-style-card::after {
	content: "";
	position: absolute;
	top: -40%;
	right: -15%;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 70%);
	z-index: -1;
	pointer-events: none;
}

.srs-rating-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.srs-rating-main {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	min-width: 0;
}

.srs-stars {
	position: relative;
	display: inline-block;
	font-size: var(--srs-star-size, 20px);
	line-height: 1;
	letter-spacing: 2px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.srs-stars-empty {
	color: var(--srs-empty-color, #c8d4e0);
}

.srs-stars-filled {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: var(--srs-star-color, #3b9eff);
}

.srs-rating-score {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
}

.srs-rating-number {
	font-weight: 800;
	font-size: calc(var(--srs-star-size, 20px) * 1.05);
	color: #0f2740;
	letter-spacing: -0.02em;
	line-height: 1;
}

.srs-rating-max {
	font-size: 12.5px;
	font-weight: 600;
	color: #7a8fa3;
}

/* Meta chips: author, reviews, views */
.srs-rating-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.srs-meta-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 500;
	color: #2a4058;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 3px rgba(15, 50, 90, 0.06);
	line-height: 1.2;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.srs-style-simple .srs-meta-chip {
	background: #f4f8fc;
	border-color: #e0ebf5;
	box-shadow: none;
}

.srs-meta-chip svg,
.srs-meta-chip .srs-meta-icon {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	opacity: 0.75;
}

.srs-meta-chip strong {
	font-weight: 700;
	color: #0f2740;
}

.srs-meta-author {
	max-width: 220px;
}

.srs-meta-author .srs-meta-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Small label above the card */
.srs-rating-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #5a7a9a;
	margin-bottom: 10px;
	position: relative;
	z-index: 1;
}

/* ---- Mobile: collapse everything into one adaptive horizontal row ---- */
@media (max-width: 600px) {
	.srs-rating-wrapper.srs-style-card {
		padding: 12px 14px;
		border-radius: 14px;
	}

	.srs-rating-label {
		margin-bottom: 8px;
		font-size: 10px;
	}

	/* Single row: stars, score and every meta chip line up side by side.
	   If content is still wider than the screen it scrolls sideways
	   instead of wrapping onto new lines. */
	.srs-rating-inner {
		flex-wrap: nowrap;
		align-items: center;
		gap: 10px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-bottom: 1px;
	}

	.srs-rating-inner::-webkit-scrollbar {
		display: none;
		height: 0;
	}

	.srs-rating-main {
		flex-wrap: nowrap;
		flex-shrink: 0;
		gap: 7px;
		scroll-snap-align: start;
	}

	.srs-rating-meta {
		flex-wrap: nowrap;
		flex-shrink: 0;
		gap: 6px;
	}

	.srs-stars {
		font-size: 16px;
		letter-spacing: 1px;
	}

	.srs-rating-number {
		font-size: 15px;
	}

	.srs-rating-max {
		font-size: 10.5px;
	}

	.srs-meta-chip {
		font-size: 11px;
		padding: 4px 9px;
		gap: 4px;
		flex-shrink: 0;
		scroll-snap-align: start;
	}

	.srs-meta-chip svg,
	.srs-meta-chip .srs-meta-icon {
		width: 12px;
		height: 12px;
	}

	.srs-meta-author {
		max-width: 110px;
	}
}

@media (max-width: 360px) {
	.srs-stars {
		font-size: 14px;
	}
	.srs-rating-number {
		font-size: 14px;
	}
	.srs-meta-chip {
		font-size: 10.5px;
		padding: 4px 8px;
	}
	.srs-meta-author {
		max-width: 90px;
	}
}
