/**
 * UGOO Premium Autocomplete Styles
 * Theme-based styling for Google Maps autocomplete suggestions
 * Author: UGOO Development Team
 * Version: 3.0.0
 */

/* Premium Autocomplete Container */
.ugoo-premium-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ugoo-premium-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Premium Content Box */
.ugoo-premium-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(35, 148, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(35, 148, 68, 0.2);
    overflow: hidden;
    margin-top: 8px;
    backdrop-filter: blur(10px);
}

/* Premium Header */
.ugoo-premium-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(35, 148, 68, 0.08) 0%, rgba(69, 189, 118, 0.08) 100%);
    border-bottom: 1px solid rgba(35, 148, 68, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ugoo-premium-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #239444 0%, #1c7535 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(35, 148, 68, 0.3);
}

.ugoo-premium-title {
    flex: 1;
}

.ugoo-premium-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.ugoo-premium-subtitle {
    display: block;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

/* Premium List */
.ugoo-premium-list {
    max-height: 320px;
    overflow-y: auto;
}

/* Premium Items */
.ugoo-premium-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(35, 148, 68, 0.05);
    position: relative;
}

.ugoo-premium-item:last-child {
    border-bottom: none;
}

.ugoo-premium-item:hover {
    background: linear-gradient(135deg, rgba(69, 189, 118, 0.12) 0%, rgba(35, 148, 68, 0.12) 100%);
    transform: translateX(6px);
    box-shadow: inset 4px 0 0 #239444;
}

/* Airport Items */
.ugoo-premium-airport {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.12) 0%, rgba(254, 215, 170, 0.12) 100%);
    border-left: 3px solid #f59e0b;
}

.ugoo-premium-airport:hover {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.25) 0%, rgba(254, 215, 170, 0.25) 100%);
}

/* Popular Items */
.ugoo-premium-popular {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.06) 0%, rgba(254, 215, 170, 0.06) 100%);
}

/* Item Icon */
.ugoo-premium-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #239444;
    font-size: 12px;
    transition: all 0.2s ease;
}

.ugoo-premium-item:hover .ugoo-premium-item-icon {
    background: linear-gradient(135deg, #239444 0%, #1c7535 100%);
    color: white;
    transform: scale(1.1);
}

/* Item Content */
.ugoo-premium-item-content {
    flex: 1;
    min-width: 0;
}

.ugoo-premium-item-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ugoo-premium-item-address {
    font-size: 12px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Item Badge */
.ugoo-premium-item-badge {
    flex-shrink: 0;
    color: #f59e0b;
    font-size: 12px;
}

/* Loading, Error, No Results States */
.ugoo-premium-loading,
.ugoo-premium-error,
.ugoo-premium-no-results,
.ugoo-premium-billing-error {
    justify-content: center;
    color: #6b7280;
    cursor: default;
}

.ugoo-premium-loading:hover,
.ugoo-premium-error:hover,
.ugoo-premium-no-results:hover,
.ugoo-premium-billing-error:hover {
    background: transparent;
    transform: none;
}

/* Billing Error Specific Styling */
.ugoo-premium-billing-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-left: 3px solid #ef4444;
}

.ugoo-premium-billing-error .ugoo-premium-item-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Premium Footer */
.ugoo-premium-footer {
    padding: 12px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 1px solid rgba(35, 148, 68, 0.1);
    display: flex;
    justify-content: center;
}

.ugoo-premium-branding {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.ugoo-premium-branding i {
    color: #239444;
}

/* Selected Input Styling */
.ugoo-premium-selected {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
}

/* Checkmark Animation */
.ugoo-premium-checkmark {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 18px;
    z-index: 10;
    animation: checkmarkPop 0.3s ease;
    display: none !important; /* Disabled globally */
}

@keyframes checkmarkPop {
    0% { transform: translateY(-50%) scale(0); }
    50% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Custom Scrollbar */
.ugoo-premium-list::-webkit-scrollbar {
    width: 6px;
}

.ugoo-premium-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.ugoo-premium-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #239444 0%, #1c7535 100%);
    border-radius: 3px;
}

.ugoo-premium-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1c7535 0%, #239444 100%);
}

/* Hide Google's Default Dropdown */
.pac-container {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ugoo-premium-content {
        margin: 4px;
        border-radius: 12px;
    }
    
    .ugoo-premium-item {
        padding: 12px 16px;
    }
    
    .ugoo-premium-item-name {
        font-size: 13px;
    }
    
    .ugoo-premium-item-address {
        font-size: 11px;
    }
}

/* Animation for Dropdown Appearance */
@keyframes premiumDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ugoo-premium-show .ugoo-premium-content {
    animation: premiumDropdownIn 300ms ease-out;
}

/* Enhanced Focus States */
input:focus + .ugoo-premium-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Premium Glow Effect */
.ugoo-premium-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(35, 148, 68, 0.1) 0%, rgba(69, 189, 118, 0.1) 100%);
    border-radius: 8px;
    z-index: -1;
}

/* Smooth Transitions */
.ugoo-premium-item,
.ugoo-premium-item-icon,
.ugoo-premium-item-content {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Typography */
.ugoo-premium-item-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.ugoo-premium-item-address {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.01em;
}

/* Accessibility */
.ugoo-premium-item:focus {
    outline: 2px solid #239444;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ugoo-premium-content {
        border: 2px solid #239444;
    }
    
    .ugoo-premium-item:hover {
        background: #239444;
        color: white;
    }
}

/* Airport Notification Styles */
.ugoo-airport-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: linear-gradient(135deg, #239444 0%, #1c7535 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(35, 148, 68, 0.3);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    backdrop-filter: blur(10px);
}

.ugoo-airport-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.ugoo-notification-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ugoo-notification-content i {
    font-size: 18px;
    margin-bottom: 4px;
    color: #FFD700;
}

.ugoo-notification-content span:first-of-type {
    font-weight: 600;
    font-size: 14px;
}

.ugoo-notification-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-style: italic;
}

/* Flight Number Container Animation */
#flight-number-container {
    transition: all 0.3s ease;
}

#flight-number-container.hidden {
    display: none !important;
}

/* Enhanced Flight Number Input */
#flight-number {
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#flight-number:focus {
    border-color: #239444 !important;
    box-shadow: 0 0 0 3px rgba(35, 148, 68, 0.15) !important;
    transform: translateY(-2px);
}

/* Flight Number Validation Styles */
.ugoo-flight-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
}

.ugoo-flight-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.1) 100%) !important;
}

/* Flight Number Input Icon */
#flight-number-container .input-icon {
    transition: color 0.3s ease;
}

.ugoo-flight-valid + .input-icon {
    color: #10b981 !important;
}

.ugoo-flight-invalid + .input-icon {
    color: #ef4444 !important;
}

/* Mobile Responsive for Notifications */
@media (max-width: 768px) {
    .ugoo-airport-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 16px;
    }
}
