/* Vehicle Selector Styles */
.vehicle-selector-container{
	display: flex;
    justify-content: center;
    align-items: center;
}

#vehicle-selector-form {
  border-radius: 0.5rem;
  width: 100%;
  margin: 0;
}
#vehicle-selector-form select {
  min-width: 200px;
  flex: 1 1 0%;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  padding: 12px 16px;
  height: auto;
  min-height: 48px;
}
#vehicle-selector-form button {
  padding: 12px 16px;
  min-height: 48px;
}

/* Loading States */
.vehicle-selector-loading {
    opacity: 0.8;
    position: relative;
}

/* Ensure the select element maintains its original background during loading */
.vehicle-selector-loading select {
    background-color: #E9E9ED !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.loading-option {
    color: #3b82f6 !important;
    font-style: italic;
    font-weight: 500;
    position: relative;
    padding: 12px 16px 12px 40px !important;
    background-color: #ffffff !important;
    min-height: 48px;
    line-height: 1.5;
}

/* Override the general loading rule for loading options */
.vehicle-selector-loading option.loading-option {
    color: #3b82f6 !important;
}

.loading-option::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.error-option {
    color: #ef4444 !important;
    font-style: italic;
    font-weight: 500;
    background-color: #ffffff !important;
    padding: 12px 16px !important;
    min-height: 48px;
    line-height: 1.5;
}

/* Override the general loading rule for error options */
.vehicle-selector-loading option.error-option {
    color: #ef4444 !important;
}

.vehicle-selector-container select {
    position: relative;
}

.vehicle-selector-container select:disabled {
    background-color: #6b7280 !important;
    cursor: not-allowed;
}

/* Container positioning for loading spinner */
.vehicle-selector-container .relative {
    position: relative;
}

/* Ensure loading option is visible in dropdown */
.vehicle-selector-container select option.loading-option {
    color: #3b82f6 !important;
    padding: 12px 16px 12px 40px !important;
    background-color: #ffffff !important;
    min-height: 48px;
    line-height: 1.5;
}

.vehicle-selector-container select option.error-option {
    color: #ef4444 !important;
    padding: 12px 16px !important;
    background-color: #ffffff !important;
    min-height: 48px;
    line-height: 1.5;
}

/* Override any browser default styling for options */
.vehicle-selector-container select option {
    background-color: #ffffff !important;
    padding: 12px 16px !important;
    min-height: 48px;
    line-height: 1.5;
}

.vehicle-selector-container select option:hover {
    background-color: #6b7280 !important;
} 