/**
 * RepairFlow public (frontend) styles for the intake wizard and status portal.
 * Neutral, theme-friendly, and self-contained under .rf-fe.
 */

.rf-fe {
	--rf-accent: #d9791f;
	--rf-ink: #1d2327;
	--rf-muted: #6b7280;
	--rf-line: #e3e0da;
	--rf-card: #ffffff;
	--rf-soft: #f7f5f2;
	--rf-ok: #2f9e6f;
	--rf-radius: 10px;

	max-width: 640px;
	margin: 0 auto;
	color: var(--rf-ink);
	font-size: 16px;
	line-height: 1.55;
}

.rf-fe * {
	box-sizing: border-box;
}

.rf-fe__row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.rf-fe__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 160px;
	margin-bottom: 14px;
}

.rf-fe__field > span {
	font-size: 13px;
	font-weight: 600;
	color: var(--rf-muted);
}

.rf-fe__field input,
.rf-fe__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--rf-line);
	border-radius: 8px;
	font: inherit;
	color: inherit;
	background: var(--rf-card);
}

.rf-fe__field input:focus,
.rf-fe__field textarea:focus {
	outline: 2px solid var(--rf-accent);
	outline-offset: 1px;
	border-color: var(--rf-accent);
}

.rf-fe__subhead {
	font-size: 15px;
	margin: 8px 0 10px;
}

.rf-fe__btn {
	display: inline-block;
	padding: 11px 18px;
	background: var(--rf-accent);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.rf-fe__btn:hover {
	filter: brightness( 0.95 );
}

.rf-fe__btn--ghost {
	background: transparent;
	color: var(--rf-accent);
	border: 1px dashed var(--rf-accent);
	margin-bottom: 16px;
}

.rf-fe__btn--small {
	padding: 5px 12px;
	font-size: 13px;
	background: var(--rf-soft);
	color: var(--rf-ink);
	border: 1px solid var(--rf-line);
}

.rf-fe__btn--small.is-active {
	background: var(--rf-accent);
	color: #fff;
	border-color: var(--rf-accent);
}

.rf-fe__link {
	background: none;
	border: 0;
	color: #b32d2e;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.rf-fe__msg {
	margin-top: 10px;
	color: #b32d2e;
	min-height: 1.2em;
}

/* intake */
.rf-intake__device {
	background: var(--rf-soft);
	border: 1px solid var(--rf-line);
	border-radius: var(--rf-radius);
	padding: 14px 14px 6px;
	margin-bottom: 12px;
}

.rf-intake__done {
	text-align: center;
	padding: 24px;
	border: 1px solid var(--rf-line);
	border-radius: var(--rf-radius);
	background: var(--rf-soft);
}

.rf-intake__code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--rf-accent);
}

/* portal */
.rf-portal__result {
	margin-top: 20px;
	border: 1px solid var(--rf-line);
	border-radius: var(--rf-radius);
	overflow: hidden;
}

.rf-portal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: var(--rf-soft);
	border-bottom: 1px solid var(--rf-line);
}

.rf-portal__header h3 {
	margin: 0;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.rf-portal__status {
	background: var(--rf-accent);
	color: #fff;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.rf-portal__section {
	padding: 16px 18px;
	border-bottom: 1px solid var(--rf-line);
}

.rf-portal__section:last-child {
	border-bottom: 0;
}

.rf-portal__section h4 {
	margin: 0 0 10px;
	font-size: 14px;
}

.rf-portal__hint {
	color: var(--rf-muted);
	font-size: 13px;
	margin: 0 0 12px;
}

.rf-portal__devices,
.rf-portal__lines,
.rf-portal__timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rf-portal__devices li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px dashed var(--rf-line);
}

.rf-portal__chip {
	background: var(--rf-soft);
	border: 1px solid var(--rf-line);
	border-radius: 6px;
	padding: 2px 9px;
	font-size: 12px;
	color: var(--rf-muted);
}

.rf-portal__line {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 0;
	border-bottom: 1px dashed var(--rf-line);
}

.rf-portal__line > div:first-child {
	flex: 1 1 200px;
}

.rf-portal__line p {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--rf-muted);
}

.rf-portal__price {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.rf-portal__line--declined {
	opacity: 0.55;
}

.rf-portal__decide {
	display: flex;
	gap: 6px;
}

.rf-portal__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 14px 0;
	font-size: 18px;
}

.rf-portal__total strong {
	font-variant-numeric: tabular-nums;
	color: var(--rf-accent);
}

.rf-portal__timeline li {
	position: relative;
	padding: 0 0 10px 16px;
	color: var(--rf-ink);
	font-size: 14px;
}

.rf-portal__timeline li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 7px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--rf-accent);
}

/* Visual Progress Stepper */
.rf-portal__stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 20px 0 24px;
	padding: 12px 6px;
	background: var(--rf-card);
	border: 1px solid var(--rf-line);
	border-radius: 10px;
	overflow-x: auto;
}

.rf-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	min-width: 60px;
}

.rf-step__node {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #64748b;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.rf-step__check {
	display: none;
}

.rf-step__label {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	white-space: nowrap;
}

.rf-step.is-completed .rf-step__node {
	background: #1e8e3e;
	color: #fff;
}

.rf-step.is-completed .rf-step__num {
	display: none;
}

.rf-step.is-completed .rf-step__check {
	display: inline;
}

.rf-step.is-completed .rf-step__label {
	color: #1e8e3e;
}

.rf-step.is-active .rf-step__node {
	background: var(--rf-accent, #1a73e8);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.25);
	transform: scale(1.1);
}

.rf-step.is-active .rf-step__label {
	color: var(--rf-accent, #1a73e8);
	font-weight: 700;
}

.rf-step__track {
	flex: 1;
	height: 3px;
	background: #e2e8f0;
	margin: 0 4px 18px;
	min-width: 14px;
	transition: background 0.2s ease;
}

.rf-step__track.is-completed {
	background: #1e8e3e;
}

/* Direct Pay Banner */
.rf-portal__pay-banner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 10px;
	padding: 14px 18px;
	margin: 18px 0;
	flex-wrap: wrap;
	gap: 12px;
}

.rf-portal__pay-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rf-portal__pay-icon {
	font-size: 28px;
}

.rf-portal__pay-title {
	display: block;
	font-size: 15px;
	color: #065f46;
}

.rf-portal__pay-desc {
	font-size: 13px;
	color: #047857;
}

.rf-fe__btn--pay {
	background: #059669;
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
	display: inline-block;
}

.rf-fe__btn--pay:hover {
	background: #047857;
	color: #fff;
}

/* Customer-Visible Photos */
.rf-portal__photos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
	margin-top: 10px;
}

.rf-portal__photo-item {
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--rf-line);
	background: var(--rf-card);
}

.rf-portal__photo-item a {
	display: block;
	overflow: hidden;
}

.rf-portal__photo-item img {
	width: 100%;
	height: 110px;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.rf-portal__photo-item:hover img {
	transform: scale(1.05);
}

.rf-portal__photo-caption {
	padding: 6px 8px;
	font-size: 11px;
}

.rf-portal__photo-kind {
	font-weight: 700;
	color: var(--rf-ink);
	display: block;
}

.rf-portal__photo-note {
	color: var(--rf-muted);
	font-size: 10px;
	display: block;
	margin-top: 2px;
}

@media ( max-width: 480px ) {
	.rf-fe__row {
		flex-direction: column;
		gap: 0;
	}

	.rf-portal__stepper {
		padding: 10px 4px;
	}

	.rf-step__label {
		font-size: 9px;
	}

	.rf-step__node {
		width: 26px;
		height: 26px;
		font-size: 11px;
	}

	.rf-portal__pay-banner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.rf-portal__pay-info {
		flex-direction: column;
	}
}
