/* Enhanced Flight Booking Form Styles with Icons */
.flight-booking-form {
    max-width: 1196px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    position: relative;
}

.flight-booking-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.flight-header {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
    padding: 12px 25px;
    max-width: fit-content;
    background: linear-gradient(135deg, #5066ff 0%, #5a78ff 100%);
    border-radius: 12px 12px 12px 0px;
    color: #ffffff;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(80, 102, 255, 0.3);
}

/* New top section with tabs and controls */
.form-top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

.flight-tabs {
    display: flex;
    background: #f8f9fa;
    max-width: 22rem;
    border-radius: 12px;
    height: 55px;
    padding: 6px;
    border: 1px solid #eaeaea;
    gap: 4px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.top-right-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.top-control-group {
    min-width: 160px;
}

.top-control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.top-control-group select,
.top-control-group .passenger-display {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
    cursor: pointer;
}

.top-control-group select:focus,
.top-control-group .passenger-display:hover,
.top-control-group .passenger-display:focus {
    outline: none;
    border-color: #5066ff;
    box-shadow: 0 0 0 3px rgba(80, 102, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 0px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 600;
    color: #666;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    color: #5066ff;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #5066ff 0%, #5a78ff 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(80, 102, 255, 0.3);
}

/* FORM CONTAINER AND FORM DISPLAY - CRITICAL FIX */
.form-container {
    position: relative;
    width: 100%;
    min-height: 120px;
}

.flight-form {
    width: 100%;
    animation: fadeIn 0.4s ease;
    display: none;
}

.flight-form.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.form-group {
    flex: 1;
    margin-bottom: 0px !important;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #555;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: #777;
    z-index: 2;
    font-size: 16px;
}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
    background-color: #ffffff !important;
}

.input-with-icon input,
.input-with-icon select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e3e3e3;
    border-radius: 10px;
    height: 46px;
    font-size: 15px;
    box-sizing: border-box;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-with-icon input:focus,
.input-with-icon select:focus {
    outline: none;
    border-color: #5066ff;
    box-shadow: 0 0 0 3px rgba(80, 102, 255, 0.1);
    transform: translateY(-1px);
}

.input-with-icon input::placeholder {
    color: #a0a0a0;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item i {
    color: #5066ff;
    width: 16px;
}

.form-submit {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.search-flight-btn {
    background: linear-gradient(135deg, #5066ff 0%, #5a78ff 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    margin-top: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(80, 102, 255, 0.3);
}

.search-flight-btn:hover {
    background: linear-gradient(135deg, #4055d5 0%, #4a67e0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 102, 255, 0.4);
}

.search-flight-btn:active {
    transform: translateY(0);
}

/* CORRECTED Passenger dropdown styles */
.passenger-selector {
    position: relative;
    width: 100%;
}

.passenger-display {
    border: 2px solid #e1e5e9;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    background: white;
    font-size: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.passenger-display:hover {
    border-color: #5066ff;
}

.passenger-text {
    flex: 1;
}

.passenger-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 20px;
    animation: dropdownFade 0.3s ease;
    margin-top: 5px;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.passenger-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.passenger-type:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.passenger-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.passenger-info i {
    font-size: 18px;
    color: #5066ff;
    width: 20px;
}

.passenger-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.passenger-age {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.passenger-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.passenger-btn {
    width: 34px;
    height: 34px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #555;
}

.passenger-btn:hover:not(:disabled) {
    background: #5066ff;
    border-color: #5066ff;
    color: white;
}

.passenger-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.passenger-count {
    min-width: 34px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.passenger-dropdown-footer {
    text-align: right;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
    margin-top: 10px;
}

.done-btn {
    background: linear-gradient(135deg, #5066ff 0%, #5a78ff 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.done-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 102, 255, 0.3);
}

/* Active state for dropdown */
.passenger-selector.active .passenger-dropdown {
    display: block;
}

.passenger-selector.active .passenger-display {
    border-color: #5066ff;
    box-shadow: 0 0 0 3px rgba(80, 102, 255, 0.1);
}

/* Multicity specific styles */
.multicity-flight {
    border: 1px solid #e1e5e9;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.multicity-flight:hover {
    border-color: #5066ff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.multicity-flight-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.multicity-flight-header i {
    color: #5066ff;
    margin-right: 8px;
}

.add-more-btn {
    background: linear-gradient(135deg, #5066ff 0%, #5a78ff 100%);
    color: white;
    border: none;
    margin-top: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(80, 102, 255, 0.2);
}

.add-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(80, 102, 255, 0.3);
}

.remove-flight-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-flight-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

/* FORM SECTION DISPLAY - CRITICAL FIX */
.flight-form {
    display: none;
}

.flight-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.flight-results {
    margin-top: 30px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.flight-item {
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flight-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.flight-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flight-price {
    font-size: 20px;
    font-weight: 700;
    color: #5066ff;
}

.no-flights {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Enhanced responsive design for all screen sizes */

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .flight-booking-form {
        padding: 35px;
    }
    
    .form-row {
        gap: 25px;
    }
    
    .top-control-group {
        min-width: 180px;
    }
}

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .flight-booking-form {
        max-width: 95%;
        padding: 25px;
    }
    
    .form-top-section {
        flex-wrap: wrap;
    }
    
    .flight-tabs {
        max-width: 100%;
        order: 1;
        width: 100%;
    }
    
    .top-right-controls {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        gap: 15px;
    }
    
    .top-control-group {
        min-width: 150px;
    }
}

/* Tablet screens (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .flight-booking-form {
        margin: 25px auto;
        padding: 20px;
        max-width: 95%;
    }
    
    .flight-header {
        font-size: 22px;
        padding: 10px 20px;
        margin-bottom: 20px;
    }
    
    .form-top-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .flight-tabs {
        max-width: 100%;
        height: auto;
        flex-wrap: nowrap;
    }
    
    .top-right-controls {
        width: 100%;
        justify-content: space-between;
        gap: 15px;
    }
    
    .top-control-group {
        min-width: 140px;
    }
    
    .form-row {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .form-group {
        flex: 1 1 calc(50% - 15px);
        min-width: 200px;
    }
    
    .passenger-dropdown {
        width: 280px;
    }
    
    .multicity-flight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .remove-flight-btn {
        align-self: flex-start;
    }
}

/* Small tablets and large phones (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .flight-booking-form {
        margin: 15px;
        padding: 20px;
        border-radius: 12px;
    }
    
    .flight-header {
        font-size: 20px;
        padding: 10px 18px;
        margin-bottom: 15px;
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .form-top-section {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .flight-tabs {
        max-width: 100%;
        height: auto;
        flex-wrap: wrap;
        padding: 4px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 12px;
        flex: 1 1 calc(33.333% - 8px);
        min-width: 100px;
    }
    
    .top-right-controls {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .top-control-group {
        min-width: 130px;
    }
    
    .top-control-group label {
        font-size: 13px;
    }
    
    .top-control-group select,
    .top-control-group .passenger-display {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        flex: 1 1 100%;
    }
    
    .input-with-icon input,
    .input-with-icon select {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }
    
    .passenger-dropdown {
        width: 100%;
        left: 0;
        right: 0;
        padding: 15px;
    }
    
    .passenger-type {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .search-flight-btn {
        width: 100%;
        padding: 14px 20px;
        justify-content: center;
        font-size: 15px;
    }
    
    .multicity-flight {
        padding: 15px;
    }
    
    .multicity-flight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .remove-flight-btn {
        align-self: flex-start;
    }
}

/* Mobile phones (575px and below) */
@media (max-width: 575px) {
    .flight-booking-form {
        margin: 10px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .flight-header {
        font-size: 18px;
        padding: 8px 15px;
        margin-bottom: 15px;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .form-top-section {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .flight-tabs {
        max-width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 4px;
        gap: 4px;
    }
    
    .tab-btn {
        display: flex;
        flex-direction: column; /* Stack icon above text */
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 5px; /* Space between icon and text */
        padding: 10px 12px; /* Adjust padding for better spacing */
        font-size: 12px;
    }

    .tab-btn i {
        font-size: 16px; /* Slightly larger icon */
        margin: 0; /* Remove any side margin */
    }
    
    .top-right-controls {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }
    
    .top-control-group {
        min-width: 100%;
    }
    
    .top-control-group label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .top-control-group select,
    .top-control-group .passenger-display {
        padding: 10px 12px;
        font-size: 14px;
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .form-group {
        flex: 1 1 100%;
        margin-bottom: 0;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-with-icon input,
    .input-with-icon select {
        padding: 10px 12px 10px 38px;
        font-size: 14px;
        height: 44px;
    }
    
    .input-with-icon i {
        left: 12px;
        font-size: 14px;
    }
    
    .suggestions {
        max-height: 180px;
    }
    
    .suggestion-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .passenger-dropdown {
        width: 100%;
        left: 0;
        right: 0;
        padding: 15px;
    }
    
    .passenger-type {
        margin-bottom: 12px;
        padding-bottom: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .passenger-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .passenger-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .passenger-count {
        font-size: 15px;
    }
    
    .form-submit {
        margin-top: 15px;
    }
    
    .search-flight-btn {
        width: 100%;
        padding: 12px 20px;
        justify-content: center;
        font-size: 15px;
    }
    
    .multicity-flight {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .multicity-flight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 14px;
    }
    
    .remove-flight-btn {
        padding: 6px 12px;
        font-size: 11px;
        align-self: flex-start;
    }
    
    .add-more-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .flight-item {
        padding: 15px;
    }
    
    .flight-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .flight-price {
        font-size: 18px;
    }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
    .flight-booking-form {
        margin: 5px;
        padding: 10px;
    }
    
    .flight-header {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .tab-btn {
        font-size: 11px;
        gap: 3px;
    }

    .tab-btn i {
        font-size: 14px;
    }
    
    .input-with-icon input,
    .input-with-icon select {
        padding: 8px 10px 8px 32px;
        font-size: 13px;
    }
    
    .input-with-icon i {
        left: 10px;
        font-size: 12px;
    }
    
    .search-flight-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5066ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success state */
.success-message {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    animation: successPulse 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Validation styles */
.form-group.error {
    position: relative;
}

.form-group.error .airport-input,
.form-group.error .date-input,
.form-group.error .cabin-select {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3) !important;
}

.field-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
}

.global-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
}

.form-group.error .field-error {
    display: flex;
}

/* Highlight error fields */
.form-group.error label {
    color: #ff6b6b;
    font-weight: bold;
}

/* Success state */
.form-group.success .airport-input,
.form-group.success .date-input {
    border-color: #28a745 !important;
}

/* Focus states for accessibility */
.tab-btn:focus,
.search-flight-btn:focus,
.passenger-btn:focus,
.done-btn:focus,
.add-more-btn:focus,
.remove-flight-btn:focus {
    outline: 2px solid #5066ff;
    outline-offset: 2px;
}

/* Custom scrollbar for suggestions */
.suggestions::-webkit-scrollbar {
    width: 6px;
}

.suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 10px 0;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.pulse {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced suggestion styles */
.suggestion-header {
    padding: 10px 15px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    font-size: 12px;
    text-transform: uppercase;
}

.suggestion-details {
    flex: 1;
}

.suggestion-code {
    font-weight: 700;
    color: #5066ff;
    font-size: 14px;
}

.suggestion-name {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.suggestion-location {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.suggestion-item.recent {
    background: #f8f9fa;
}

.suggestion-item.loading,
.suggestion-item.error,
.suggestion-item.no-results {
    color: #666;
    font-style: italic;
    justify-content: center;
}

.suggestion-item.active {
    background: #5066ff;
    color: white;
}

.suggestion-item.active .suggestion-code,
.suggestion-item.active .suggestion-name,
.suggestion-item.active .suggestion-location {
    color: white;
}

/* Flight actions */
.flight-actions {
    display: flex;
    gap: 8px;
}

.swap-flight-btn,
.remove-flight-btn {
    background: transparent;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.swap-flight-btn:hover {
    background: #5066ff;
    border-color: #5066ff;
    color: white;
}

.remove-flight-btn:hover {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: white;
}

/* Temporary messages */
.temporary-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    display: none;
    border-left: 4px solid #5066ff;
    max-width: 300px;
}

.temporary-message.success {
    border-left-color: #28a745;
}

.temporary-message.error {
    border-left-color: #dc3545;
}

.temporary-message.warning {
    border-left-color: #ffc107;
}

/* Enhanced error states */
.field-error.show {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.global-error.show {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

/* Form states */
.form-group.focused {
    border-color: #5066ff;
}

.form-group.focused label {
    color: #5066ff;
}

.airport-input.selected {
    border-color: #28a745;
    background: #f8fff9;
}

.input-with-icon.swapping {
    animation: highlight 0.5s ease;
}

@keyframes highlight {
    0% { background: #fff3cd; }
    100% { background: white; }
}

/* Submission states */
.search-flight-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.flight-form.submission-error {
    animation: formError 0.5s ease;
}

@keyframes formError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Passenger display states */
.passenger-display.active {
    border-color: #5066ff;
    box-shadow: 0 0 0 3px rgba(80, 102, 255, 0.1);
}

.passenger-display.updated {
    background: #f8fff9;
    border-color: #28a745;
}

/* Hover effects */
.passenger-display:hover,
.tab-btn:hover,
.search-flight-btn:hover,
.swap-flight-btn:hover,
.remove-flight-btn:hover {
    background-color: #f8f9fa;
    border-color: #5066ff;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

/* Print styles */
@media print {
    .flight-booking-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tab-btn,
    .passenger-dropdown,
    .suggestions,
    .flight-actions {
        display: none !important;
    }
    
    .flight-form {
        display: block !important;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Fix for form container height */
.form-container:after {
    content: '';
    display: table;
    clear: both;
}

/* Ensure proper z-index stacking */
.flight-booking-form {
    z-index: 1;
}

.passenger-dropdown,
.suggestions {
    z-index: 1000;
}

.temporary-message {
    z-index: 10000;
}