/**
 * Modern Wizard UI - Spare Parts Order Form
 *
 * Clean, modern design matching Gemini mockups
 *
 * @package GSAuto
 * @since 2.0.0
 */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
	--primary-color: #2563EB;
	--primary-hover: #1D4ED8;
	--secondary-color: #E5E7EB;
	--danger-color: #EF4444;
	--success-color: #10B981;
	--text-primary: #1F2937;
	--text-secondary: #6B7280;
	--border-color: #D1D5DB;
	--background: #F9FAFB;
	--card-background: #FFFFFF;
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;
	--radius-full: 9999px;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   WIZARD CONTAINER
   ============================================ */

.gsauto-wizard-container {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 20px;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */

.gsauto-wizard-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 40px;
	padding: 20px;
	background: var(--card-background);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.gsauto-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.gsauto-step .step-number {
	width: 40px;
	height: 40px;
	border-radius: var(--radius-full);
	background: var(--secondary-color);
	color: var(--text-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 16px;
	transition: all 0.3s ease;
}

.gsauto-step .step-label {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-secondary);
	transition: all 0.3s ease;
}

.gsauto-step.active .step-number {
	background: var(--primary-color);
	color: white;
	transform: scale(1.1);
}

.gsauto-step.active .step-label {
	color: var(--primary-color);
	font-weight: 600;
}

.gsauto-step.completed .step-number {
	background: var(--success-color);
	color: white;
}

.gsauto-step.completed .step-label {
	color: var(--success-color);
}

.gsauto-step-divider {
	width: 60px;
	height: 2px;
	background: var(--secondary-color);
	margin: 0 10px;
	margin-bottom: 28px;
}

/* ============================================
   CARD DESIGN
   ============================================ */

.gsauto-card {
	background: var(--card-background);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 32px;
	margin-bottom: 20px;
}

.gsauto-card-header {
	margin-bottom: 24px;
}

.gsauto-card-header h2 {
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
	margin: 0 0 8px 0;
}

.gsauto-card-header .subtitle {
	font-size: 14px;
	color: var(--text-secondary);
	margin: 0;
}

/* ============================================
   MODERN BUTTONS
   ============================================ */

.gsauto-btn-primary {
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gsauto-btn-primary:hover:not(:disabled) {
	background: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.gsauto-btn-primary:disabled {
	background: var(--secondary-color);
	color: var(--text-secondary);
	cursor: not-allowed;
}

.gsauto-btn-primary.gsauto-btn-large {
	padding: 16px 32px;
	font-size: 15px;
}

.gsauto-btn-secondary {
	background: white;
	color: var(--text-primary);
	border: 2px solid var(--border-color);
	padding: 12px 24px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gsauto-btn-secondary:hover {
	background: var(--background);
	border-color: var(--text-secondary);
}

.gsauto-btn-location {
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: var(--radius-md);
	font-weight: 600;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gsauto-btn-location:hover {
	background: var(--primary-hover);
}

/* ============================================
   MODERN TABLE
   ============================================ */

.gsauto-parts-list {
	margin: 24px 0;
}

.gsauto-modern-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border-color);
}

.gsauto-modern-table thead {
	background: var(--background);
}

.gsauto-modern-table th {
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 11px;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--border-color);
}

.gsauto-modern-table td {
	padding: 16px;
	border-bottom: 1px solid var(--border-color);
	color: var(--text-primary);
	font-size: 14px;
}

.gsauto-modern-table tbody tr:last-child td {
	border-bottom: none;
}

.gsauto-modern-table tbody tr:hover {
	background: var(--background);
}

.gsauto-modern-table .part-actions {
	display: flex;
	gap: 8px;
}

.gsauto-btn-edit,
.gsauto-btn-delete {
	padding: 6px 16px;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 12px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.gsauto-btn-edit {
	background: var(--primary-color);
	color: white;
}

.gsauto-btn-edit:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
}

.gsauto-btn-delete {
	background: var(--danger-color);
	color: white;
}

.gsauto-btn-delete:hover {
	background: #DC2626;
	transform: translateY(-1px);
}

.gsauto-image-count {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--text-secondary);
	font-size: 13px;
}

.gsauto-image-count svg {
	width: 14px;
	height: 14px;
}

/* ============================================
   MODERN FORM INPUTS
   ============================================ */

.gsauto-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}

.gsauto-form-field {
	margin-bottom: 16px;
}

.gsauto-form-field label {
	display: block;
	font-weight: 500;
	font-size: 14px;
	color: var(--text-primary);
	margin-bottom: 8px;
}

.gsauto-form-field .required {
	color: var(--danger-color);
}

.gsauto-form-field .optional {
	color: var(--text-secondary);
	font-weight: 400;
	font-size: 13px;
}

.gsauto-modern-input,
.gsauto-modern-select,
.gsauto-modern-textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--border-color);
	border-radius: var(--radius-md);
	font-size: 14px;
	color: var(--text-primary);
	background: white;
	transition: all 0.2s ease;
	font-family: inherit;
}

.gsauto-modern-input:focus,
.gsauto-modern-select:focus,
.gsauto-modern-textarea:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gsauto-modern-select:disabled,
.gsauto-modern-input:disabled {
	background: var(--background);
	color: var(--text-secondary);
	cursor: not-allowed;
}

.gsauto-modern-textarea {
	resize: vertical;
	min-height: 80px;
}

.gsauto-checkbox-modern {
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.gsauto-checkbox-modern input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	accent-color: var(--primary-color);
}

.gsauto-checkbox-modern span {
	font-size: 14px;
	color: var(--text-primary);
}

.gsauto-file-input-v2 {
	width: 100%;
	padding: 10px;
	border: 2px dashed var(--border-color);
	border-radius: var(--radius-md);
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s ease;
}

.gsauto-file-input-v2:hover {
	border-color: var(--primary-color);
	background: var(--background);
}

.gsauto-image-preview-v2 {
	display: flex;
	gap: 12px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.gsauto-image-preview-item-v2 {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 2px solid var(--border-color);
}

.gsauto-image-preview-item-v2 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gsauto-remove-image-v2 {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 24px;
	height: 24px;
	border-radius: var(--radius-full);
	background: var(--danger-color);
	color: white;
	border: 2px solid white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	font-weight: bold;
	transition: all 0.2s ease;
}

.gsauto-remove-image-v2:hover {
	background: #DC2626;
	transform: scale(1.1);
}

/* ============================================
   WIZARD ACTIONS
   ============================================ */

.gsauto-wizard-actions {
	margin-top: 32px;
	display: flex;
	gap: 12px;
	justify-content: flex-end;
}

/* ============================================
   MODERN MODAL
   ============================================ */

.gsauto-modern-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.gsauto-modal-overlay-v2 {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.gsauto-modal-content-v2 {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	background: white;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	overflow-y: auto;
	z-index: 10000;
	animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gsauto-modal-header-v2 {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 28px;
	border-bottom: 1px solid var(--border-color);
	position: sticky;
	top: 0;
	background: white;
	z-index: 10;
}

.gsauto-modal-header-v2 h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--text-primary);
}

.gsauto-modal-close-v2 {
	width: 32px;
	height: 32px;
	border-radius: var(--radius-md);
	background: none;
	border: none;
	font-size: 24px;
	color: var(--text-secondary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.gsauto-modal-close-v2:hover {
	background: var(--background);
	color: var(--text-primary);
}

.gsauto-modal-body-v2 {
	padding: 24px 28px;
}

.gsauto-modal-actions-v2 {
	padding: 20px 28px;
	border-top: 1px solid var(--border-color);
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	position: sticky;
	bottom: 0;
	background: white;
}

/* ============================================
   REVIEW SECTION
   ============================================ */

.gsauto-review-section {
	margin-bottom: 24px;
	padding: 20px;
	background: var(--background);
	border-radius: var(--radius-md);
}

.gsauto-review-section h3 {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0 0 16px 0;
}

.gsauto-review-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gsauto-review-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 16px;
	background: white;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
}

.gsauto-review-item .label {
	font-weight: 500;
	color: var(--text-secondary);
	font-size: 13px;
}

.gsauto-review-item .value {
	font-weight: 600;
	color: var(--text-primary);
	font-size: 14px;
	text-align: right;
}

/* ============================================
   SUCCESS SCREEN
   ============================================ */

.gsauto-success-card {
	text-align: center;
	padding: 60px 40px;
}

.gsauto-success-icon {
	margin: 0 auto 24px;
	width: 80px;
	height: 80px;
	border-radius: var(--radius-full);
	background: var(--success-color);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: successPulse 0.6s ease;
}

@keyframes successPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

.gsauto-success-card h2 {
	font-size: 28px;
	font-weight: 700;
	color: var(--text-primary);
	margin: 0 0 12px 0;
}

.gsauto-success-card p {
	color: var(--text-secondary);
	font-size: 15px;
	margin: 8px 0;
}

.gsauto-success-card .order-number {
	margin-top: 20px;
	font-size: 16px;
}

.gsauto-success-card .order-number strong {
	color: var(--primary-color);
	font-size: 18px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
	.gsauto-wizard-container {
		padding: 0 15px;
		margin: 20px auto;
	}

	.gsauto-card {
		padding: 20px;
	}

	.gsauto-wizard-steps {
		padding: 15px 10px;
		overflow-x: auto;
	}

	.gsauto-step .step-number {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.gsauto-step .step-label {
		font-size: 11px;
	}

	.gsauto-step-divider {
		width: 40px;
		margin: 0 5px;
		margin-bottom: 24px;
	}

	.gsauto-form-grid {
		grid-template-columns: 1fr;
	}

	.gsauto-wizard-actions {
		flex-direction: column-reverse;
	}

	.gsauto-wizard-actions button {
		width: 100%;
	}

	.gsauto-modal-content-v2 {
		max-width: 100%;
	}

	.gsauto-modal-actions-v2 {
		flex-direction: column;
	}

	.gsauto-modal-actions-v2 button {
		width: 100%;
	}

	.gsauto-modern-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}

	.gsauto-success-card {
		padding: 40px 20px;
	}
}

/* ============================================
   LOADING STATE
   ============================================ */

.gsauto-loading {
	pointer-events: none;
	opacity: 0.6;
	position: relative;
}

.gsauto-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border: 3px solid var(--border-color);
	border-top-color: var(--primary-color);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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