/**
 * RepairFlow Booking Wizard styles.
 *
 * Targets the public booking wizard views:
 * - public/views/booking-wizard/wizard.php
 * - public/views/booking-wizard/step-login.php
 * - public/views/booking-wizard/step-coverage.php
 * - public/views/booking-wizard/step-appliances.php
 * - public/views/booking-wizard/step-booking-form.php
 */

/* ---------------------------------------------
 * Base layout / container
 * ------------------------------------------ */

#repairflow-booking-wizard,
.repairflow-booking-wizard {
	box-sizing: border-box;
	max-width: 960px;
	margin: 2rem auto;
	padding: 1.5rem 2rem;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	color: #111827;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Vertical stacking for steps wrapper */
.rf-wizard-steps {
	display: block;
	margin-bottom: 1.5rem;
}

/* Individual steps: layout only; visibility is controlled via inline styles + JS */
.rf-wizard-step {
	margin-bottom: 1rem;
}

/* Navigation bar for Back / Next */
.rf-wizard-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
	gap: 0.75rem;
}

/* ---------------------------------------------
 * Step Progress Indicator
 * ------------------------------------------ */

.rf-wizard-progress {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 2rem;
	padding: 0 1rem;
}

.rf-progress-step {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 0 0 auto;
	text-align: center;
}

.rf-progress-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #e5e7eb;
	color: #6b7280;
	font-size: 1rem;
	font-weight: 600;
	border: 2px solid #e5e7eb;
	transition: all 0.3s ease;
}

.rf-progress-label {
	margin-top: 0.5rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #6b7280;
	transition: color 0.3s ease;
}

/* Active step */
.rf-progress-step.is-active .rf-progress-number {
	background-color: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.rf-progress-step.is-active .rf-progress-label {
	color: #2563eb;
	font-weight: 600;
}

/* Completed step */
.rf-progress-step.is-complete .rf-progress-number {
	background-color: #22c55e;
	border-color: #22c55e;
	color: #ffffff;
}

.rf-progress-step.is-complete .rf-progress-label {
	color: #22c55e;
}

/* Progress line (background) */
.rf-progress-line {
	position: absolute;
	top: 20px;
	left: 60px;
	right: 60px;
	height: 3px;
	background-color: #e5e7eb;
	z-index: 1;
	border-radius: 2px;
}

/* Progress line fill (animated) */
.rf-progress-line-fill {
	height: 100%;
	background-color: #22c55e;
	border-radius: 2px;
	transition: width 0.4s ease;
}

/* Step title and description */
.rf-step-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: #111827;
}

.rf-step-description {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	color: #6b7280;
}

/* Form title styling */
.rf-form-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #111827;
}

.rf-form-intro {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: #6b7280;
	line-height: 1.5;
}

/* Current user notice */
.rf-wizard-current-user {
	margin-bottom: 1.5rem;
	padding: 0.75rem 1rem;
	background-color: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	font-size: 0.9rem;
	color: #1e40af;
}

/* ---------------------------------------------
 * Auth gate (login / registration)
 * ------------------------------------------ */

/**
 * The spec uses .rf-auth-gate as an overall wrapper. The current markup
 * uses .rf-step-login, so we treat them equivalently here.
 */
.rf-auth-gate,
.rf-step-login {
	background-color: #f9fafb;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	border: 1px solid #e5e7eb;
}

/* Tab strip */
.rf-auth-tabs {
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0.25rem;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 1rem;
}

.rf-auth-tab {
	position: relative;
	flex: 1 1 0;
	padding: 0.6rem 0.75rem;
	background-color: #f3f4f6;
	border: 1px solid transparent;
	border-radius: 6px 6px 0 0;
	color: #374151;
	font-size: 0.95rem;
	font-weight: 500;
	text-align: center;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

.rf-auth-tab:not(.is-active):hover {
	background-color: #e5e7eb;
}

.rf-auth-tab.is-active {
	background-color: #ffffff;
	color: #111827;
	border-color: #e5e7eb #e5e7eb #ffffff;
}

/* Panels container */
.rf-auth-panels {
	margin-top: 0.5rem;
}

/* Individual auth panels */
.rf-auth-panel {
	background-color: #ffffff;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
}

/* ---------------------------------------------
 * Coverage section
 * ------------------------------------------ */

/**
 * The spec refers to .rf-coverage-check. The current markup uses
 * .rf-coverage-form, so we normalise the two.
 */

.rf-coverage-check,
.rf-coverage-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}

/* Put label+input and actions inline on wider screens */
.rf-coverage-form .rf-field {
	flex: 1 1 220px;
	min-width: 0;
}

.rf-coverage-form .rf-actions {
	flex: 0 0 auto;
}

/* Coverage message area with reserved height */
.rf-coverage-message {
	margin-top: 0.75rem;
	min-height: 1.75rem;
	font-size: 0.9rem;
	color: #374151;
}

/* ---------------------------------------------
 * Appliances grid
 * ------------------------------------------ */

/**
 * The spec refers to .rf-appliances-grid while the markup uses
 * .rf-appliance-grid. Style both to keep them in sync.
 */
.rf-appliance-grid,
.rf-appliances-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

/* Card styling for appliances */
.rf-appliance-card {
	position: relative;
	background-color: #ffffff;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	padding: 1rem 1.1rem;
	cursor: pointer;
	transition:
		box-shadow 0.15s ease,
		border-color 0.15s ease,
		transform 0.15s ease,
		background-color 0.15s ease;
}

.rf-appliance-card:hover {
	border-color: #60a5fa;
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
	transform: translateY(-1px);
}

/* Selected state */
.rf-appliance-card.is-selected {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2),
		0 10px 22px rgba(15, 23, 42, 0.16);
	background-color: #eff6ff;
}

/* Card typography */
.rf-appliance-card h3,
.rf-appliance-card h4 {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
}

.rf-appliance-card p {
	margin: 0.1rem 0;
	font-size: 0.9rem;
	color: #4b5563;
}

/* New appliance container spacing */
.rf-new-appliance-container {
	margin-top: 1.25rem;
}

/* ---------------------------------------------
 * Modal / booking form overlay
 * ------------------------------------------ */

/**
 * These styles are modal-ready; current implementation uses inline steps
 * but this prepares a consistent overlay for future use.
 */

.rf-wizard-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background-color: rgba(15, 23, 42, 0.45);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease;
}

/* Helper class when the modal should be visible */
.rf-wizard-modal.is-open {
	opacity: 1;
	visibility: visible;
}

/* Inner content card */
.rf-wizard-modal__content {
	max-width: 560px;
	width: 100%;
	background-color: #ffffff;
	border-radius: 10px;
	padding: 1.5rem 1.75rem;
	box-shadow: 0 22px 45px rgba(15, 23, 42, 0.35);
	transform: translateY(10px);
	transition: transform 0.2s ease;
}

/* When modal is open, slide content into place */
.rf-wizard-modal.is-open .rf-wizard-modal__content {
	transform: translateY(0);
}

/* ---------------------------------------------
 * Form utilities
 * ------------------------------------------ */

/* Group wrapper for label + control + help text */
.rf-form-group,
.rf-field {
	margin-bottom: 1rem;
}

/* Labels */
.rf-form-label,
.rf-field label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #374151;
}

/* Core control styling */
.rf-form-control,
.rf-field input[type="text"],
.rf-field input[type="email"],
.rf-field input[type="password"],
.rf-field input[type="tel"],
.rf-field input[type="date"],
.rf-field input[type="number"],
.rf-field textarea,
.rf-field select {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.5rem 0.6rem;
	border-radius: 4px;
	border: 1px solid #d1d5db;
	background-color: #ffffff;
	color: #111827;
	font-size: 0.95rem;
	line-height: 1.4;
}

/* Focus state */
.rf-form-control:focus,
.rf-field input[type="text"]:focus,
.rf-field input[type="email"]:focus,
.rf-field input[type="password"]:focus,
.rf-field input[type="tel"]:focus,
.rf-field input[type="date"]:focus,
.rf-field input[type="number"]:focus,
.rf-field textarea:focus,
.rf-field select:focus {
	outline: 2px solid rgba(37, 99, 235, 0.4);
	outline-offset: 0;
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Help text */
.rf-form-help {
	margin-top: 0.25rem;
	font-size: 0.8rem;
	color: #6b7280;
}

/* Actions row (e.g. primary/secondary buttons) */
.rf-actions {
	margin-top: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

/* Booking sections spacing */
.rf-booking-appliance-summary,
.rf-booking-fault,
.rf-booking-preferences,
.rf-booking-notes {
	margin-bottom: 1.25rem;
}

.rf-booking-appliance-summary h3,
.rf-booking-fault h3,
.rf-booking-preferences h3,
.rf-booking-notes h3 {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
}

/* ---------------------------------------------
 * Message utilities (auth / form / booking)
 * ------------------------------------------ */

.rf-form-message,
.rf-auth-message,
.rf-booking-message,
.rf-new-appliance-message,
.rf-coverage-message {
	border-radius: 4px;
	padding: 0.75rem 0.9rem;
	font-size: 0.9rem;
	line-height: 1.4;
	background-color: #f3f4f6;
	color: #374151;
}

/* Success and error variants via shared modifiers */
.rf-message--success {
	background-color: #ecfdf3;
	border: 1px solid #4ade80;
	color: #166534;
}

.rf-message--error {
	background-color: #fef2f2;
	border: 1px solid #fca5a5;
	color: #b91c1c;
}

/* ---------------------------------------------
 * Button utilities
 * ------------------------------------------ */

/**
 * Base button styles: cover both new .rf-btn* and existing .rf-button*
 * classes for backward compatibility. Also apply to wizard navigation
 * buttons to keep visuals consistent.
 */

.rf-btn,
.rf-button,
.rf-wizard-prev,
.rf-wizard-next {
	display: inline-block;
	box-sizing: border-box;
	padding: 0.55rem 1.2rem;
	border-radius: 999px;
	border: 1px solid transparent;
	background-color: #e5e7eb;
	color: #111827;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease,
		transform 0.1s ease;
}

/* Primary variant */
.rf-btn-primary,
.rf-button-primary,
.rf-wizard-next {
	background-color: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
	box-shadow: 0 8px 16px rgba(37, 99, 235, 0.28);
}

.rf-btn-primary:hover,
.rf-button-primary:hover,
.rf-wizard-next:hover {
	background-color: #1d4ed8;
	border-color: #1d4ed8;
	box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
	transform: translateY(-0.5px);
}

/* Secondary / outline variant */
.rf-btn-secondary,
.rf-button-secondary,
.rf-wizard-prev {
	background-color: #ffffff;
	border-color: #d1d5db;
	color: #111827;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.rf-btn-secondary:hover,
.rf-button-secondary:hover,
.rf-wizard-prev:hover {
	background-color: #f3f4f6;
	border-color: #9ca3af;
}

/* Link-style button */
.rf-btn-link {
	background-color: transparent;
	border-color: transparent;
	color: #2563eb;
	padding-left: 0;
	padding-right: 0;
	box-shadow: none;
}

.rf-btn-link:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* Focus states */
.rf-btn:focus,
.rf-button:focus,
.rf-wizard-prev:focus,
.rf-wizard-next:focus {
	outline: 2px solid rgba(37, 99, 235, 0.6);
	outline-offset: 2px;
}

/* Disabled state */
.rf-btn[disabled],
.rf-button[disabled],
.rf-wizard-prev[disabled],
.rf-wizard-next[disabled],
.rf-btn.is-disabled,
.rf-button.is-disabled {
	cursor: not-allowed;
	opacity: 0.6;
	box-shadow: none;
}

/* ---------------------------------------------
 * Responsive behaviour
 * ------------------------------------------ */

/* Tablet / small screens */
@media (max-width: 768px) {
	#repairflow-booking-wizard,
	.repairflow-booking-wizard {
		max-width: 100%;
		margin: 1rem auto;
		padding: 1rem 1.125rem;
		box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
	}

	.rf-auth-tabs {
		flex-wrap: wrap;
	}

	.rf-auth-tab {
		flex: 1 1 50%;
	}

	.rf-appliance-grid,
	.rf-appliances-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rf-coverage-check,
	.rf-coverage-form {
		gap: 0.5rem;
	}
}

/* Phones / very small screens */
@media (max-width: 480px) {
	#repairflow-booking-wizard,
	.repairflow-booking-wizard {
		max-width: 100%;
		margin: 0;
		border-radius: 0;
		box-shadow: none;
		padding: 1rem 0.75rem;
	}

	/* Tabs as stacked full-width buttons */
	.rf-auth-tabs {
		flex-direction: column;
		border-bottom: none;
	}

	.rf-auth-tab {
		border-radius: 6px;
		border-bottom: 1px solid #e5e7eb;
	}

	.rf-auth-tab + .rf-auth-tab {
		margin-top: 0.25rem;
	}

	/* Appliances grid single column */
	.rf-appliance-grid,
	.rf-appliances-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Coverage form stacked */
	.rf-coverage-check,
	.rf-coverage-form {
		flex-direction: column;
		align-items: stretch;
	}

	.rf-coverage-form .rf-field,
	.rf-coverage-form .rf-actions {
		flex: 1 1 auto;
		width: 100%;
	}

	.rf-coverage-form .rf-actions button {
		width: 100%;
	}

	/* Navigation buttons full width, stacked */
	.rf-wizard-navigation {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.rf-wizard-prev,
	.rf-wizard-next {
		width: 100%;
	}
}

/* ---------------------------------------------
 * Photo Upload Dropzones
 * ------------------------------------------ */

.rf-upload-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.rf-upload-header .rf-icon {
	font-size: 1.25rem;
}

.rf-badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	background-color: #e5e7eb;
	color: #6b7280;
}

.rf-badge-recommended {
	background-color: #fef3c7;
	color: #92400e;
}

.rf-upload-dropzone {
	position: relative;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	padding: 1.5rem;
	text-align: center;
	transition: border-color 0.2s ease, background-color 0.2s ease;
	cursor: pointer;
}

.rf-upload-dropzone:hover,
.rf-upload-dropzone.is-dragover {
	border-color: #2563eb;
	background-color: #eff6ff;
}

.rf-dropzone-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.rf-dropzone-icon {
	font-size: 2rem;
}

.rf-dropzone-content p {
	margin: 0;
	color: #6b7280;
	font-size: 0.9rem;
}

.rf-dropzone-buttons {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: center;
}

.rf-button-small {
	padding: 0.4rem 0.8rem;
	font-size: 0.85rem;
}

.rf-dropzone-preview {
	position: relative;
	display: inline-block;
}

.rf-dropzone-preview img {
	max-width: 100%;
	max-height: 200px;
	border-radius: 4px;
	object-fit: contain;
}

.rf-remove-photo {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	background-color: #ef4444;
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.rf-remove-photo:hover {
	background-color: #dc2626;
}

.rf-upload-help {
	margin-top: 0.5rem;
	font-size: 0.8rem;
	color: #6b7280;
}

.rf-upload-small {
	padding: 1rem;
}

.rf-upload-small .rf-dropzone-content p {
	font-size: 0.85rem;
}

/* Divider */
.rf-divider {
	display: flex;
	align-items: center;
	margin: 1.5rem 0;
	color: #9ca3af;
	font-size: 0.85rem;
}

.rf-divider::before,
.rf-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background-color: #e5e7eb;
}

.rf-divider span {
	padding: 0 1rem;
}

/* ---------------------------------------------
 * Model Toggle & Sections
 * ------------------------------------------ */

.rf-model-toggle {
	margin-bottom: 1.25rem;
}

.rf-model-toggle p {
	margin: 0 0 0.5rem;
	font-weight: 500;
}

.rf-toggle-options {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.rf-toggle-option {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
}

.rf-toggle-option input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accentColor: #2563eb;
}

/* ---------------------------------------------
 * Appliance Cards with Actions
 * ------------------------------------------ */

.rf-appliance-card {
	display: flex;
	flex-direction: column;
}

.rf-appliance-card-header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.rf-appliance-icon {
	font-size: 1.75rem;
	line-height: 1;
}

.rf-appliance-info {
	flex: 1;
	min-width: 0;
}

.rf-appliance-name {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rf-appliance-model {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rf-appliance-type {
	margin: 0;
	font-size: 0.8rem;
	color: #9ca3af;
}

.rf-appliance-last-repair {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px solid #f3f4f6;
	font-size: 0.8rem;
	color: #6b7280;
}

.rf-appliance-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid #f3f4f6;
}

.rf-appliance-action {
	flex: 1;
	padding: 0.4rem 0.5rem;
	border-radius: 4px;
	border: 1px solid #e5e7eb;
	background-color: #fff;
	color: #374151;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

.rf-appliance-action:hover {
	border-color: #d1d5db;
	background-color: #f9fafb;
}

.rf-appliance-action-book {
	background-color: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.rf-appliance-action-book:hover {
	background-color: #1d4ed8;
	border-color: #1d4ed8;
}

/* Selected card highlight */
.rf-appliance-card.is-selected .rf-appliance-action-book {
	background-color: #22c55e;
	border-color: #22c55e;
}

/* ---------------------------------------------
 * Modals
 * ------------------------------------------ */

.rf-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.rf-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
}

.rf-modal-content {
	position: relative;
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.rf-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e5e7eb;
}

.rf-modal-header h3 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

.rf-modal-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background-color: #f3f4f6;
	color: #6b7280;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.rf-modal-close:hover {
	background-color: #e5e7eb;
}

.rf-modal-body {
	padding: 1.25rem;
}

.rf-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
	border-top: 1px solid #e5e7eb;
	background-color: #f9fafb;
	border-radius: 0 0 12px 12px;
}

/* Success Modal */
.rf-success-modal .rf-modal-content {
	text-align: center;
	padding: 2rem;
}

.rf-success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background-color: #22c55e;
	color: #fff;
	font-size: 2rem;
	line-height: 64px;
}

.rf-success-modal h3 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.rf-success-message {
	margin: 0 0 1.5rem;
	color: #6b7280;
}

.rf-success-reference {
	margin-bottom: 1rem;
	padding: 1rem;
	background-color: #f3f4f6;
	border-radius: 8px;
}

.rf-success-reference .rf-label {
	display: block;
	font-size: 0.8rem;
	color: #6b7280;
	margin-bottom: 0.25rem;
}

.rf-success-reference strong {
	font-size: 1.25rem;
	color: #111827;
}

.rf-success-email {
	margin: 0 0 1.5rem;
	font-size: 0.9rem;
	color: #6b7280;
}

.rf-success-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* ---------------------------------------------
 * Fault Photos Grid
 * ------------------------------------------ */

.rf-fault-photos-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.rf-photo-slot {
	aspect-ratio: 1;
}

.rf-photo-dropzone {
	width: 100%;
	height: 100%;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.rf-photo-dropzone:hover {
	border-color: #2563eb;
	background-color: #eff6ff;
}

.rf-dropzone-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	color: #9ca3af;
	font-size: 0.8rem;
}

.rf-add-icon {
	font-size: 1.5rem;
}

.rf-dropzone-filled {
	position: relative;
	width: 100%;
	height: 100%;
}

.rf-dropzone-filled img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

/* ---------------------------------------------
 * Selected Appliance Card
 * ------------------------------------------ */

.rf-selected-appliance {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.rf-selected-appliance-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.rf-selected-appliance-header .rf-label {
	font-size: 0.8rem;
	color: #6b7280;
	text-transform: uppercase;
	font-weight: 600;
}

.rf-link-button {
	background: none;
	border: none;
	color: #2563eb;
	font-size: 0.85rem;
	cursor: pointer;
	padding: 0;
}

.rf-link-button:hover {
	text-decoration: underline;
}

.rf-selected-appliance-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.rf-selected-appliance-card .rf-appliance-icon {
	font-size: 2rem;
}

.rf-selected-appliance-card .rf-appliance-details strong {
	display: block;
	font-size: 1rem;
	color: #111827;
}

.rf-selected-appliance-card .rf-appliance-details span {
	font-size: 0.85rem;
	color: #6b7280;
}

/* ---------------------------------------------
 * Error Code Section
 * ------------------------------------------ */

.rf-error-code-toggle {
	display: flex;
	gap: 1.5rem;
	margin-top: 0.5rem;
}

/* ---------------------------------------------
 * Booking Summary (Confirm Step)
 * ------------------------------------------ */

.rf-summary-card {
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1rem 1.25rem;
}

.rf-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0.5rem 0;
}

.rf-summary-row-full {
	flex-direction: column;
	gap: 0.25rem;
}

.rf-summary-label {
	font-size: 0.85rem;
	color: #6b7280;
}

.rf-summary-value {
	font-size: 0.95rem;
	color: #111827;
	font-weight: 500;
	text-align: right;
}

.rf-summary-fault {
	text-align: left;
	margin: 0.25rem 0 0;
	font-weight: 400;
	line-height: 1.4;
}

.rf-summary-divider {
	height: 1px;
	background-color: #e5e7eb;
	margin: 0.5rem 0;
}

/* ---------------------------------------------
 * Time Slot Options
 * ------------------------------------------ */

.rf-time-options {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
}

.rf-time-option {
	flex: 1;
	min-width: 120px;
	cursor: pointer;
}

.rf-time-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rf-time-slot {
	display: block;
	padding: 0.75rem 1rem;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	text-align: center;
	transition: all 0.15s ease;
}

.rf-time-slot strong {
	display: block;
	color: #111827;
}

.rf-time-slot small {
	display: block;
	color: #6b7280;
	font-size: 0.8rem;
}

.rf-time-option input:checked + .rf-time-slot {
	border-color: #2563eb;
	background-color: #eff6ff;
}

.rf-time-option:hover .rf-time-slot {
	border-color: #2563eb;
}

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

.rf-cost-card {
	background-color: #f0fdf4;
	border: 1px solid #86efac;
	border-radius: 8px;
	padding: 1rem 1.25rem;
}

.rf-cost-row {
	display: flex;
	justify-content: space-between;
	padding: 0.4rem 0;
	font-size: 0.95rem;
}

.rf-cost-total {
	font-weight: 600;
	font-size: 1.1rem;
	color: #111827;
}

.rf-cost-total small {
	font-weight: 400;
	font-size: 0.75rem;
	color: #6b7280;
}

.rf-cost-divider {
	height: 1px;
	background-color: #86efac;
	margin: 0.5rem 0;
}

.rf-cost-note {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
	color: #166534;
}

/* ---------------------------------------------
 * Terms & Submit
 * ------------------------------------------ */

.rf-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	cursor: pointer;
}

.rf-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accentColor: #2563eb;
}

.rf-submit-section {
	margin-top: 1.5rem;
}

.rf-button-large {
	width: 100%;
	padding: 0.9rem 1.5rem;
	font-size: 1.1rem;
}

.rf-button-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.rf-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rf-spin 0.8s linear infinite;
}

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

/* ---------------------------------------------
 * Section Titles
 * ------------------------------------------ */

.rf-section-title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: #111827;
}

.rf-section-intro {
	margin: 0 0 1rem;
	color: #6b7280;
	font-size: 0.9rem;
}

/* ---------------------------------------------
 * Outline Button Variant
 * ------------------------------------------ */

.rf-button-outline {
	background-color: #fff;
	border: 2px dashed #d1d5db;
	color: #6b7280;
	width: 100%;
	padding: 1rem;
}

.rf-button-outline:hover {
	border-color: #2563eb;
	color: #2563eb;
	background-color: #eff6ff;
}

.rf-button-outline .rf-icon {
	margin-right: 0.5rem;
}

/* ---------------------------------------------
 * Form Actions Row
 * ------------------------------------------ */

.rf-form-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1.5rem;
	justify-content: flex-end;
}

/* ---------------------------------------------
 * Field Help Text
 * ------------------------------------------ */

.rf-field-help {
	margin-top: 0.25rem;
	font-size: 0.8rem;
	color: #6b7280;
}

/* Required indicator */
.rf-required {
	color: #ef4444;
}

/* ---------------------------------------------
 * Appliance Help Accordion
 * ------------------------------------------ */

.rf-appliance-help {
	margin-top: 1.5rem;
}

.rf-appliance-help details {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.rf-appliance-help summary {
	padding: 0.75rem 1rem;
	background-color: #f9fafb;
	cursor: pointer;
	font-weight: 500;
	font-size: 0.9rem;
}

.rf-appliance-help summary:hover {
	background-color: #f3f4f6;
}

.rf-help-content {
	padding: 1rem;
}

.rf-help-content p {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: #4b5563;
}

.rf-help-content ul {
	margin: 0;
	padding-left: 1.25rem;
}

.rf-help-content li {
	margin-bottom: 0.4rem;
	font-size: 0.85rem;
	color: #4b5563;
}

/* ---------------------------------------------
 * Repair History in Modal
 * ------------------------------------------ */

.rf-history-item {
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 0.75rem;
}

.rf-history-item:last-child {
	margin-bottom: 0;
}

.rf-history-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.5rem;
}

.rf-history-ref {
	font-weight: 600;
	color: #111827;
}

.rf-history-date {
	font-size: 0.8rem;
	color: #6b7280;
}

.rf-history-status {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
}

.rf-history-status-completed {
	background-color: #dcfce7;
	color: #166534;
}

.rf-history-status-pending {
	background-color: #fef3c7;
	color: #92400e;
}

.rf-history-fault {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	color: #4b5563;
}

.rf-history-resolution {
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	color: #6b7280;
}

.rf-no-history {
	text-align: center;
	padding: 2rem;
	color: #9ca3af;
}

/* ---------------------------------------------
 * Responsive Additions
 * ------------------------------------------ */

@media (max-width: 480px) {
	.rf-fault-photos-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.5rem;
	}

	.rf-time-options {
		flex-direction: column;
	}

	.rf-time-option {
		min-width: 100%;
	}

	.rf-form-actions {
		flex-direction: column;
	}

	.rf-form-actions .rf-button {
		width: 100%;
	}

	.rf-success-actions {
		flex-direction: column;
	}

	.rf-success-actions .rf-button {
		width: 100%;
	}

	/* Progress indicator compact */
	.rf-wizard-progress {
		padding: 0;
	}

	.rf-progress-number {
		width: 32px;
		height: 32px;
		font-size: 0.85rem;
	}

	.rf-progress-label {
		font-size: 0.7rem;
	}

	.rf-progress-line {
		top: 16px;
		left: 40px;
		right: 40px;
	}
}