/**
 * Buy Online Form Styles
 */

.mixcar-buy-online-wrapper {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 20px;
}

.mixcar-buy-online-container {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 40px;
}

/* Form Header */
.mixcar-form-header {
	text-align: center;
	margin-bottom: 40px;
}

.mixcar-form-header h2 {
	font-size: 32px;
	font-weight: 700;
	color: #2c3338;
	margin: 0 0 10px;
}

.mixcar-form-header p {
	font-size: 16px;
	color: #7f868d;
	margin: 0;
}

/* Car Details */
.mixcar-car-details,
.mixcar-car-details-full {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 8px;
	margin-bottom: 30px;
}

.mixcar-car-details .car-image,
.mixcar-car-details-full .car-image {
	flex-shrink: 0;
	width: 200px;
	height: 150px;
	overflow: hidden;
	border-radius: 6px;
}

.mixcar-car-details .car-image img,
.mixcar-car-details-full .car-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mixcar-car-details .car-info,
.mixcar-car-details-full .car-info-full {
	flex: 1;
}

.mixcar-car-details .car-title,
.mixcar-car-details-full .car-title {
	font-size: 20px;
	font-weight: 600;
	color: #2c3338;
	margin: 0 0 8px;
}

.mixcar-car-details .car-price,
.mixcar-car-details-full .car-price {
	font-size: 24px;
	font-weight: 700;
	color: #069de3;
	margin-bottom: 15px;
}

/* Car Specifications */
.car-specifications {
	margin-top: 15px;
}

.car-specs-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.spec-item {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	background: #fff;
	border-radius: 4px;
	font-size: 14px;
}

.spec-label {
	font-weight: 600;
	color: #2c3338;
	margin-right: 6px;
}

.spec-value {
	color: #50575e;
}

[dir="rtl"] .spec-label {
	margin-right: 0;
	margin-left: 6px;
}

/* Form Sections */
.form-section {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e2e4e7;
}

.form-section:last-of-type {
	border-bottom: none;
}

.section-title {
	font-size: 20px;
	font-weight: 600;
	color: #2c3338;
	margin: 0 0 20px;
}

/* Form Groups */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #2c3338;
	margin-bottom: 8px;
}

.form-group label .required {
	color: #d63638;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #2c3338;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	border-color: #069de3;
	box-shadow: 0 0 0 1px #069de3;
	outline: none;
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

/* Submit Button */
.form-actions {
	text-align: center;
	margin-top: 30px;
}

.mixcar-submit-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 200px;
	padding: 14px 32px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #069de3;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.mixcar-submit-button:hover {
	background: #0582c1;
}

.mixcar-submit-button:disabled {
	background: #8c8f94;
	cursor: not-allowed;
}

.mixcar-submit-button .button-loader {
	display: none;
}

.mixcar-submit-button.loading .button-text {
	display: none;
}

.mixcar-submit-button.loading .button-loader {
	display: block;
}

/* Spinner */
.spinner {
	animation: rotate 2s linear infinite;
	width: 20px;
	height: 20px;
}

.spinner .path {
	stroke: #fff;
	stroke-linecap: round;
	animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* Form Messages */
.form-messages {
	margin: 20px 0;
	padding: 15px 20px;
	border-radius: 4px;
	display: none;
}

.form-messages.success {
	display: block;
	background: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.form-messages.error {
	display: block;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* RTL Support */
[dir="rtl"] .mixcar-car-details {
	flex-direction: row-reverse;
}

[dir="rtl"] .form-group label {
	text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
	.mixcar-buy-online-container {
		padding: 20px;
	}
	
	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}
	
	.mixcar-car-details {
		flex-direction: column;
		text-align: center;
	}
	
	.mixcar-car-details .car-image {
		width: 100%;
		height: 200px;
	}
}
