/* ========================================
   Book Aero Fare - Professional Flight Search CSS
   The Best Travel Agency in the United States
   Competing with Priceline, Expedia, and Major OTAs
   ======================================== */

:root {
    /* Book Aero Fare Brand Colors */
    --baf-primary: #003265;
    --baf-accent: #FCAE1E;
    --baf-primary-light: #1a4a7a;
    --baf-primary-dark: #001b3d;
    --baf-accent-light: #fdc04e;
    --baf-accent-dark: #e09710;
    --baf-white: #ffffff;
    --baf-gray-50: #f8fafc;
    --baf-gray-100: #f1f5f9;
    --baf-gray-200: #e2e8f0;
    --baf-gray-300: #cbd5e1;
    --baf-gray-400: #94a3b8;
    --baf-gray-500: #64748b;
    --baf-gray-600: #475569;
    --baf-gray-700: #334155;
    --baf-gray-800: #1e293b;
    --baf-gray-900: #0f172a;
    --baf-success: #10b981;
    --baf-error: #ef4444;
    --baf-warning: #f59e0b;
    --baf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --baf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --baf-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --baf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --baf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --baf-radius: 8px;
    --baf-radius-lg: 12px;
    --baf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset and Base Styles
   ======================================== */

.baf-flight-search-engine * {
    box-sizing: border-box;
}

.baf-flight-search-engine {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--baf-gray-800);
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   Search Progress Overlay with Animation
   ======================================== */

.baf-search-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.baf-search-progress-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.baf-search-animation-container {
    text-align: center;
    max-width: 450px;
    width: 90%;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.baf-search-progress-overlay.visible .baf-search-animation-container {
    transform: scale(1);
}

.baf-logo-container {
    margin-bottom: 20px;
}

.baf-search-logo {
    width: 150px;
    height: auto;
}

.baf-search-text h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.baf-search-text p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.baf-airplane-animation {
    position: relative;
    height: 100px;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(to top, #e0f2fe, #f0f9ff);
}

.baf-cloud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    animation: baf-slide-clouds 20s linear infinite;
}

.baf-cloud {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M41.5 21a10.5 10.5 0 00-21 0A10.43 10.43 0 0020.5 21h-5a10.5 10.5 0 00-1-21h5a10.43 10.43 0 001 0h21a10.5 10.5 0 000-21z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.7;
}

.baf-cloud.c1 { top: 15%; left: 10%; transform: scale(0.8); }
.baf-cloud.c2 { top: 30%; left: 40%; transform: scale(1.2); }
.baf-cloud.c3 { top: 10%; left: 70%; transform: scale(0.9); }
.baf-cloud.c4 { top: 45%; left: 90%; transform: scale(1.0); }


.baf-airlines-flying {
    position: relative;
    height: 100%;
}

.baf-airline-plane {
    position: absolute;
    font-size: 24px;
    top: 45%;
    left: -50px;
    animation: baf-airplane-fly-path 4s ease-in-out infinite;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.1));
}

.baf-flight-path {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateY(-50%);
    animation: baf-path-glow 2s infinite ease-in-out;
}

.baf-progress-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.baf-progress-dots span {
    width: 8px;
    height: 8px;
    background: var(--baf-white);
    border-radius: 50%;
    animation: baf-loading-pulse 1.4s infinite ease-in-out both;
    opacity: 0.7;
}

.baf-progress-dots span:nth-child(1) { animation-delay: -0.32s; }
.baf-progress-dots span:nth-child(2) { animation-delay: -0.16s; }
.baf-progress-dots span:nth-child(3) { animation-delay: 0s; }

.baf-search-message h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    animation: baf-fade-in-up 0.6s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.baf-search-message p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 20px 0;
    animation: baf-fade-in-up 0.6s ease-out 0.2s both;
}

.baf-loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    animation: baf-fade-in-up 0.6s ease-out 0.4s both;
}

.baf-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--baf-accent);
    border-radius: 50%;
    animation: baf-dots 1.4s infinite ease-in-out;
}

.baf-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.baf-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.baf-loading-dots span:nth-child(3) { animation-delay: 0s; }

.baf-support-info {
    margin-top: 30px;
    padding: 20px;
    background: rgba(244, 169, 30, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(244, 169, 30, 0.3);
    text-align: center;
}

.baf-support-info p {
    font-size: 13px;
    color: #475569;
    margin-top: 20px;
}

.baf-support-info p:last-child {
    margin-bottom: 0;
}

.baf-support-info strong {
    color: #013467;
}

/* ========================================
   Search Container
   ======================================== */

.baf-search-container {
    background: var(--baf-white);
    border-radius: var(--baf-radius-lg);
    box-shadow: var(--baf-shadow-xl);
    overflow: hidden;
    border: 1px solid var(--baf-gray-200);
}

.baf-search-header {
    background: linear-gradient(135deg, var(--baf-primary), var(--baf-primary-light));
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.baf-search-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.baf-search-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   Trip Type Tabs
   ======================================== */

.baf-trip-tabs {
    display: flex;
    background: var(--baf-gray-50);
    border-bottom: 1px solid var(--baf-gray-200);
    overflow-x: auto;
}

.baf-tab-btn {
    flex: 1;
    min-width: 120px;
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--baf-gray-600);
    cursor: pointer;
    transition: var(--baf-transition);
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.baf-tab-btn:hover {
    background: var(--baf-gray-100);
    color: var(--baf-primary);
}

.baf-tab-btn.active {
    background: var(--baf-white);
    color: var(--baf-primary);
    border-bottom-color: var(--baf-accent);
}

.baf-tab-icon {
    font-size: 16px;
    color: var(--baf-accent);
}

/* ========================================
   Search Form
   ======================================== */

.baf-search-form {
    padding: 30px;
}

.baf-trip-container {
    margin-bottom: 30px;
}

.baf-search-grid {
    display: grid;
    gap: 24px;
}

/* ========================================
   Location Section
   ======================================== */

.baf-location-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: end;
}

.baf-input-group {
    position: relative;
}

.baf-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--baf-gray-700);
    margin-bottom: 8px;
}

.baf-input-wrapper {
    position: relative;
}

.baf-airport-input,
.baf-date-input,
.baf-select {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--baf-gray-200);
    border-radius: var(--baf-radius);
    font-size: 16px;
    background: var(--baf-white);
    transition: var(--baf-transition);
    outline: none;
}

.baf-airport-input:focus,
.baf-date-input:focus,
.baf-select:focus {
    border-color: var(--baf-primary);
    box-shadow: 0 0 0 3px rgba(1, 52, 103, 0.1);
}

.baf-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--baf-accent);
    pointer-events: none;
}

.baf-swap-airports {
    background: var(--baf-accent);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--baf-transition);
    box-shadow: var(--baf-shadow);
}

.baf-swap-airports:hover {
    background: var(--baf-accent-dark);
    transform: rotate(180deg);
}

/* ========================================
   Airport Suggestions - Enhanced Design
   ======================================== */

.baf-input-group {
    position: relative;
    width: 100%;
    z-index: 1;
}

.baf-field {
    position: relative;
    z-index: 1;
}

.baf-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 50, 101, 0.15);
    max-height: 280px;
    max-width: 500px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    animation: slideDown 0.2s ease-out;
    margin-top: 4px;
}

.baf-suggestions.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.baf-loading-suggestions {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
    gap: 12px;
}

.baf-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #003265;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.baf-suggestion {
    display: flex;
    align-items: flex-start;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f1f3;
    background: #ffffff;
    min-height: 60px;
}

.baf-suggestion:first-child {
    border-radius: 8px 8px 0 0;
}

.baf-suggestion:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.baf-suggestion:hover {
    background: #f8fafb;
    transform: translateX(2px);
}

.baf-suggestion:active {
    background: #e8f4fd;
}

.baf-suggestion-code {
    background: linear-gradient(135deg, #003265 0%, #1a4a7a 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    margin-right: 16px;
    min-width: 52px;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 50, 101, 0.2);
    flex-shrink: 0;
}

.baf-suggestion-details {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.baf-suggestion-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.baf-suggestion-city {
    color: #718096;
    font-size: 12px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .baf-input-group {
        z-index: 10;
    }
    
    .baf-suggestions {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        max-height: 200px;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 50, 101, 0.2);
        margin-top: 6px;
        z-index: 9999;
        width: 100%;
    }
    
    .baf-suggestion {
        padding: 14px 16px;
        min-height: 56px;
    }
    
    .baf-suggestion-code {
        font-size: 11px;
        padding: 6px 10px;
        margin-right: 14px;
        min-width: 46px;
    }
    
    .baf-suggestion-name {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .baf-suggestion-city {
        font-size: 11px;
    }
    
    .baf-loading-suggestions {
        padding: 16px;
        font-size: 13px;
    }
    
    .baf-spinner {
        width: 16px;
        height: 16px;
    }
}

/* Enhanced Field Styling for Better Integration */
.baf-field:focus-within .baf-suggestions {
    border-color: #003265;
}

.baf-airport-input:focus + .baf-suggestions {
    border-color: #003265;
}

/* Ensure proper stacking context */
.baf-search-form {
    position: relative;
    z-index: 1;
}

.baf-search-form .baf-field {
    position: relative;
    z-index: 2;
}

.baf-search-form .baf-suggestions {
    z-index: 9999;
}

/* No Results State */
.baf-suggestion.no-results {
    justify-content: center;
    color: #9ca3af;
    font-style: italic;
    cursor: default;
}

.baf-suggestion.no-results:hover {
    background: #ffffff;
    transform: none;
}

/* Error State */
.baf-suggestion.error {
    justify-content: center;
    color: #dc2626;
    font-weight: 500;
    cursor: default;
}

.baf-suggestion.error:hover {
    background: #fef2f2;
    transform: none;
}

/* Smooth scrollbar for suggestions */
.baf-suggestions::-webkit-scrollbar {
    width: 6px;
}

.baf-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.baf-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.baf-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   Inline Form Errors
   ======================================== */

.baf-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-weight: 500;
    line-height: 1.3;
}

.baf-field.has-error input {
    border-color: #dc2626;
}

.baf-field.has-error .baf-error {
    display: block;
}

/* ========================================
   Error Messages
   ======================================== */

.baf-error-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #dc2626;
    color: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    max-width: 350px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.baf-success-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: #059669;
    color: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    max-width: 350px;
    animation: slideInRight 0.3s ease-out;
}

/* Mobile Responsive Notices */
@media (max-width: 768px) {
    .baf-error-notice,
    .baf-success-notice {
        left: 15px;
        right: 15px;
        top: 15px;
        max-width: none;
    }
}

/* ========================================
   Date Section
   ======================================== */

.baf-date-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.baf-return-date-group.hidden {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   Travelers Section
   ======================================== */

.baf-travelers-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.baf-travelers-selector {
    position: relative;
}

.baf-travelers-btn {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--baf-gray-200);
    border-radius: var(--baf-radius);
    background: var(--baf-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    transition: var(--baf-transition);
    outline: none;
}

.baf-travelers-btn:hover,
.baf-travelers-btn:focus {
    border-color: var(--baf-primary);
    box-shadow: 0 0 0 3px rgba(1, 52, 103, 0.1);
}

.baf-travelers-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--baf-white);
    border: 1px solid var(--baf-gray-200);
    border-radius: var(--baf-radius);
    box-shadow: var(--baf-shadow-lg);
    padding: 16px;
    z-index: 1000;
    display: none;
}

.baf-travelers-dropdown.active {
    display: block;
}

.baf-traveler-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--baf-gray-100);
}

.baf-traveler-row:last-child {
    border-bottom: none;
}

.baf-traveler-info {
    flex: 1;
}

.baf-traveler-type {
    font-weight: 600;
    color: var(--baf-gray-800);
    display: block;
}

.baf-traveler-info small {
    color: var(--baf-gray-500);
    font-size: 12px;
}

.baf-counter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.baf-counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--baf-gray-300);
    border-radius: 50%;
    background: var(--baf-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--baf-primary);
    transition: var(--baf-transition);
}

.baf-counter-btn:hover {
    border-color: var(--baf-primary);
    background: var(--baf-primary);
    color: white;
}

.baf-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.baf-counter-value {
    font-weight: 600;
    color: var(--baf-gray-800);
    min-width: 24px;
    text-align: center;
}

/* ========================================
   Multi-City Styles
   ======================================== */

.baf-multicity-header {
    text-align: center;
    margin-bottom: 24px;
}

.baf-multicity-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--baf-primary);
    margin: 0 0 8px 0;
}

.baf-multicity-header p {
    color: var(--baf-gray-600);
    margin: 0;
}

.baf-multicity-legs {
    margin-bottom: 24px;
}

.baf-multicity-leg {
    background: var(--baf-gray-50);
    border: 2px solid var(--baf-gray-200);
    border-radius: var(--baf-radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--baf-transition);
}

.baf-multicity-leg:hover {
    border-color: var(--baf-primary);
    box-shadow: var(--baf-shadow);
}

.baf-leg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.baf-leg-number {
    font-weight: 700;
    color: var(--baf-primary);
    background: var(--baf-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.baf-remove-leg {
    background: var(--baf-error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--baf-transition);
}

.baf-remove-leg:hover {
    background: #dc2626;
}

.baf-leg-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.baf-multicity-controls {
    text-align: center;
    margin-bottom: 24px;
}

.baf-add-leg-btn {
    background: var(--baf-gray-100);
    border: 2px dashed var(--baf-gray-300);
    border-radius: var(--baf-radius);
    padding: 16px 24px;
    cursor: pointer;
    color: var(--baf-gray-600);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--baf-transition);
}

.baf-add-leg-btn:hover {
    background: var(--baf-primary);
    border-color: var(--baf-primary);
    color: white;
}

.baf-multicity-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    background: var(--baf-gray-50);
    border-radius: var(--baf-radius);
}

/* ========================================
   Search Button
   ======================================== */

.baf-search-action {
    text-align: center;
    margin-bottom: 24px;
}

.baf-search-button {
    background: linear-gradient(135deg, var(--baf-accent), var(--baf-accent-dark));
    color: white;
    border: none;
    border-radius: var(--baf-radius);
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--baf-transition);
    box-shadow: var(--baf-shadow-lg);
    min-width: 200px;
    justify-content: center;
}

.baf-search-button:hover {
    background: linear-gradient(135deg, var(--baf-accent-dark), var(--baf-accent));
    transform: translateY(-2px);
    box-shadow: var(--baf-shadow-xl);
}

.baf-search-button:active {
    transform: translateY(0);
}

.baf-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.baf-search-icon {
    font-size: 20px;
}

/* ========================================
   Search Features
   ======================================== */

.baf-search-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--baf-gray-200);
}

.baf-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--baf-gray-600);
}

.baf-feature-icon {
    color: var(--baf-success);
    font-weight: 700;
}

/* ========================================
   Animations
   ======================================== */

@keyframes baf-pulse {
    50% { opacity: 0.5; }
}

@keyframes baf-airplane-fly-path {
    0% { transform: translate(0, 0) rotate(-5deg); opacity: 0; }
    20% { transform: translate(150px, -15px) rotate(0deg); opacity: 1; }
    80% { transform: translate(350px, 10px) rotate(5deg); opacity: 1; }
    100% { transform: translate(500px, 0) rotate(0deg); opacity: 0; }
}

@keyframes baf-loading-pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes baf-path-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes baf-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes baf-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes baf-cloud-float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-8px) translateX(5px); }
    66% { transform: translateY(-5px) translateX(-3px); }
}

@keyframes baf-slide-clouds {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .baf-flight-search-engine {
        padding: 10px;
    }
    
    .baf-search-form {
        padding: 20px;
    }
    
    .baf-search-header h2 {
        font-size: 24px;
    }
    
    .baf-search-header p {
        font-size: 14px;
    }
    
    .baf-location-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .baf-swap-airports {
        order: 3;
        justify-self: center;
        transform: rotate(90deg);
    }
    
    .baf-date-section,
    .baf-travelers-section,
    .baf-multicity-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .baf-leg-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .baf-search-features {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .baf-search-button {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .baf-tab-btn {
        min-width: 100px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .baf-search-animation-container {
        padding: 20px;
    }
    
    .baf-search-message h3 {
        font-size: 22px;
    }
    
    .baf-search-logo {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .baf-airport-input,
    .baf-date-input,
    .baf-select {
        padding: 12px 12px 12px 40px;
        font-size: 14px;
    }
    
    .baf-input-icon {
        left: 12px;
        font-size: 16px;
    }
    
    .baf-travelers-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .baf-search-features {
        grid-template-columns: 1fr;
    }
    
    .baf-feature {
        font-size: 13px;
        justify-content: center;
    }
}

/* ========================================
   Legacy MAF Classes for Compatibility
   ======================================== */

.maf-flight-search-engine-v2 {
    /* Redirect to new BAF classes */
}

/* Add any additional legacy support as needed */ 

/* BOOK AERO FARE - FLIGHT SEARCH LOADING MODAL */
/* Clean, Professional Design */

/* Loading Modal Overlay */
.baf-loading-modal-v5 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Content Container */
.baf-loading-content-v5 {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: contentSlideUp 0.4s ease-out 0.1s both;
}

@keyframes contentSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Company Logo */
.baf-loading-logo-v5 {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(1, 52, 103, 0.3);
    animation: baf-logo-pulse 2s ease-in-out infinite;
    border: 3px solid #013467;
}

.baf-loading-logo-v5 img {
    width: 70px;
    height: auto;
    /* Remove the filter that was making it hard to see */
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Loading Text */
.baf-loading-title-v5 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.baf-loading-subtitle-v5 {
    font-size: 16px;
    color: #718096;
    margin-bottom: 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Airplane Animation Container */
.baf-airplane-container-v5 {
    position: relative;
    height: 80px;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 50%, #b3daff 100%);
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

/* Cloud Background */
.baf-clouds-v5 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.baf-cloud-v5 {
    position: absolute;
    font-size: 20px;
    opacity: 0.6;
    animation: cloudFloat 8s ease-in-out infinite;
}

.baf-cloud-v5:nth-child(1) {
    top: 15px;
    left: 20%;
    animation-delay: 0s;
}

.baf-cloud-v5:nth-child(2) {
    top: 35px;
    right: 30%;
    animation-delay: 2s;
}

.baf-cloud-v5:nth-child(3) {
    top: 20px;
    left: 70%;
    animation-delay: 4s;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(10px) translateY(-5px); }
    50% { transform: translateX(-5px) translateY(-8px); }
    75% { transform: translateX(8px) translateY(-3px); }
}

/* Flying Airplanes */
.baf-airplane-v5 {
    position: absolute;
    top: 50%;
    left: -60px;
    font-size: 28px;
    animation: airplaneFly 4s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.baf-airplane-v5:nth-child(1) {
    animation-delay: 0s;
    color: #013467;
}

.baf-airplane-v5:nth-child(2) {
    animation-delay: 1.5s;
    color: #2d5aa0;
    font-size: 24px;
}

.baf-airplane-v5:nth-child(3) {
    animation-delay: 3s;
    color: #4a90a4;
    font-size: 26px;
}

@keyframes airplaneFly {
    0% { 
        left: -60px; 
        transform: translateY(-50%) rotate(-15deg);
    }
    20% { 
        transform: translateY(-60%) rotate(-8deg);
    }
    50% { 
        left: 50%; 
        transform: translateY(-45%) rotate(0deg);
    }
    80% { 
        transform: translateY(-60%) rotate(8deg);
    }
    100% { 
        left: calc(100% + 60px); 
        transform: translateY(-50%) rotate(15deg);
    }
}

/* Progress Bar */
.baf-loading-progress-v5 {
    background: #f1f5f9;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 24px 0;
}

.baf-loading-progress-bar-v5 {
    height: 100%;
    background: linear-gradient(90deg, #013467, #2d5aa0, #F4A91E);
    background-size: 200% 100%;
    animation: progressFlow 2s linear infinite;
}

@keyframes progressFlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading Dots */
.baf-loading-dots-v5 {
    font-size: 24px;
    color: #013467;
    margin: 16px 0;
    animation: dotsAnimation 1.5s ease-in-out infinite;
}

@keyframes dotsAnimation {
    0%, 20%, 50%, 80%, 100% { opacity: 1; }
    40%, 60% { opacity: 0.3; }
}

/* Support Information */
.baf-loading-support-v5 {
    background: linear-gradient(135deg, #F4A91E, #e6980e);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    box-shadow: 0 4px 15px rgba(244, 169, 30, 0.3);
    animation: supportGlow 2s ease-in-out infinite;
}

@keyframes supportGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(244, 169, 30, 0.3); }
    50% { box-shadow: 0 6px 20px rgba(244, 169, 30, 0.5); }
}

.baf-support-title-v5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.9;
}

.baf-support-phone-v5 {
    font-size: 18px;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .baf-loading-content-v5 {
        padding: 32px 24px;
        max-width: 360px;
    }
    
    .baf-loading-logo-v5 {
        width: 70px;
        height: 70px;
    }
    
    .baf-loading-title-v5 {
        font-size: 20px;
    }
    
    .baf-airplane-container-v5 {
        height: 70px;
    }
    
    .baf-airplane-v5 {
        font-size: 24px;
    }
    
    .baf-support-phone-v5 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .baf-loading-content-v5 {
        padding: 24px 20px;
        margin: 20px;
    }
    
    .baf-airplane-container-v5 {
        height: 60px;
    }
    
    .baf-airplane-v5 {
        font-size: 20px;
    }
} 

/* Enhanced Error and Success Notifications */
.baf-error-notification, 
.baf-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    min-width: 300px;
    transform: translateX(420px);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.baf-error-notification.show, 
.baf-success-notification.show {
    transform: translateX(0);
}

.baf-error-notification .baf-notification-content {
    background: #fff;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.baf-success-notification .baf-notification-content {
    background: #fff;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.baf-notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.baf-notification-message {
    flex: 1;
    color: #333;
    line-height: 1.4;
    font-size: 14px;
}

.baf-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.baf-notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Enhanced Field Error Styling */
.baf-field.error .baf-input-group {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.baf-field.error .baf-airport-input,
.baf-field.error .baf-date-input,
.baf-field.error .baf-travelers-button {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.baf-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    line-height: 1.3;
}

.baf-error.show {
    display: block;
}

/* Enhanced Passenger Counter Styling */
.baf-counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #6c757d;
}

.baf-counter-btn:disabled:hover {
    background-color: #f8f9fa;
    transform: none;
}

/* Cabin Class Enhanced Styling */
.baf-class-section select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--baf-border);
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    color: var(--baf-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.baf-class-section select:focus {
    outline: none;
    border-color: var(--baf-primary);
    box-shadow: 0 0 0 2px rgba(0, 50, 101, 0.2);
}

.baf-class-section select option {
    padding: 8px;
    font-size: 14px;
}

/* Passenger Validation Messages */
.baf-passenger-section {
    position: relative;
}

.baf-passenger-validation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 12px;
    color: #856404;
    display: none;
}

.baf-passenger-validation.show {
    display: block;
}

.baf-passenger-validation.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .baf-error-notification, 
    .baf-success-notification {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .baf-error-notification.show, 
    .baf-success-notification.show {
        transform: translateY(0);
    }
    
    .baf-notification-content {
        padding: 12px !important;
    }
    
    .baf-notification-message {
        font-size: 13px !important;
    }
}

/* Loading State Enhancements */
.baf-search-button.loading {
    position: relative;
    color: transparent;
}

.baf-search-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
} 