/**
 * Airport Autocomplete Styles
 */

.duffel-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: -1px;
}

.duffel-autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.duffel-autocomplete-item:last-child {
    border-bottom: none;
}

.duffel-autocomplete-item:hover,
.duffel-autocomplete-item.active {
    background-color: #f5f9ff;
}

.duffel-iata-code {
    font-weight: 600;
    font-size: 14px;
    color: #2271b1;
    min-width: 40px;
    text-align: center;
    background: #e8f2ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.duffel-airport-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.duffel-autocomplete-empty,
.duffel-autocomplete-loading {
    padding: 12px 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.duffel-autocomplete-loading {
    font-style: italic;
}

/* Ensure parent form group has relative position */
.duffel-form-group {
    position: relative;
}

/* Improve input focus state when autocomplete is active */
.duffel-form-group input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Scrollbar styling */
.duffel-autocomplete-results::-webkit-scrollbar {
    width: 8px;
}

.duffel-autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.duffel-autocomplete-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.duffel-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .duffel-autocomplete-results {
        max-height: 200px;
    }
    
    .duffel-autocomplete-item {
        padding: 10px 12px;
    }
    
    .duffel-iata-code {
        font-size: 13px;
        min-width: 35px;
    }
    
    .duffel-airport-name {
        font-size: 13px;
    }
}
