/* Flight Search Container */
.afs-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Tabs */
.afs-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.afs-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.afs-tab.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
    font-weight: 500;
}

/* Search Form */
.afs-search-form {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.afs-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.afs-form-group {
    flex: 1;
}

.afs-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #212529;
    font-weight: 500;
}

.afs-form-group input,
.afs-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.afs-form-group input:focus,
.afs-form-group select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.afs-passenger-select {
    display: flex;
    gap: 10px;
}

.afs-passenger-select select {
    flex: 1;
}

.afs-search-button {
    background: #0d6efd;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.15s ease-in-out;
}

.afs-search-button:hover {
    background: #0b5ed7;
}

/* Results Section */
.afs-results {
    display: none;
}

.afs-results.active {
    display: block;
}

.afs-results-container {
    display: flex;
    flex-wrap: wrap;
}

/* Filters */
.afs-filters-col {
    width: 25%;
    padding-right: 20px;
}

.afs-filters {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    position: sticky;
    top: 20px;
}

.afs-filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
}

.afs-filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.afs-filter-group h4 {
    margin: 0 0 15px 0;
    color: #212529;
    font-weight: 600;
    font-size: 16px;
}

.afs-filter-group label {
    display: block;
    margin-bottom: 10px;
    color: #495057;
    cursor: pointer;
}

.afs-filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.afs-price-slider {
    margin: 15px 0;
}

.afs-price-range {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
    color: #6c757d;
}

@media screen and (max-width: 767px) {
    .afs-airlines-filter{
        max-height: 190px;
        overflow-y: auto;
    }
}

/* Flights List */
.afs-flights-col {
    width: 75%;
}

.afs-sorting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.afs-sort-options {
    display: flex;
    gap: 10px;
}

.afs-sort-option {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.afs-sort-option.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.afs-flights-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Flight Card */
.afs-flight-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #dee2e6;
}
.afs-flight-card .card-body{
    position: relative;
}

.afs-flight-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.afs-flight-info {
    flex: 1;
}

.afs-airline-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
}

.afs-airline-name {
    position: absolute;
    top: 0;
    right: 0;
}

.afs-flight-route {
    display: flex;
    align-items: center;
    gap: 30px;
}

.afs-flight-time {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.afs-flight-airport {
    font-size: 14px;
    color: #6c757d;
}

/* Flight Route Styling */
.afs-duration-line {
    height: 2px;
    background: #dee2e6;
    width: 100%;
    position: relative;
    margin-bottom: 5px;
}

.afs-duration-line::before,
.afs-duration-line::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;
    position: absolute;
    top: -3px;
}

.afs-duration-line::before {
    left: 0;
}

.afs-duration-line::after {
    right: 0;
}

.afs-duration-time {
    font-size: 14px;
    color: #6c757d;
}

.afs-flight-stops {
    font-size: 14px;
    color: #6c757d;
}

.afs-flight-price {
    text-align: right;
    min-width: 150px;
}

.afs-price-amount {
    font-size: 24px;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 10px;
}

.afs-book-button {
    background: #0d6efd;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.15s ease-in-out;
}

.afs-book-button:hover {
    background: #0b5ed7;
    color: white;
    text-decoration: none;
}

/* Loading State */
.afs-loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.afs-loading.active {
    display: block;
}

/* Airplane Loader */
.afs-loader-container {
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    display: none;
    align-items: center;
    z-index: 9999;
    position-area: center;
    background: #fff;
    justify-content: center;
}
.afs-loader-container.active {
    display: flex;
}
.iata_code {
    font-size: 6rem;
    opacity:0.3;
    color: #0099cc;
}
.departure_city {
    margin-right: 6%;
}

.arrival_city {
    margin-left: 6%;
}

.plane {
    position: absolute;
    margin: 0 auto;
    width: 100%;
}

.plane-img {
    -webkit-animation: spin 2.5s linear infinite;
    -moz-animation: spin 2.5s linear infinite;
    animation: spin 2.5s linear infinite;
}

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

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

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
.earth-wrapper {
    position: absolute;
    margin: 0 auto;
    width: 100%;
}

.earth {
    width: 160px;
    height: 160px;
    background: url("https://zupimages.net/up/19/34/6vlb.gif");
    border-radius: 100%;
    background-size: 340px;
    animation: earthAnim 12s infinite linear;
    margin: 0 auto;
    border: 1px solid #CDD1D3;
}

@keyframes earthAnim {
    0% {background-position-x: 0;}
    100% {background-position-x: -340px;}
}

@media screen and (max-width: 420px) {
    .departure_city {
        left: 0;
        right: 0;
        top: 30%;
        position: absolute;
        margin: 0 auto;
    }

    .arrival_city {
        left: 0;
        right: 0;
        top: 93%;
        position: absolute;
        margin: 0 auto;
    }
}


/* No Results and Error States */
.afs-no-results,
.afs-error {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 992px) {
    .afs-filters-col,
    .afs-flights-col {
        width: 100%;
    }
    
    .afs-filters-col {
        padding-right: 0;
        margin-bottom: 20px;
    }
    
    .afs-filters {
        position: static;
    }
}

@media (max-width: 768px) {
    .afs-form-row {
        flex-direction: column;
        gap: 15px;
    }

    .afs-passenger-select {
        flex-direction: column;
    }

    .afs-flight-route {
        gap: 20px;
    }

    .afs-flight-price {
        text-align: center;
    }
    
    .afs-sorting {
        flex-direction: column;
        gap: 10px;
    }
    
    .afs-sort-options {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .afs-flight-card .col-md-3 {
        text-align: center;
        margin-top: 15px;
    }
} 

/* Simple Airport Autocomplete Styles */
.afs-airport-input-container {
    position: relative;
}

.afs-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.afs-autocomplete-dropdown.show {
    display: block;
}

.afs-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
}

.afs-autocomplete-item:hover,
.afs-autocomplete-item.active {
    background: #f8f9fa;
}

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

.afs-airport-code {
    font-weight: 600;
    color: #0d6efd;
}

.afs-airport-name {
    font-size: 14px;
    color: #212529;
}

.afs-airport-city {
    font-size: 12px;
    color: #6c757d;
}

/* Autocomplete loading, error, and no results states */
.afs-autocomplete-loading,
.afs-autocomplete-error,
.afs-autocomplete-no-results {
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}

.afs-autocomplete-loading {
    background-color: #f8f9fa;
    color: #495057;
}

.afs-autocomplete-loading::before {
    content: "🔍 ";
    margin-right: 5px;
}

.afs-autocomplete-error {
    background-color: #f8d7da;
    color: #721c24;
}

.afs-autocomplete-error::before {
    content: "⚠️ ";
    margin-right: 5px;
}

.afs-autocomplete-no-results {
    background-color: #fff3cd;
    color: #856404;
}

.afs-autocomplete-no-results::before {
    content: "ℹ️ ";
    margin-right: 5px;
} 

/* Pagination Styles */
.afs-results-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.afs-per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.afs-per-page-selector .form-label {
    margin-bottom: 0;
    font-size: 14px;
    color: #6c757d;
}

.afs-per-page-selector .form-select {
    min-width: 80px;
}


/* Simplified Pagination Styles */
.afs-pagination-wrapper {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.afs-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.afs-pagination-btn {
    min-width: 40px;
    height: 38px;
    padding: 0 !important;
    font-size: 14px !important;
    border: 1px solid #dee2e6 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.afs-pagination-btn:hover:not([disabled]) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.afs-pagination-btn.active {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.afs-pagination-btn[disabled] {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.afs-page-input {
    width: 60px !important;
    height: 32px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.afs-page-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .afs-pagination-wrapper {
        padding: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .afs-pagination-controls {
        gap: 0.25rem;
    }
    
    .afs-pagination-btn {
        min-width: 36px;
        height: 34px;
        padding: 4px 8px;
        font-size: 13px;
    }
    
    .afs-page-input {
        width: 50px !important;
        height: 30px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {    
    .afs-pagination-controls > span {
        order: -1;
    }
} 