/* Advanced Flight Booking System CSS */

/* Base Styles */
.afbs-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.afbs-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.afbs-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.afbs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.afbs-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.afbs-btn-secondary:hover {
    background: #e9ecef;
}

.afbs-btn-danger {
    background: #dc3545;
    color: white;
}

.afbs-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Search Form Styles */
.afbs-search-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.afbs-trip-type {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.afbs-trip-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.afbs-trip-type input[type="radio"] {
    accent-color: #667eea;
}

.afbs-search-fields {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.afbs-route-container {
    position: relative;
}

.afbs-route-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.afbs-route-segment:hover {
    border-color: #667eea;
}

.afbs-dates-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.afbs-field-group {
    position: relative;
}

.afbs-field-group label {
    display: block;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
    font-size: 14px;
}

.afbs-field-group input,
.afbs-field-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

.afbs-field-group input:focus,
.afbs-field-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.afbs-airport-input {
    position: relative;
}

.afbs-airport-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.afbs-airport-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.afbs-airport-suggestion:hover {
    background: #f8f9fa;
}

.afbs-airport-suggestion strong {
    color: #667eea;
}

.afbs-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
}

.afbs-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #667eea;
}

/* Passengers Dropdown */
.afbs-passengers-dropdown {
    position: relative;
}

.afbs-passengers-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.afbs-passengers-trigger:hover {
    border-color: #667eea;
}

.afbs-passengers-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    z-index: 1001;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.afbs-passenger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.afbs-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.afbs-counter button {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.afbs-counter button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.afbs-counter input {
    width: 60px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
}

.afbs-cabin-class {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.afbs-cabin-class label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Advanced Options */
.afbs-advanced-options {
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.afbs-advanced-toggle {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
}

.afbs-advanced-panel {
    display: none;
    margin-top: 20px;
}

.afbs-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.afbs-search-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Results Styles */
.afbs-results-container {
    margin-top: 30px;
}

.afbs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.afbs-results-summary {
    font-weight: 600;
    color: #343a40;
}

.afbs-results-filters {
    display: flex;
    gap: 20px;
    align-items: center;
}

.afbs-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.afbs-filter-group label {
    font-weight: 500;
    color: #6c757d;
    font-size: 14px;
}

.afbs-filter-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

.afbs-price-range {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.afbs-price-display {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

.afbs-additional-filters {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.afbs-filter-section {
    margin-bottom: 15px;
}

.afbs-filter-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
}

/* Flight Results */
.afbs-flight-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.afbs-flight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.afbs-flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.afbs-airline-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.afbs-airline-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #667eea;
}

.afbs-flight-price {
    text-align: right;
}

.afbs-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #28a745;
    margin: 0;
}

.afbs-price-per-person {
    font-size: 12px;
    color: #6c757d;
}

.afbs-flight-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.afbs-route-point {
    text-align: center;
}

.afbs-route-time {
    font-size: 20px;
    font-weight: 600;
    color: #343a40;
}

.afbs-route-airport {
    font-size: 14px;
    color: #6c757d;
}

.afbs-route-date {
    font-size: 12px;
    color: #adb5bd;
}

.afbs-route-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.afbs-duration {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.afbs-stops {
    font-size: 11px;
    color: #adb5bd;
}

.afbs-flight-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.afbs-detail-item {
    text-align: center;
}

.afbs-detail-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.afbs-detail-value {
    font-size: 13px;
    color: #343a40;
    font-weight: 500;
}

.afbs-flight-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.afbs-flight-badges {
    display: flex;
    gap: 8px;
}

.afbs-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.afbs-badge-direct {
    background: #e7f5e7;
    color: #28a745;
}

.afbs-badge-refundable {
    background: #e3f2fd;
    color: #2196f3;
}

.afbs-badge-wifi {
    background: #fff3e0;
    color: #ff9800;
}

/* Dashboard Styles */
.afbs-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.afbs-dashboard-header {
    margin-bottom: 30px;
}

.afbs-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.afbs-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.afbs-stat-card h3 {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 10px 0;
}

.afbs-stat-card p {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}

.afbs-dashboard-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.afbs-tab-nav {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.afbs-tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.afbs-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9ff;
}

.afbs-tab-content {
    padding: 30px;
}

.afbs-tab-panel {
    display: none;
}

.afbs-tab-panel.active {
    display: block;
}

/* Booking Cards */
.afbs-booking-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s ease;
}

.afbs-booking-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.afbs-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.afbs-booking-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.afbs-status-confirmed {
    background: #e7f5e7;
    color: #28a745;
}

.afbs-status-pending {
    background: #fff3cd;
    color: #856404;
}

.afbs-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.afbs-booking-details {
    margin-bottom: 15px;
}

.afbs-booking-details p {
    margin: 5px 0;
    color: #6c757d;
}

.afbs-booking-actions {
    display: flex;
    gap: 10px;
}

/* Alert Cards */
.afbs-alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.afbs-alert-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
}

.afbs-alert-route h4 {
    margin: 0 0 5px 0;
    color: #343a40;
}

.afbs-alert-price {
    text-align: center;
}

.afbs-target-price {
    font-size: 20px;
    font-weight: 600;
    color: #28a745;
}

/* Profile Form */
.afbs-profile-form {
    max-width: 600px;
}

.afbs-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.afbs-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Utilities */
.afbs-no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
}

.afbs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.afbs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: afbs-spin 1s linear infinite;
}

@keyframes afbs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .afbs-search-form {
        padding: 20px;
    }
    
    .afbs-route-segment {
        grid-template-columns: 1fr;
    }
    
    .afbs-dates-container {
        grid-template-columns: 1fr;
    }
    
    .afbs-flight-route {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .afbs-route-arrow {
        transform: rotate(90deg);
    }
    
    .afbs-flight-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .afbs-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .afbs-tab-nav {
        flex-direction: column;
    }
    
    .afbs-alert-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .afbs-booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .afbs-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .afbs-results-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .afbs-container {
        padding: 0 15px;
    }
    
    .afbs-search-actions {
        flex-direction: column;
    }
    
    .afbs-btn {
        width: 100%;
    }
    
    .afbs-flight-card {
        padding: 15px;
    }
    
    .afbs-price-amount {
        font-size: 24px;
    }
    
    .afbs-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
.afbs-fade-in {
    animation: afbs-fadeIn 0.3s ease-in;
}

@keyframes afbs-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.afbs-slide-up {
    animation: afbs-slideUp 0.3s ease-out;
}

@keyframes afbs-slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Print Styles */
@media print {
    .afbs-search-form,
    .afbs-results-filters,
    .afbs-flight-actions,
    .afbs-booking-actions {
        display: none;
    }
    
    .afbs-flight-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}