/**
 * SkyTeam Airport Autocomplete Styles
 */

/* Wrapper */
.airport-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

/* Dropdown Container */
.airport-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e0e5eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 9999;
}

/* Individual Item */
.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f5f5f5;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f7ff;
}

.autocomplete-item.selected {
    background-color: #e3f2fd;
}

/* Airport Code Badge */
.autocomplete-item .airport-code {
    font-weight: 700;
    font-size: 16px;
    color: #1a73e8;
    min-width: 55px;
    text-align: center;
    background: #e8f0fe;
    padding: 6px 10px;
    border-radius: 6px;
    margin-right: 14px;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 1px;
}

/* Airport Info */
.autocomplete-item .airport-info {
    flex: 1;
    overflow: hidden;
}

.autocomplete-item .airport-city {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item .airport-name {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results */
.autocomplete-no-results {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Loading State */
.autocomplete-loading {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.autocomplete-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* Scrollbar Styling */
.airport-autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.airport-autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.airport-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.airport-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .autocomplete-item {
        padding: 14px 12px;
    }
    
    .autocomplete-item .airport-code {
        font-size: 14px;
        min-width: 50px;
        padding: 5px 8px;
    }
    
    .autocomplete-item .airport-city {
        font-size: 14px;
    }
    
    .autocomplete-item .airport-name {
        font-size: 12px;
    }
    
    .airport-autocomplete-dropdown {
        max-height: 250px;
    }
}
