/* Star Reviews — frontend */

.sr-widget {
	--sr-star-size: 64px;
	--sr-accent: #1a1f5c;
	--sr-selected: #3b9b3b;
	--sr-radius: 14px;
	--sr-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--sr-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--sr-duration: 320ms;
	--sr-muted: rgba(0, 0, 0, 0.5);
	font-family: inherit;
	color: inherit;
}

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

.sr-widget [hidden] {
	display: none !important;
}

/* ---------- States ---------- */

.sr-state {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity var(--sr-duration) var(--sr-ease), transform var(--sr-duration) var(--sr-ease);
}

.sr-state.is-active {
	opacity: 1;
	transform: none;
}

/* ---------- Rating prompt ---------- */

.sr-prompt {
	font-weight: 700;
	font-size: 1.05rem;
	margin-bottom: 1.25rem;
}

.sr-required {
	color: #d63638;
	margin-left: 2px;
}

/* ---------- Stars ---------- */

.sr-stars {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 20px;
	flex-wrap: nowrap;
}

.sr-star {
	appearance: none;
	background: transparent;
	border: 0;
	padding: 10px;
	margin: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	border-radius: var(--sr-radius);
	transition: transform 200ms var(--sr-ease), background-color 200ms var(--sr-ease), box-shadow 200ms var(--sr-ease);
	line-height: 1;
	min-width: 0;
	flex: 0 1 auto;
}

.sr-star:focus-visible {
	outline: 2px solid var(--sr-accent);
	outline-offset: 2px;
}

.sr-star:hover:not(.is-selected) {
	transform: translateY(-2px);
	background-color: rgba(0, 0, 0, 0.035);
}

.sr-star__inner {
	position: relative;
	width: var(--sr-star-size);
	height: var(--sr-star-size);
	display: block;
}

.sr-star__shape {
	width: 100%;
	height: 100%;
	transition: transform 200ms var(--sr-ease), opacity 200ms var(--sr-ease);
}

.sr-check {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transform: scale(0.4);
	transition: opacity 240ms var(--sr-ease-spring), transform 280ms var(--sr-ease-spring);
	fill: var(--sr-selected);
}

.sr-star.is-selected {
	background-color: #fff;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06), 0 8px 20px -10px rgba(0, 0, 0, 0.18);
}

.sr-star.is-selected .sr-star__shape {
	opacity: 0;
	transform: scale(0.4);
}

.sr-star.is-selected .sr-check {
	opacity: 1;
	transform: scale(1);
}

.sr-star__label {
	font-size: 0.95rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--sr-label-color, #222) !important;
}

.sr-star:hover .sr-star__label,
.sr-star:focus .sr-star__label,
.sr-star:active .sr-star__label,
.sr-star.is-selected .sr-star__label {
	color: var(--sr-label-color, #222) !important;
}

.sr-star.is-selected .sr-star__label {
	font-weight: 700;
}

/* ---------- Positive state (review buttons) ---------- */

.sr-positive__heading,
.sr-feedback__heading {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 1rem;
}

.sr-review-buttons {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
}

.sr-review-btn {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	max-width: 340px;
	padding: 14px 20px;
	margin: 0;
	border-radius: var(--sr-radius);
	border: 0;
	background: transparent;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	min-height: 0;
	box-sizing: border-box;
	transition: transform 200ms var(--sr-ease), box-shadow 200ms var(--sr-ease), filter 200ms var(--sr-ease);
}

button.sr-review-btn {
	font-family: inherit !important;
	padding: 14px 20px !important;
	min-height: 0 !important;
	height: auto !important;
	line-height: 1.2 !important;
	letter-spacing: inherit !important;
	text-transform: none !important;
}

.sr-review-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.03);
	box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.25);
}

.sr-review-btn:active {
	transform: translateY(0);
}

.sr-review-btn img {
	max-width: 100%;
	height: auto;
	display: block;
}

.sr-review-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.sr-review-btn__icon svg,
.sr-review-btn__icon i {
	width: 1.1em;
	height: 1.1em;
	font-size: 1.1em;
	display: block;
}

/* Icon-mode label grows alongside the icon */
.sr-review-btn--mode-icon .sr-review-btn__icon svg,
.sr-review-btn--mode-icon .sr-review-btn__icon i {
	width: 1.25em;
	height: 1.25em;
	font-size: 1.25em;
}

/* Default colored fills for text/icon modes (image mode shows the uploaded image unstyled) */

.sr-review-btn--mode-text.sr-review-btn--google,
.sr-review-btn--mode-icon.sr-review-btn--google {
	background-color: #4285f4;
	color: #fff;
}

.sr-review-btn--mode-text.sr-review-btn--facebook,
.sr-review-btn--mode-icon.sr-review-btn--facebook {
	background-color: #1b2e6b;
	color: #fff;
}

.sr-review-btn--mode-text.sr-review-btn--yelp,
.sr-review-btn--mode-icon.sr-review-btn--yelp {
	background-color: #c8342c;
	color: #fff;
}

.sr-review-buttons--primary {
	margin: 1.5rem 0;
}

/* ---------- Back link ---------- */

.sr-back {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: fit-content;
	margin-top: 1.5rem;
	margin-left: 0;
	margin-right: auto;
	background: none;
	border: 0;
	padding: 6px 2px;
	cursor: pointer;
	font: inherit;
	color: var(--sr-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 150ms var(--sr-ease), text-decoration-color 150ms var(--sr-ease);
}

.sr-back:hover,
.sr-back:focus {
	color: var(--sr-accent);
}

.sr-back--top {
	margin-top: 0;
	margin-bottom: 1rem;
}

/* ---------- Feedback intro ---------- */

.sr-feedback__intro {
	margin-bottom: 1.5rem;
}

.sr-feedback__body p {
	margin: 0 0 0.75rem;
}

/* ---------- Yelp instructions ---------- */

.sr-yelp__content {
	max-width: 560px;
}

.sr-yelp__content h1,
.sr-yelp__content h2,
.sr-yelp__content h3 {
	font-weight: 700;
}

.sr-yelp__content ol {
	padding-left: 1.25rem;
}

.sr-yelp__content ol li {
	margin: 0.4rem 0;
}

.sr-yelp__alts {
	margin-top: 2rem;
}

.sr-yelp__alts-intro {
	color: var(--sr-muted);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.sr-review-buttons--alts {
	gap: 12px;
}

/* ---------- Thank you ---------- */

.sr-thankyou {
	text-align: center;
	padding: 2rem 1rem;
}

.sr-thankyou__mark {
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	animation: sr-thanks-in 420ms var(--sr-ease-spring) both;
}

.sr-thankyou__mark .sr-check {
	position: static;
	opacity: 1;
	transform: none;
	fill: var(--sr-selected);
}

.sr-thankyou__heading {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.sr-thankyou__body {
	color: var(--sr-muted);
	max-width: 460px;
	margin: 0 auto;
}

@keyframes sr-thanks-in {
	from {
		opacity: 0;
		transform: scale(0.6);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* ---------- Editor notice ---------- */

.sr-editor-notice {
	padding: 1rem;
	background: rgba(0, 0, 0, 0.04);
	border-left: 3px solid var(--sr-accent);
	border-radius: 6px;
	font-size: 0.95rem;
}

.sr-muted {
	color: var(--sr-muted);
}

@media (max-width: 480px) {
	.sr-stars {
		gap: 4px;
	}
	.sr-star {
		padding: 4px;
	}
	.sr-star__inner {
		width: min(var(--sr-star-size), 14vw);
		height: min(var(--sr-star-size), 14vw);
	}
	.sr-star__label {
		font-size: 0.8rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sr-widget *,
	.sr-widget *::before,
	.sr-widget *::after {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
	}
}
