/**
 * Frontend Styles for Metaleaf Vehicle Selector
 */

.vpic-vehicle-selector {
	max-width: 100%;
	margin: 20px 0;
}

.vpic-field-group {
	margin-bottom: 20px;
}

.vpic-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #1d2327;
	font-size: 14px;
}

.vpic-required {
	color: #d63638;
	margin-left: 3px;
}

.vpic-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	line-height: 1.5;
	color: #1d2327;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.vpic-select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.vpic-select:disabled {
	background: #f0f0f1;
	color: #8c8f94;
	cursor: not-allowed;
	opacity: 0.7;
}

.vpic-select option {
	padding: 5px;
}

.vpic-select option:disabled {
	color: #8c8f94;
	font-style: italic;
}

/* Loading State */
.vpic-select.loading {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%232271b1' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='%232271b1' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 20px 20px;
	padding-right: 40px;
}

/* Error Message */
.vpic-error {
	color: #d63638;
	background: #fcf0f1;
	border: 1px solid #d63638;
	border-radius: 4px;
	padding: 12px;
	margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.vpic-vehicle-selector {
		margin: 15px 0;
	}
	
	.vpic-field-group {
		margin-bottom: 15px;
	}
	
	.vpic-select {
		padding: 12px;
		font-size: 16px; /* Prevents zoom on iOS */
	}
}

/* MetForm Integration Styles */
.metform-form .vpic-vehicle-selector {
	margin: 0;
}

.metform-form .vpic-field-group {
	margin-bottom: 15px;
}

/* Accessibility */
.vpic-select:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}
