/* Mobile Repair Form — frontend styles */

.mrf-form {
	--mrf-accent: #d63638;
	--mrf-accent-success: #1a7d1a;
	--mrf-border: #e2e2e2;
	--mrf-border-hover: #b9b9b9;
	--mrf-text: #333333;
	--mrf-muted: #6b6b6b;
	--mrf-icon-bg: #f7b733;
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 16px 40px;
	box-sizing: border-box;
	font-size: 16px;
	color: var(--mrf-text);
}

.mrf-form *,
.mrf-form *::before,
.mrf-form *::after {
	box-sizing: border-box;
}

/* Top bar: progress indicator + language switcher */
.mrf-topbar {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 32px;
}

.mrf-lang-switch {
	display: flex;
	gap: 6px;
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}

.mrf-lang-btn {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	border: 1px solid var(--mrf-border);
	border-radius: 20px;
	padding: 5px 10px;
	cursor: pointer;
	color: var(--mrf-muted);
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.mrf-lang-btn:hover {
	border-color: var(--mrf-border-hover);
	color: var(--mrf-text);
}

.mrf-lang-active {
	border-color: var(--mrf-accent);
	color: var(--mrf-accent);
	background: #fdecea;
}

/* Progress indicator */
.mrf-indicator {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.mrf-dot {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
	transition: background-color .15s ease, color .15s ease;
}

.mrf-dot-active {
	background: var(--mrf-accent);
	color: #fff;
}

.mrf-dot-done {
	background: #f5c9c9;
	color: #7a1f1f;
}

/* Step layout */
.mrf-step {
	animation: mrf-fade-in .2s ease;
}

@keyframes mrf-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.mrf-question {
	text-align: center;
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 24px;
	color: var(--mrf-text);
}

.mrf-subheading {
	font-size: 15px;
	font-weight: 600;
	margin: 24px 0 10px;
}

.mrf-back {
	background: none;
	border: none;
	color: var(--mrf-muted);
	font-size: 14px;
	cursor: pointer;
	padding: 4px 0;
	margin-bottom: 12px;
}

.mrf-back:hover {
	color: var(--mrf-text);
}

.mrf-loading {
	text-align: center;
	color: var(--mrf-muted);
}

.mrf-error {
	color: #b32d2e;
	background: #fdecea;
	border: 1px solid #f5c2c0;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	margin-top: 14px;
}

/* Image choice cards */
.mrf-choice-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}

.mrf-choice-card {
	flex: 0 1 180px;
	max-width: 200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: #fff;
	border: 2px solid var(--mrf-border);
	border-radius: 10px;
	padding: 16px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.mrf-choice-card:hover {
	border-color: var(--mrf-border-hover);
	transform: translateY(-1px);
}

.mrf-choice-card:focus-visible {
	outline: 2px solid var(--mrf-accent);
	outline-offset: 2px;
}

.mrf-choice-image {
	display: block;
	margin-bottom: 12px;
	min-height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mrf-choice-image img {
	max-width: 100%;
	max-height: 110px;
	height: auto;
	display: block;
}

.mrf-choice-label {
	font-weight: 500;
}

/* Brand step: 5 per row on desktop, tapering down for smaller screens */
.mrf-choice-grid--brands {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	justify-content: stretch;
}

.mrf-choice-grid--brands .mrf-choice-card {
	flex: none;
	max-width: none;
	width: 100%;
}

/* Damage checklist: icon + label cards (multi-select toggle) */
.mrf-damage-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

.mrf-damage-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border: 1.5px solid var(--mrf-border);
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	font: inherit;
	text-align: left;
	color: var(--mrf-text);
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.mrf-damage-card:hover {
	border-color: var(--mrf-border-hover);
}

.mrf-damage-card:focus-visible {
	outline: 2px solid var(--mrf-accent);
	outline-offset: 2px;
}

.mrf-damage-card-selected {
	border-color: var(--mrf-accent);
	background: #fdecea;
	box-shadow: 0 0 0 1px var(--mrf-accent);
}

.mrf-damage-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--mrf-icon-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
}

.mrf-damage-label {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

/* Text inputs */
.mrf-textarea,
.mrf-field input[type="text"],
.mrf-field input[type="email"],
.mrf-field input[type="tel"] {
	width: 100%;
	font: inherit;
	padding: 12px 14px;
	border: 1px solid var(--mrf-border);
	border-radius: 8px;
	background: #fff;
	color: var(--mrf-text);
}

.mrf-textarea {
	resize: vertical;
	min-height: 90px;
}

.mrf-textarea:focus,
.mrf-field input:focus {
	outline: none;
	border-color: var(--mrf-accent);
	box-shadow: 0 0 0 1px var(--mrf-accent);
}

/* Contact field row */
.mrf-field-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

.mrf-field {
	flex: 1 1 180px;
	margin-bottom: 14px;
}

.mrf-field label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--mrf-muted);
}

.mrf-radio-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mrf-radio {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--mrf-border);
	border-radius: 8px;
	padding: 10px 16px;
	cursor: pointer;
	flex: 1 1 140px;
	justify-content: center;
}

.mrf-radio input {
	accent-color: var(--mrf-accent);
}

.mrf-radio:has(input:checked) {
	border-color: var(--mrf-accent);
	background: #fdecea;
}

/* File upload */
.mrf-upload-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.mrf-dropzone {
	display: block;
	text-align: center;
	border: 2px dashed var(--mrf-border);
	border-radius: 10px;
	padding: 28px 16px;
	cursor: pointer;
	color: var(--mrf-muted);
	transition: border-color .15s ease, background-color .15s ease;
}

.mrf-dropzone-link {
	color: var(--mrf-accent);
	font-weight: 600;
	text-decoration: underline;
}

.mrf-dropzone-active {
	border-color: var(--mrf-accent);
	background: #fdecea;
}

.mrf-hint {
	font-size: 13px;
	color: var(--mrf-muted);
	margin: 8px 0 0;
}

.mrf-upload-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.mrf-upload-thumb {
	position: relative;
	width: 84px;
	height: 84px;
}

.mrf-upload-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--mrf-border);
}

.mrf-upload-remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #333;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

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

/* Buttons */
.mrf-actions {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.mrf-btn {
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	min-height: 44px;
	padding: 12px 32px;
}

.mrf-btn-primary {
	background: var(--mrf-accent);
	color: #fff;
}

.mrf-btn-primary:hover {
	background: #b32d2e;
}

.mrf-btn-primary:disabled {
	opacity: .6;
	cursor: default;
}

/* Thank you screen */
.mrf-thankyou {
	text-align: center;
	padding: 20px 0;
}

.mrf-thankyou-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--mrf-accent-success);
	color: #fff;
	font-size: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

/* Responsive */

/* Tablet: ease the brand/damage grids down from the 5-/4-column desktop
   layout before they get cramped, ahead of the mobile breakpoint below. */
@media (max-width: 900px) and (min-width: 601px) {
	.mrf-choice-grid--brands {
		grid-template-columns: repeat(3, 1fr);
	}

	.mrf-damage-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.mrf-form {
		padding: 16px 12px 32px;
		font-size: 15px;
	}

	.mrf-topbar {
		flex-direction: column;
		gap: 10px;
	}

	.mrf-lang-switch {
		position: static;
		transform: none;
		justify-content: center;
		flex-wrap: wrap;
	}

	.mrf-question {
		font-size: 18px;
	}

	.mrf-dot {
		width: 28px;
		height: 28px;
		font-size: 13px;
	}

	.mrf-choice-card {
		flex: 0 1 44%;
		padding: 12px;
	}

	.mrf-choice-image {
		min-height: 70px;
	}

	.mrf-choice-image img {
		max-height: 80px;
	}

	/* Brands: exactly 2 per row on mobile, as requested */
	.mrf-choice-grid--brands {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Damage checklist: 2 per row on mobile */
	.mrf-damage-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.mrf-damage-card {
		padding: 10px;
		gap: 8px;
	}

	.mrf-damage-icon {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}

	.mrf-damage-label {
		font-size: 13px;
	}

	.mrf-field-row {
		flex-direction: column;
		gap: 0;
	}

	.mrf-actions {
		position: sticky;
		bottom: 0;
		background: linear-gradient(to top, #fff 70%, transparent);
		padding-top: 12px;
	}

	.mrf-btn {
		width: 100%;
	}

	.mrf-radio {
		flex: 1 1 100%;
	}
}

@media (max-width: 360px) {
	.mrf-damage-grid {
		grid-template-columns: 1fr;
	}
}
