/**
 * Ocena i opinie Google.
 *
 * Zasada: komponent nie narzuca kolorów. Tekst bierze `currentColor` z otoczenia,
 * a gwiazdki kolor akcentu motywu (`--pg-accent`) z zapasem na wypadek, gdyby
 * motyw takiej zmiennej nie miał. Dzięki temu to samo działa na ciemnej stopce
 * i na jasnej sekcji bez dopisywania wyjątków.
 */

/* ---------------------------------------------------------------
   OCENA
   --------------------------------------------------------------- */
.pg-rating {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	color: inherit;
}

.pg-rating__stars {
	position: relative;
	display: inline-flex;
	line-height: 0;
}

.pg-rating__stars-bg,
.pg-rating__stars-fg {
	display: inline-flex;
	gap: 2px;
}

.pg-rating__stars-fg {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	overflow: hidden;
}

.pg-rating svg,
.pg-review svg {
	width: 16px;
	height: 16px;
	flex: none;
}

.pg-rating__stars-bg svg {
	fill: currentColor;
	opacity: 0.22;
}

.pg-rating__stars-fg svg {
	fill: var(--pg-accent, #ff6633);
}

.pg-rating__score {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	opacity: 0.78;
}

.pg-rating__link {
	font-size: 13px;
	font-weight: 500;
	color: inherit;
	text-decoration: none;
	opacity: 0.8;
	border-bottom: 1px solid currentColor;
}

.pg-rating__link:hover {
	opacity: 1;
}

/* wariant C — ocena wybita liczbowo */
.pg-rating--c {
	display: grid;
	grid-template-columns: auto auto;
	justify-content: center;
	align-items: center;
	gap: 2px 12px;
	text-align: left;
}

.pg-rating--c .pg-rating__big {
	grid-row: 1 / span 2;
	font-size: 38px;
	line-height: 1;
}

.pg-rating--c .pg-rating__stars {
	grid-column: 2;
}

.pg-rating--c .pg-rating__count {
	grid-column: 2;
	font-size: 13.5px;
	font-weight: 500;
	white-space: nowrap;
	opacity: 0.72;
}

/* wariant D — z cytatem */
.pg-rating--d {
	max-width: 300px;
	gap: 10px;
}

.pg-rating__quote {
	margin: 0;
	font-size: 17px;
	line-height: 1.45;
}

.pg-rating__quote::before {
	content: '\201E';
}

.pg-rating__quote::after {
	content: '\201D';
}

.pg-rating__author {
	font-size: 12.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* ---------------------------------------------------------------
   OPINIE (karuzela)

   Przewijanie robi sama przeglądarka (scroll-snap), JS tylko dokłada
   strzałki. Bez JS karuzela nadal działa — przesuwa się palcem albo
   gładzikiem, a wszystkie opinie są w HTML (liczy się to dla SEO).
   --------------------------------------------------------------- */
.pg-reviews {
	position: relative;
	display: grid;
	gap: 14px;
	color: inherit;
}

.pg-reviews__viewport {
	overflow: hidden;
}

.pg-reviews__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 2px;
}

.pg-reviews__track::-webkit-scrollbar {
	display: none;
}

.pg-review {
	position: relative;
	flex: 0 0 min(340px, 82%);
	scroll-snap-align: start;
	display: grid;
	gap: 10px;
	align-content: start;
	padding: 22px 20px;
	border: 1px solid currentColor;
	border-radius: 14px;
}

/* Ramka i tło mają być ledwo widoczne — to tło, nie treść. */
.pg-review {
	border-color: color-mix(in srgb, currentColor 18%, transparent);
	background: color-mix(in srgb, currentColor 6%, transparent);
}

.pg-review__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	opacity: 0.92;
}

.pg-review__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	font-size: 12.5px;
}

.pg-review__author {
	font-weight: 600;
}

.pg-review__author-link {
	color: inherit;
	text-decoration: none;
}

.pg-review__author-link:hover .pg-review__author {
	text-decoration: underline;
}

.pg-review__when {
	opacity: 0.65;
}

.pg-review__demo {
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.55;
}

.pg-reviews__nav {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.pg-reviews__btn {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 999px;
}

.pg-reviews__btn:hover:not(:disabled) {
	border-color: currentColor;
}

.pg-reviews__btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.pg-reviews__source {
	margin: 0;
	font-size: 13px;
}

.pg-reviews__source a {
	color: inherit;
	opacity: 0.8;
}

.pg-reviews__empty {
	margin: 0;
	padding: 12px 14px;
	font-size: 13.5px;
	border: 1px dashed color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 10px;
	opacity: 0.8;
}
