/* ==========================================================================
   Mega Chilipir – Recenzii
   Folosește token-urile temei copil (--mcc-*), cu valori de rezervă identice.
   Bara: marquee doar cu transform: translateX (CSS), mask-image pe margini,
   pauză la hover / focus / atingere, scroll manual cu scroll-snap la mișcare redusă.
   ========================================================================== */

.mcr-section {
	--mcr-card-w: 340px;
	--mcr-gap: 20px;
	--mcr-fade: clamp(24px, 8vw, 120px);
	background: var(--mcc-surface, #f5f5f5);
	overflow: hidden; /* umbra cardurilor nu creează scroll orizontal */
}

.mcr-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* ---------- Stele (rând gri + rând galben decupat ⇒ jumătăți) ---------- */

.mcr-stars {
	position: relative;
	display: inline-flex;
	flex: none;
	line-height: 0;
	vertical-align: middle;
}

.mcr-stars__base,
.mcr-stars__fill {
	display: inline-flex;
	gap: var(--mcr-star-gap, 2px);
	white-space: nowrap;
}

.mcr-stars__base {
	color: var(--mcc-line-strong, rgba(17, 17, 17, .16));
}

.mcr-stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	color: var(--mcc-yellow, #ffc800);
}

.mcr-stars svg {
	flex: none;
	fill: currentColor;
}

/* ---------- Antet: media generală ---------- */

.mcr-summary {
	display: flex;
	align-items: center;
	gap: var(--mcc-s-3, 12px);
}

.mcr-summary__text {
	margin: 0;
	color: var(--mcc-text-muted, #6b6b6b);
	font-size: 15px;
	line-height: 1.3;
}

.mcr-summary__text strong {
	color: var(--mcc-ink, #111);
	font-family: var(--mcc-font-serif, Georgia, 'Times New Roman', serif);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.02em;
}

.mcr-head-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

/* Notă de transparență (voucher pentru recenzii) – discretă */
.mcr-transparency {
	max-width: 720px;
	margin: var(--mcc-s-5, 24px) 0 0;
	color: var(--mcc-text-subtle, #8d8d86);
	font-size: 12.5px;
	line-height: 1.55;
}

.mcr-form-wrap .mcr-transparency {
	margin-top: var(--mcc-s-4, 16px);
}

@media (max-width: 767px) {
	.mcr-head-side {
		align-items: flex-start;
	}
}

/* ---------- Banda ---------- */

.mcr-marquee {
	position: relative;
	/* loc pentru ridicarea + umbra cardului la hover (masca taie tot ce iese din cutie) */
	margin-block: -8px -32px;
	outline: none;
}

.mcr-marquee:focus-visible {
	box-shadow: inset 0 0 0 2px var(--mcc-ink, #111);
	border-radius: var(--mcc-r-md, 14px);
}

.mcr-rail {
	display: flex;
	padding-block: 8px 32px;
}

.mcr-set {
	display: flex;
	flex: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcr-item {
	display: flex;
	flex: none;
	width: calc(var(--mcr-card-w) + var(--mcr-gap));
	padding-right: var(--mcr-gap); /* spațiu inclus în lățimea setului ⇒ buclă fără „gol” */
	margin: 0;
}

/* Fără JS / înainte de inițializare / mișcare redusă: scroll orizontal manual cu snap */
.mcr-marquee:not(.is-running):not(.is-static) .mcr-rail {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--mcc-gutter, 24px);
	padding-inline: var(--mcc-gutter, 24px);
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.mcr-marquee:not(.is-running):not(.is-static) .mcr-item {
	scroll-snap-align: start;
}

/* Puține recenzii: încap toate ⇒ fără derulare, centrate */
.mcr-marquee.is-static .mcr-rail {
	justify-content: center;
	padding-inline: var(--mcc-gutter, 24px);
}

.mcr-marquee.is-static .mcr-item:last-child {
	width: var(--mcr-card-w);
	padding-right: 0;
}

/* Derulare continuă */
.mcr-marquee.is-running {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--mcr-fade), #000 calc(100% - var(--mcr-fade)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--mcr-fade), #000 calc(100% - var(--mcr-fade)), transparent 100%);
}

.mcr-marquee.is-running .mcr-rail {
	width: max-content;
	animation: mcr-scroll var(--mcr-duration, 60s) linear infinite;
	will-change: transform;
}

@keyframes mcr-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); } /* rail = 2 seturi identice ⇒ -50% = exact un set */
}

/* Pauză: hover (dispozitive cu mouse), focus (tastatură), atingere (clasa din JS), în afara ecranului */
@media (hover: hover) and (pointer: fine) {
	.mcr-marquee.is-running:hover .mcr-rail {
		animation-play-state: paused;
	}
}

/* doar focus din tastatură (:focus-visible) – un tap/click nu trebuie să lase banda oprită */
.mcr-marquee.is-running:focus-visible .mcr-rail,
.mcr-marquee.is-running.is-paused .mcr-rail,
.mcr-marquee.is-running.is-offscreen .mcr-rail {
	animation-play-state: paused;
}

/* ---------- Card ---------- */

.mcr-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--mcc-s-4, 16px);
	width: 100%;
	padding: var(--mcc-s-5, 24px);
	border: 1px solid var(--mcc-line, rgba(17, 17, 17, .08));
	border-radius: var(--mcc-card-r, var(--mcc-r-lg, 20px));
	background: var(--mcc-white, #fff);
	box-shadow: var(--mcc-shadow-sm, 0 1px 2px rgba(17, 17, 17, .04), 0 1px 1px rgba(17, 17, 17, .03));
	color: var(--mcc-ink, #111);
	transition: transform var(--mcc-transition, 300ms cubic-bezier(.2, .8, .2, 1)), box-shadow var(--mcc-transition, 300ms cubic-bezier(.2, .8, .2, 1));
}

/* Ghilimele decorative serif, mari și discrete */
.mcr-card::before {
	content: "\201D";
	position: absolute;
	top: 6px;
	right: 18px;
	color: var(--mcc-yellow, #ffc800);
	font-family: var(--mcc-font-serif, Georgia, 'Times New Roman', serif);
	font-size: 88px;
	font-weight: 700;
	line-height: 1;
	opacity: .22;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.mcr-card:hover {
		transform: translateY(-4px);
		box-shadow: var(--mcc-shadow-lg, 0 2px 6px rgba(17, 17, 17, .04), 0 24px 48px -20px rgba(17, 17, 17, .28));
	}
}

.mcr-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mcc-s-2, 8px) var(--mcc-s-3, 12px);
	padding-right: 44px; /* nu se suprapune cu ghilimelele */
}

.mcr-card__text {
	display: -webkit-box;
	flex: 1;
	margin: 0;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.6;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow-wrap: anywhere;
}

.mcr-card__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding-top: var(--mcc-s-4, 16px);
	border-top: 1px solid var(--mcc-border, #ececec);
	font-size: 13px;
	line-height: 1.4;
}

.mcr-card__who {
	display: flex;
	align-items: baseline;
	gap: 6px;
	max-width: 100%;
	min-width: 0;
	white-space: nowrap;
}

.mcr-card__name,
.mcr-card__city {
	overflow: hidden;
	text-overflow: ellipsis;
}

.mcr-card__city {
	min-width: 0;
}

.mcr-card__name {
	flex: 0 1 auto;
	min-width: 0;
	font-weight: 700;
}

.mcr-card__city {
	color: var(--mcc-text-muted, #6b6b6b);
}

.mcr-card__city::before {
	content: "·";
	margin-right: 6px;
}

.mcr-card__date {
	color: var(--mcc-text-subtle, #8d8d86);
	white-space: nowrap;
}

/* ---------- Badge-uri ---------- */

.mcr-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: var(--mcc-r-pill, 999px);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.3;
	white-space: nowrap;
}

.mcr-badge--verified {
	background: var(--mcc-ink, #111);
	color: var(--mcc-white, #fff);
}

.mcr-badge--verified svg {
	fill: none;
	stroke: var(--mcc-yellow, #ffc800);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mcr-badge--demo {
	border: 1px dashed var(--mcc-line-strong, rgba(17, 17, 17, .16));
	color: var(--mcc-text-muted, #6b6b6b);
	text-transform: uppercase;
}

/* ---------- Mobil ---------- */

@media (max-width: 767px) {
	.mcr-section {
		--mcr-card-w: 280px;
		--mcr-gap: 14px;
	}

	.mcr-card {
		padding: var(--mcc-s-4, 16px) 18px;
	}

	.mcr-card::before {
		font-size: 72px;
	}

	.mcr-summary__text strong {
		font-size: 20px;
	}
}

/* ---------- Mișcare redusă: fără derulare automată, fără ridicare ---------- */

@media (prefers-reduced-motion: reduce) {
	.mcr-marquee.is-running .mcr-rail {
		animation: none;
	}

	.mcr-card {
		transition: none;
	}

	.mcr-card:hover {
		transform: none;
	}
}

/* ==========================================================================
   Formular [mc_review_form]
   ========================================================================== */

.mcr-form-wrap {
	max-width: 720px;
	margin-inline: auto;
}

.mcr-form {
	display: grid;
	gap: var(--mcc-s-5, 24px);
	padding: clamp(20px, 4vw, 40px);
	border: 1px solid var(--mcc-line, rgba(17, 17, 17, .08));
	border-radius: var(--mcc-card-r, var(--mcc-r-lg, 20px));
	background: var(--mcc-white, #fff);
	box-shadow: var(--mcc-shadow-md, 0 2px 4px rgba(17, 17, 17, .03), 0 12px 28px -14px rgba(17, 17, 17, .2));
}

.mcr-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--mcc-s-4, 16px);
}

.mcr-field {
	display: grid;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.mcr-field__label {
	padding: 0;
	color: var(--mcc-ink, #111);
	font-size: 14px;
	font-weight: 700;
}

.mcr-req {
	color: var(--mcc-ink, #111);
}

.mcr-opt,
.mcr-field__help {
	color: var(--mcc-text-muted, #6b6b6b);
	font-size: 13px;
	font-weight: 400;
}

.mcr-form input[type="text"],
.mcr-form input[type="email"],
.mcr-form textarea {
	width: 100%;
	min-height: var(--mcc-field-h, 46px);
	padding: 11px 14px;
	border: 1px solid var(--mcc-line-strong, rgba(17, 17, 17, .16));
	border-radius: var(--mcc-r-sm, 8px);
	background: var(--mcc-white, #fff);
	color: var(--mcc-ink, #111);
	font: inherit;
	font-size: 15px;
	transition: border-color var(--mcc-transition, 300ms ease), box-shadow var(--mcc-transition, 300ms ease);
}

.mcr-form textarea {
	min-height: 140px;
	resize: vertical;
}

.mcr-form input:focus,
.mcr-form textarea:focus {
	border-color: var(--mcc-ink, #111);
	outline: none;
	box-shadow: 0 0 0 3px var(--mcc-yellow-soft, rgba(255, 200, 0, .16));
}

.mcr-form input[readonly] {
	background: var(--mcc-surface, #f5f5f5);
}

.mcr-form [aria-invalid="true"] {
	border-color: #c62828;
}

.mcr-field__error {
	margin: 0;
	color: #c62828;
	font-size: 13px;
}

/* Selector de stele: radio-uri (accesibile din tastatură), ordine inversă ⇒ hover colorează și stelele din stânga */
.mcr-stars-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.mcr-stars-input input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.mcr-stars-input label {
	display: inline-flex;
	padding: 2px;
	border-radius: var(--mcc-r-sm, 8px);
	color: var(--mcc-line-strong, rgba(17, 17, 17, .16));
	cursor: pointer;
	transition: color 150ms ease, transform 150ms ease;
}

.mcr-stars-input svg {
	width: 34px;
	height: 34px;
	fill: currentColor;
}

.mcr-stars-input input:checked ~ label {
	color: var(--mcc-yellow, #ffc800);
}

/* La hover se previzualizează nota de sub cursor (în locul celei alese) */
.mcr-stars-input:hover input:checked ~ label {
	color: var(--mcc-line-strong, rgba(17, 17, 17, .16));
}

.mcr-stars-input:hover input ~ label:hover,
.mcr-stars-input:hover input ~ label:hover ~ label {
	color: var(--mcc-yellow, #ffc800);
}

.mcr-stars-input label:hover {
	transform: scale(1.08);
}

.mcr-stars-input input:focus-visible + label {
	box-shadow: var(--mcc-focus-ring, 0 0 0 2px #fff, 0 0 0 4px #111);
}

.mcr-stars-input__hint {
	min-height: 1.3em;
	color: var(--mcc-text-muted, #6b6b6b);
	font-size: 13px;
}

.mcr-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.mcr-field--check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--mcc-ink, #111);
}

.mcr-field--check a {
	text-decoration: underline;
}

.mcr-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--mcc-s-3, 12px) var(--mcc-s-4, 16px);
	margin: 0;
}

.mcr-actions__note {
	color: var(--mcc-text-muted, #6b6b6b);
	font-size: 13px;
}

.mcr-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mcr-notice {
	margin: 0 0 var(--mcc-s-4, 16px);
	padding: 14px 18px;
	border-radius: var(--mcc-r-md, 14px);
	font-size: 15px;
	line-height: 1.5;
}

.mcr-notice--ok {
	border-left: 4px solid var(--mcc-yellow, #ffc800);
	background: var(--mcc-surface, #f5f5f5);
}

.mcr-notice--info {
	background: var(--mcc-surface, #f5f5f5);
}

.mcr-notice--error {
	border-left: 4px solid #c62828;
	background: #fdecea;
}

@media (max-width: 600px) {
	.mcr-row {
		grid-template-columns: 1fr;
	}

	.mcr-stars-input svg {
		width: 38px;
		height: 38px;
	}
}
