﻿:root {
    --primary-green: #0e8741;
    /* Darker Gotadi Green */
    --hover-green: #0b6e35;
    --text-dark: #212121;
    --text-gray: #757575;
    --border-green: #0e8741;
    --bg-light: #f4f7f8;
    --white: #ffffff;
    --radius: 12px;
}

body {
    background-color: var(--bg-light);
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- HERO SECTION --- */
.flight-hero-section {
    padding: 40px 0;
    text-align: center;
/*    min-height: 80vh;*/
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flight-hero-headline {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
}

/* --- SEARCH WIDGET CONTAINER --- */
.flight-search-widget {
    background: transparent;
    width: 100%;
    max-width: 1140px;
    text-align: left;
    margin-bottom: 30px;
}

/* --- TRIP TYPE TABS --- */
.trip-type-tabs {
    margin-bottom: 12px;
    display: flex;
    gap: 24px;
    padding-left: 4px;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    transition: all 0.2s;
}

.radio-container:hover input~.checkmark {
    border-color: var(--primary-green);
}

.radio-container input:checked~.checkmark {
    border: 5px solid var(--primary-green);
}


/* --- MERGED INPUT GROUP --- */
.search-form-group {
    display: flex;
    border: 2px solid var(--border-green);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    height: 86px;
    overflow: visible;
}

/* Cells */
.input-cell {
    flex: 1;
    position: relative;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

/* Dividers */
.input-cell:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: #e0e0e0;
}

.input-cell:last-child {
    flex: 0 0 140px;
    padding: 0;
    border: none;
}

.input-cell:last-child::after {
    display: none;
}

.input-cell:hover:not(:last-child) {
    background-color: #f9fffb;
}


/* --- TEXT STYLES --- */
.input-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
    font-weight: 400;
}

.input-value-main {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.input-value-sub {
    font-size: 13px;
    color: var(--text-dark);
    margin-top: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* --- DATE CELL STYLES --- */
.date-content-wrapper {
    display: flex;
    flex-direction: column;
}

.date-line-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.date-day-big {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.date-month-year {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.date-weekday {
    font-size: 13px;
    color: #757575;
    margin-top: 2px;
}


/* --- SWAP ICON --- */
.swap-icon-absolute {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--primary-green);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    font-size: 12px;
}

.swap-icon-absolute:hover {
    transform: translateY(-50%) rotate(180deg);
}


/* --- SEARCH BUTTON --- */
.btn-search-hero {
    width: 100%;
    height: 100%;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: 0 9px 9px 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: none;
}

.btn-search-hero:hover {
    background-color: var(--hover-green);
}

/* --- FLEX RATIOS --- */
#cellFrom {
    flex: 1.6;
}

#cellTo {
    flex: 1.6;
    padding-left: 24px;
}

.col-date-cell {
    flex: 1.1;
}

#paxSelectorTrigger {
    flex: 1.2;
}


/* --- DROPDOWNS & POPOVERS --- */
.dropdown-menu-custom,
.pax-popover {
    display: none;
    position: absolute;
    top: 100%;
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border-radius: 8px;
    margin-top: 12px;
}

.dropdown-menu-custom {
    left: 0;
    width: 350px;
    padding: 10px;
}

.pax-popover {
    right: 0;
    left: auto;
    min-width: 320px;
    padding: 20px;
    cursor: default;
}

.pax-popover.show,
.dropdown-menu-custom.show {
    display: block;
}


.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: background 0.1s;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

.code {
    font-weight: bold;
    color: var(--primary-green);
    font-size: 14px;
}

/* --- PAX ITEMS --- */
.pax-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pax-info {
    display: flex;
    flex-direction: column;
}

.pax-type {
    font-weight: 600;
    font-size: 15px;
}

.pax-desc {
    font-size: 12px;
    color: #777;
}

.pax-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-counter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: var(--primary-green);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-counter:hover {
    border-color: var(--primary-green);
    background: #f0fff4;
}

.count-val {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* --- CLASS SELECTION --- */
.class-selection {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 20px;
}

.class-selection label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.class-selection input[type="radio"] {
    accent-color: var(--primary-green);
    width: 16px;
    height: 16px;
}

/* --- FLATPICKR CUSTOM THEME (PREMIUM) --- */
.flatpickr-calendar {
    font-family: 'Roboto', sans-serif;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    margin-top: 10px;
}

.flatpickr-calendar.showTimeInput {
    border-top: 1px solid #eee !important;
}

.flatpickr-months {
    background: white;
    padding: 10px 0;
    border-radius: 12px 12px 0 0;
}

.flatpickr-month {
    color: var(--text-dark) !important;
    fill: var(--text-dark) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    font-size: 16px !important;
}

.flatpickr-weekday {
    color: #999 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
}

.flatpickr-day {
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 8px !important;
    border: 1px solid transparent !important;
}

.flatpickr-day.today {
    border-color: var(--primary-green) !important;
    color: var(--primary-green) !important;
    background: transparent !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day:hover,
.flatpickr-day:focus {
    background: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    color: white !important;
    box-shadow: none !important;
}

.flatpickr-day.inRange {
    background: #e6f7ef !important;
    border-color: #e6f7ef !important;
    color: var(--primary-green) !important;
    box-shadow: none !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: var(--primary-green) !important;
    width: 14px;
    height: 14px;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: var(--hover-green) !important;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .search-form-group {
        flex-direction: column;
        height: auto;
        border: 1px solid var(--border-green);
    }

    .input-cell {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 12px 16px;
        flex: none !important;
    }

    .input-cell:last-child {
        flex: none !important;
        height: 50px;
    }

    .input-cell::after {
        display: none;
    }

    .btn-search-hero {
        border-radius: 0 0 11px 11px;
    }

    .swap-icon-absolute {
        display: none;
    }
}

/* --- UTILS --- */
.form-invisible {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    pointer-events: none;
    /* Let click pass through */
}

input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

/* Existing Result Styles ... (Condensed for brevity, assuming they are needed if results shown) */
.main-flight-content {
    padding-bottom: 50px;
}

.flight-sidebar .filter-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.flight-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    transition: 0.2s;
    border: 1px solid transparent;
}

.flight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-green);
}

.btn-select-flight {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-green);
}

.checkbox-container {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.checkmark-box {
    height: 18px;
    width: 18px;
    background: #eee;
    border-radius: 3px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.checkbox-container input:checked~.checkmark-box {
    background: var(--primary-green);
}

.range-slider {
    accent-color: var(--primary-green);
    width: 100%;
}

.flight-sort-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sort-item.active {
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-green);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.flight-loading,
.flight-empty {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
}

/* --- AIRPORT SELECTOR DROPDOWN (Simple) --- */
.input-cell {
    position: relative; /* Cần cho dropdown absolute */
}

.airport-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 4px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.airport-search-input {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    outline: none;
}

.airport-search-input::placeholder {
    color: #9CA3AF;
}

.airport-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Custom scrollbar cho dropdown */
.airport-list::-webkit-scrollbar {
    width: 6px;
}

.airport-list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.airport-list::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.airport-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.airport-item:hover {
    background: #e6f7ef;
}

.airport-code-badge {
    background: var(--primary-green);
    color: white;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    min-width: 45px;
    text-align: center;
}

.airport-details {
    flex: 1;
}

.airport-city {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.airport-name {
    font-size: 12px;
    color: var(--text-gray);
}
/* --- POPULAR ROUTES SECTION --- */
.popular-routes-section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header i {
    font-size: 32px;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 10px 0;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-gray);
    margin: 0;
}

.popular-routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1140px;
    margin: 0 auto;
}

.route-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.route-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--primary-green);
}

.airline-badge {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.airline-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.route-info {
    flex: 1;
}

.route-cities {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-cities i {
    font-size: 12px;
    color: var(--primary-green);
}

.route-codes {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
}

@media (max-width: 768px) {
    .popular-routes-grid {
        grid-template-columns: 1fr;
    }
}
