/* Review Funnel Builder — mobile-first frontend */

.rf-funnel {
	position: relative;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	overflow: hidden;
	font-family: var(--rf-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--rf-text, #1a1a1a);
	-webkit-font-smoothing: antialiased;
}

.rf-funnel .rf-bg {
	position: absolute;
	inset: 0;
	background-image: var(--rf-bg-image, none);
	background-size: cover;
	background-position: center;
}

.rf-funnel .rf-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--rf-overlay, 0.35));
}

.rf-funnel .rf-stack {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 16px 12px 24px;
}

.rf-funnel .rf-logo-bar {
	position: relative;
	z-index: 3;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px 20px;
	background: var(--rf-logo-bar-bg, transparent);
}

.rf-fullpage-wrap .rf-funnel .rf-logo-bar {
	width: 100%;
	margin-left: 0;
	flex-shrink: 0;
}

.rf-funnel .rf-logo-outer {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
}

.rf-funnel .rf-logo {
	display: block;
	max-height: var(--rf-logo-size, 72px);
	max-width: min(220px, 80vw);
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.rf-funnel .rf-card {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	background: var(--rf-card-bg, #ffffff);
	padding: 24px 18px;
	border-radius: var(--rf-radius, 12px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	text-align: left;
}

.rf-funnel .rf-loader {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: transparent;
	border-radius: inherit;
	pointer-events: none;
}

.rf-funnel .rf-loader[hidden] {
	display: none !important;
}

.rf-funnel .rf-loader-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: var(--rf-accent, #f5b301);
	border-radius: 50%;
	animation: rf-spin 0.7s linear infinite;
	background: var(--rf-card-bg, #ffffff);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.rf-funnel .rf-loader-text {
	font-size: 0.95rem;
	font-weight: 600;
	color: inherit;
	background: var(--rf-card-bg, #ffffff);
	padding: 6px 14px;
	border-radius: 20px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.rf-funnel.rf-is-loading .rf-card {
	pointer-events: none;
}

.rf-funnel.rf-is-loading .rf-card > .rf-step {
	opacity: 0.4;
	transition: opacity 0.15s ease;
}

@keyframes rf-spin {
	to { transform: rotate(360deg); }
}

.rf-funnel .rf-title {
	margin: 0 0 20px;
	font-size: 1.35rem;
	line-height: 1.35;
	font-weight: 700;
	text-align: center;
	color: inherit;
}

.rf-funnel .rf-title-sm {
	font-size: 1.2rem;
	margin-bottom: 10px;
}

.rf-funnel .rf-subtext {
	margin: 0 0 18px;
	font-size: 0.95rem;
	line-height: 1.5;
	opacity: 0.85;
	text-align: center;
}

/* Rating step — vertical options like sample */
.rf-funnel .rf-rating-fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.rf-funnel .rf-field-label {
	display: block;
	margin: 0 0 10px;
	font-size: 0.95rem;
	font-weight: 600;
	color: inherit;
}

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

.rf-funnel .rf-optional {
	font-weight: 400;
	opacity: 0.7;
	font-size: 0.88em;
}

.rf-funnel .rf-rating-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rf-funnel .rf-rating-option {
	display: block;
	cursor: pointer;
}

.rf-funnel .rf-rating-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
}

.rf-funnel .rf-rating-option-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border: 1.5px solid rgba(0, 0, 0, 0.1);
	border-radius: 10px;
	background: #fafafa;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.rf-funnel .rf-rating-stars {
	font-size: 1rem;
	line-height: 1;
	color: var(--rf-accent, #f5b301);
	letter-spacing: 1px;
	white-space: nowrap;
}

.rf-funnel .rf-rating-text {
	font-size: 0.92rem;
	color: inherit;
}

.rf-funnel .rf-rating-option:hover .rf-rating-option-inner,
.rf-funnel .rf-rating-input:focus + .rf-rating-option-inner {
	border-color: var(--rf-accent, #f5b301);
	background: #fff;
}

.rf-funnel .rf-rating-input:checked + .rf-rating-option-inner {
	border-color: var(--rf-accent, #f5b301);
	background: #fff;
	box-shadow: 0 0 0 2px rgba(245, 179, 1, 0.2);
}

/* Feedback form */
.rf-funnel .rf-field {
	margin-bottom: 16px;
}

.rf-funnel .rf-input {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	font: inherit;
	font-size: 1rem;
	color: inherit;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rf-funnel .rf-input:focus {
	outline: none;
	border-color: var(--rf-accent, #f5b301);
	box-shadow: 0 0 0 3px rgba(245, 179, 1, 0.15);
}

.rf-funnel .rf-textarea {
	min-height: 110px;
	resize: vertical;
}

.rf-funnel .rf-char-progress {
	margin-top: 6px;
	text-align: right;
	font-size: 0.8rem;
	opacity: 0.65;
}

/* Back button */
.rf-funnel .rf-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	opacity: 0.75;
	cursor: pointer;
	transition: opacity 0.15s;
}

.rf-funnel .rf-back:hover {
	opacity: 1;
}

.rf-funnel .rf-back-arrow {
	font-size: 1.1rem;
	line-height: 1;
}

.rf-funnel .rf-form-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 4px;
}

@media (min-width: 400px) {
	.rf-funnel .rf-form-actions {
		flex-direction: row;
		align-items: stretch;
	}

	.rf-funnel .rf-form-actions .rf-back-inline {
		flex: 0 0 auto;
		min-width: 100px;
		margin: 0;
		padding: 14px 16px;
		border: 1.5px solid rgba(0, 0, 0, 0.15);
		border-radius: 10px;
		background: #fff;
		opacity: 1;
		justify-content: center;
	}

	.rf-funnel .rf-form-actions .rf-submit {
		flex: 1;
		margin-top: 0;
	}
}

.rf-funnel .rf-step-feedback > .rf-back {
	display: inline-flex;
}

.rf-funnel .rf-form-actions .rf-back-inline {
	display: none;
}

@media (min-width: 400px) {
	.rf-funnel .rf-step-feedback > .rf-back {
		display: none;
	}

	.rf-funnel .rf-form-actions .rf-back-inline {
		display: inline-flex;
	}
}

.rf-funnel .rf-submit {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 14px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--rf-btn-bg, #111111);
	color: var(--rf-btn-text, #ffffff);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.1s;
}

.rf-funnel .rf-submit:hover {
	opacity: 0.92;
}

.rf-funnel .rf-submit:active {
	transform: scale(0.99);
}

.rf-funnel .rf-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.rf-funnel .rf-submit.rf-loading {
	pointer-events: none;
}

/* Success */
.rf-funnel .rf-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #00a32a;
	color: #fff;
	font-size: 28px;
	line-height: 56px;
	text-align: center;
}

.rf-funnel .rf-step-success {
	text-align: center;
	padding: 8px 0;
}

.rf-funnel .rf-step-success .rf-subtext {
	margin-bottom: 0;
}

.rf-funnel .rf-error-msg {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fcf0f1;
	color: #b32d2e;
	font-size: 0.9rem;
}

.rf-funnel .rf-error-global {
	position: relative;
	z-index: 21;
	margin-top: 0;
}

/* Full-page wrapper — background covers entire viewport */
.rf-fullpage-wrap {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	position: relative;
}

.rf-fullpage-wrap .rf-funnel {
	max-width: none;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	border-radius: 0;
}

.rf-fullpage-wrap .rf-funnel .rf-bg,
.rf-fullpage-wrap .rf-funnel .rf-overlay {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
}

.rf-fullpage-wrap .rf-funnel .rf-bg {
	z-index: 0;
}

.rf-fullpage-wrap .rf-funnel .rf-overlay {
	z-index: 1;
}

.rf-fullpage-wrap .rf-funnel .rf-stack {
	position: relative;
	z-index: 2;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: none;
	width: 100%;
	min-height: 0;
	padding: 20px 14px;
}

/* Tablet+ */
@media (min-width: 480px) {
	.rf-funnel .rf-card {
		padding: 32px 28px;
	}

	.rf-funnel .rf-title {
		font-size: 1.5rem;
	}

	.rf-funnel .rf-rating-option-inner {
		padding: 14px 16px;
	}

	.rf-fullpage-wrap .rf-funnel .rf-stack {
		padding: 32px 20px;
	}
}

@media (min-width: 768px) {
	.rf-funnel {
		max-width: 480px;
	}

	.rf-funnel .rf-card {
		max-width: 420px;
	}

	.rf-funnel .rf-logo {
		max-height: var(--rf-logo-size, 84px);
	}
}
