        /* استایل‌های عمومی */
        .dual-range-slider { position: relative; height: 20px; margin: 15px 0; }
        .dual-range-slider input[type=range] { position: absolute; width: 100%; pointer-events: none; -webkit-appearance: none; appearance: none; height: 0; z-index: 2; }
        .dual-range-slider input[type=range]::-webkit-slider-thumb { pointer-events: all; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #3b82f6; background: white; cursor: pointer; -webkit-appearance: none; margin-top: -8px; }
        .dual-range-slider input[type=range]::-moz-range-thumb { pointer-events: all; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #3b82f6; background: white; cursor: pointer; }
        .dual-range-slider .slider-track { position: absolute; height: 4px; background: #e5e7eb; border-radius: 2px; top: 8px; left: 0; right: 0; z-index: 1; }
        .dual-range-slider .slider-range { position: absolute; height: 4px; background: #3b82f6; border-radius: 2px; top: 8px; z-index: 1; }

        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
        .modal-overlay.active { display: flex; }
        .modal-container {
            background: white;
            border-radius: 1.5rem;
            width: 95%;
            max-width: 820px;
            max-height: 92vh;
            overflow-y: auto;
            padding: 2rem 2.2rem;
            position: relative;
            box-shadow: 0 30px 80px rgba(0,0,0,0.25);
            transition: all 0.3s ease;
        }
        .modal-container::-webkit-scrollbar { width: 6px; }
        .modal-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
        .modal-container::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 10px; }
        .modal-container::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

        .modal-close {
            position: sticky;
            top: 0;
            float: left;
            background: #f3f4f6;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            font-size: 1.3rem;
            cursor: pointer;
            color: #444;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            z-index: 10;
            margin-bottom: 0.5rem;
        }
        .modal-close:hover { background: #e5e7eb; color: #000; transform: rotate(90deg); }
        .modal-flight-summary { border-bottom: 1px solid #e5e7eb; padding-bottom: 1.25rem; margin-bottom: 1.25rem; }

        #loading-overlay {
            display: flex;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(255,255,255,0.8);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 1rem;
            transition: opacity 0.3s;
        }
        #loading-overlay.hidden { opacity: 0; pointer-events: none; }
        .spinner { width: 50px; height: 50px; border: 6px solid #e5e7eb; border-top: 6px solid #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .spinner-sm { width: 28px; height: 28px; border-width: 4px; }
        #flights-refresh:not([hidden]) { display: flex; justify-content: center; margin-bottom: 0.75rem; } /* shown above the list while the stored flights are being replaced */
        #loading-text { font-family: IRANYekanXFaNum, sans-serif; color: #333; font-size: 1rem; }

        .airport-select {
            appearance: none;
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 0.75rem;
            padding: 0.5rem 1rem 0.5rem 2rem; /* RTL: the arrow is on the left, so the room for it is too */
            font-family: IRANYekanXFaNum, sans-serif;
            font-weight: 600;
            font-size: 0.9rem;
            color: #1f2937;
            cursor: pointer;
            transition: all 0.2s;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: left 0.75rem center;
            background-size: 12px;
        }
        /* the search bar sticks below the sticky site header (h-16, md:h-20 + 1px border in layouts/header.php), not under it */
        #search-header { top: 65px; }
        @media (min-width: 768px) { #search-header { top: 81px; } }
        .airport-select:hover, .airport-select:focus {
            border-color: #3b82f6;
            outline: none;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .search-box {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: #f9fafb;
            padding: 0.5rem 1rem;
            border-radius: 1rem;
            border: 2px solid #e5e7eb;
            transition: all 0.2s;
            flex-wrap: wrap;
        }
        .search-box:hover { border-color: #3b82f6; }
        /* select2 boxes of the origin / destination (list-air.js): the look of the old native select */
        .select2-container { font-family: IRANYekanXFaNum, sans-serif; }
        .search-box .select2-container--default .select2-selection--single {
            height: auto; background: #fff; border: 2px solid #e5e7eb; border-radius: 0.75rem; transition: all 0.2s;
        }
        .search-box .select2-container--default .select2-selection--single .select2-selection__rendered {
            padding: 0.5rem 1rem 0.5rem 2rem; line-height: 1.5; font-weight: 600; font-size: 0.9rem; color: #1f2937;
        }
        .search-box .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; }
        .search-box .select2-container--default .select2-selection--single:hover,
        .search-box .select2-container--default.select2-container--open .select2-selection--single,
        .search-box .select2-container--default.select2-container--focus .select2-selection--single {
            border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        .select2-dropdown { border: 2px solid #3b82f6; border-radius: 0.75rem; overflow: hidden; min-width: 12rem; }
        .select2-search--dropdown .select2-search__field { border-radius: 0.5rem; font-family: inherit; }
        .select2-results__option { font-size: 0.9rem; }
        .swap-btn {
            display: inline-flex; align-items: center; justify-content: center;
            width: 2.25rem; height: 2.25rem; flex-shrink: 0;
            background: #fff;
            border: 2px solid #e5e7eb;
            border-radius: 50%;
            cursor: pointer;
            color: #6b7280;
            transition: all 0.2s;
        }
        .swap-btn:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
        .swap-btn:active svg { transform: scale(0.85); }
        .swap-btn svg { transition: transform 0.2s; }
        /* airline cards (renderAirlines in list-air.js): selected = primary border, tint, check mark and strip; not selected = faded */
        .airline-card { border-color: #e5e7eb; background: #fff; cursor: pointer; }
        .airline-card { flex-shrink: 0; }
        .airline-card .airline-name { border-radius: 0 0 10px 10px; } /* the card has a 2px border and rounded-xl corners */
        .airline-card .airline-name div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* a long name must not grow the strip over the logo; the card's title has it in full */
        /* the date of the search in the header: a readonly flatpickr input, the whole box opens the picker */
        .date-picker-box {
            display: flex; align-items: center; gap: 0.5rem; background: #fff; border: 2px solid #e5e7eb; border-radius: 0.75rem;
            padding: 0.5rem 1rem; cursor: pointer; transition: all 0.2s; color: #6b7280;
        }
        .date-picker-box:hover, .date-picker-box:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
        .date-picker-input { width: 5.5rem; border: 0; padding: 0; background: transparent; font-family: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1.5; color: #1f2937; cursor: pointer; text-align: center; }
        .date-picker-input:focus { outline: none; }
        .airline-card:hover { transform: scale(1.04); }
        .airline-card .airline-check {
            display: none; position: absolute; top: 6px; inset-inline-start: 6px; z-index: 1;
            width: 20px; height: 20px; border-radius: 50%; background: hsl(var(--primary)); color: #fff;
            font-size: 12px; line-height: 20px; text-align: center;
        }
        .airline-card.is-selected { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .06); box-shadow: 0 8px 20px hsl(var(--primary) / .25); }
        .airline-card.is-selected .airline-check { display: block; }
        .airline-card.is-selected .airline-name { background-image: linear-gradient(to right, hsl(var(--primary)), hsl(var(--primary-dark))); }
        .airline-card:not(.is-selected) { opacity: .55; filter: grayscale(1); }
        .airline-card:not(.is-selected):hover { opacity: .9; filter: none; }
        /* flight rows (renderFlights): the desktop row was about 800px wide whatever the list column is (784px at a 1100px window), so it pushed the price column out of the card.
           The parts now shrink, get tighter in a narrow list, and below 640px the list shows the compact (mobile) row. */
        #flights-list { container: flights / inline-size; }
        #flights-list .flex-1 { min-width: 0; }
        #flights-list .flight-logo { flex-shrink: 0; }
        #flights-list .flight-route { flex: 1 1 0; min-width: 0; }
        #flights-list .flight-point { flex: 0 1 auto; min-width: 6rem; }
        #flights-list .flight-point .truncate, #flights-list .flight-logo .truncate { white-space: normal; overflow: visible; } /* airport and airline names wrap instead of being cut */
        #flights-list .flight-track { flex: 0 1 18rem; min-width: 8rem; }
        @container flights (max-width: 900px) {
            #flights-list .flight-route { gap: 1rem; }
            #flights-list .flight-track { margin-inline: 0.5rem; }
            #flights-list .flight-logo > div:first-child { width: 4.5rem; height: 4.5rem; }
            #flights-list .flight-price { width: 10rem; padding: 1rem; }
            #flights-list .flight-amount { font-size: 1.5rem; }
        }
        @container flights (max-width: 639px) {
            #flights-list .flight-desktop { display: none; }
            #flights-list .flight-mobile { display: block; }
        }
        .hide-scrollbar::-webkit-scrollbar { display: none; }
        .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        @media (max-width: 640px) {
            .modal-container { padding: 1.2rem; max-width: 98%; }
        }
