:root {
    --b2e-primary: #0f3f6f;
    --b2e-primary-2: #1f6db2;
    --b2e-primary-3: #0b2d4f;
    --b2e-bg: #f3f6fb;
    --b2e-card: #ffffff;
    --b2e-text: #1e293b;
    --b2e-muted: #5f6b7a;
    --b2e-border: #dbe3ef;
    --b2e-focus: #1f6db2;
}

html {
    font-size: 15px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    min-height: 100vh;
    background: var(--b2e-bg);
    color: var(--b2e-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.5;
    font-size: 0.94rem;
    letter-spacing: 0.1px;
}

h1, .h1 { font-size: 1.7rem; }
h2, .h2 { font-size: 1.4rem; }
h3, .h3 { font-size: 1.2rem; }
h4, .h4 { font-size: 1.08rem; }
h5, .h5 { font-size: 0.98rem; }

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--b2e-muted);
    margin-bottom: 0.3rem;
}

.form-control,
.form-select {
    font-size: 0.9rem;
    padding: 0.45rem 0.7rem;
}

a {
    color: var(--b2e-primary-2);
}

a:hover {
    color: var(--b2e-primary-3);
}

.b2e-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.b2e-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.b2e-main-wrapper {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn:focus-visible,
.btn:active:focus-visible,
.btn-link.nav-link:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.12rem #fff, 0 0 0 0.26rem rgba(31, 109, 178, 0.45);
}

.form-control,
.form-select {
    border-color: var(--b2e-border);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--b2e-focus);
}

.navbar-brand {
    font-weight: 700;
    color: var(--b2e-primary) !important;
}

.navbar-brand .brand-icon {
    color: var(--b2e-primary-2);
    font-size: 1.05rem;
}

.b2e-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(219, 227, 239, 0.9);
    box-shadow: 0 8px 20px rgba(16, 45, 80, 0.05);
}

.b2e-navbar .nav-link {
    color: var(--b2e-text);
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
}

.b2e-navbar .nav-link:hover,
.b2e-navbar .nav-link:focus-visible {
    background: #eef4fb;
    color: var(--b2e-primary-3);
}

.b2e-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f7faff;
    border: 1px solid var(--b2e-border);
    border-radius: 999px;
    padding: 0.35rem 0.5rem;
}

.b2e-language-switch .btn {
    border-radius: 999px;
    min-width: 4.25rem;
}

.btn-b2e {
    background: linear-gradient(135deg, var(--b2e-primary), var(--b2e-primary-2));
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15, 63, 111, 0.22);
}

.btn-b2e:hover,
.btn-b2e:focus-visible {
    color: #fff;
    filter: brightness(0.97);
}

.btn-b2e:disabled,
.btn-b2e.disabled,
.btn-b2e[data-loading="1"] {
    color: #fff;
    opacity: 1;
    filter: saturate(0.9) brightness(0.96);
    cursor: progress;
}

.btn-b2e:disabled .spinner-border,
.btn-b2e[data-loading="1"] .spinner-border {
    color: #fff;
}

.b2e-hero {
    background: linear-gradient(145deg, var(--b2e-primary), var(--b2e-primary-2));
    color: #fff;
    border-radius: 24px;
    padding: clamp(2rem, 5vw, 3.5rem);
    box-shadow: 0 20px 36px rgba(15, 63, 111, 0.24);
}

.b2e-hero h1 {
    font-weight: 700;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    line-height: 1.3;
}

.b2e-hero .lead {
    max-width: 42rem;
}

.b2e-highlight-panel {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 1.25rem;
}

.b2e-highlight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.b2e-highlight-row strong {
    font-weight: 700;
}

.b2e-feature {
    background: var(--b2e-card);
    border: 1px solid var(--b2e-border);
    border-radius: 18px;
    padding: 1.65rem;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 24px rgba(16, 45, 80, 0.05);
}

.b2e-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(16, 45, 80, 0.09);
}

.b2e-feature .icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.b2e-auth-card,
.b2e-section-card,
.b2e-error-card {
    background: var(--b2e-card);
    border: 1px solid var(--b2e-border);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(16, 45, 80, 0.08);
}

.b2e-auth-card {
    padding: 2rem;
    max-width: 500px;
    margin: 2.75rem auto;
}

.b2e-auth-card .nav-pills .nav-link {
    border-radius: 12px;
    font-weight: 600;
}

.b2e-auth-card .nav-pills .nav-link.active {
    background-color: var(--b2e-primary);
}

.b2e-section-card,
.b2e-error-card {
    padding: 1.1rem 1.2rem;
}

.b2e-otp-input {
    letter-spacing: 0.4rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    direction: ltr;
}

.b2e-booking-card {
    background: var(--b2e-card);
    border: 1px solid var(--b2e-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.b2e-booking-card:hover,
.b2e-booking-card:focus-visible {
    box-shadow: 0 12px 30px rgba(16, 45, 80, 0.1);
    transform: translateY(-2px);
    border-color: #b6c7df;
    color: inherit;
}

.b2e-status {
    display: inline-block;
    padding: 0.34rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.b2e-status.pending {
    background: #fef3c7;
    color: #7a5107;
}

.b2e-status.underrequest {
    background: #dbeafe;
    color: #173b8f;
}

.b2e-status.completed {
    background: #dcfce7;
    color: #166534;
}

.b2e-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.b2e-status.ticketed {
    background: #dbeafe;
    color: #1d4ed8;
}

.b2e-status.booked {
    background: #fef3c7;
    color: #7a5107;
}

.b2e-completed-card {
    border-inline-start: 4px solid var(--b2e-primary-2);
}

.b2e-completed-card.is-cancelled {
    border-inline-start-color: #dc3545;
}

.b2e-airline-badge {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-size: 1.25rem;
}

/* Real airline logo: an <img> with a text carrier-code fallback layered behind it.
   airline-logo.js reveals the fallback (adds .is-fallback) ONLY when the image fails.
   The tile is a clean white card so brand logos (which carry their own colours) sit
   nicely without clashing with the app's blue badge background. */
.b2e-airline-logo-wrap {
    position: relative;
    overflow: hidden;
    /* Self-sufficient size so the tile can never balloon even if a base badge
       class is missing or overridden. Variants below override these. */
    width: 44px;
    height: 44px;
    padding: 5px;
    background: #fff !important;
    border: 1px solid #e6edf6;
    box-shadow: none !important;
    /* Never let a flex/grid parent stretch the tile into a giant square. */
    flex: 0 0 auto;
    align-self: center;
    box-sizing: border-box;
}

.b2e-airline-logo-wrap .b2e-airline-logo-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: auto;
    object-fit: contain;
    border-radius: 6px;
}

.b2e-airline-logo-wrap .b2e-airline-logo-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
}

/* When the image loads (default), the fallback stays completely hidden. */
.b2e-airline-logo-wrap.is-fallback .b2e-airline-logo-img {
    display: none;
}

.b2e-airline-logo-wrap.is-fallback .b2e-airline-logo-fallback {
    display: flex;
}

/* Small logo used inside filter rows and segment lists. The kiwi.com logos carry
   their own background, so for the tiny variant we drop the tile padding/border and
   let the logo fill a clean rounded square. */
.b2e-airline-logo-xs {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 6px;
    padding: 0;
    border: none;
    font-size: 0;
    vertical-align: middle;
}

.b2e-airline-logo-xs .b2e-airline-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.b2e-airline-logo-xs .b2e-airline-logo-fallback {
    font-size: 0.5rem;
}

.b2e-filter-check .b2e-airline-logo-xs {
    margin-inline-end: 8px;
}

.b2e-route-line .b2e-airport {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--b2e-text);
}

.b2e-route-line .b2e-route-arrow {
    color: var(--b2e-primary-2);
    font-size: 1.15rem;
    font-weight: 700;
}

/* Airport From/To autocomplete dropdown */
.b2e-airport-ac {
    position: relative;
}

.b2e-airport-menu {
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    top: calc(100% + 4px);
    z-index: 1060;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 12px 28px rgba(11, 45, 79, 0.18);
    border-radius: 12px;
    border: 1px solid #dbe6f3;
    background: #fff;
    padding: 4px;
}

.b2e-airport-menu .b2e-airport-option {
    border: 0;
    border-radius: 8px;
    text-align: start;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
}

.b2e-airport-menu .b2e-airport-option.active,
.b2e-airport-menu .b2e-airport-option:hover {
    background: #edf4fd;
    color: var(--b2e-primary-2);
}

/* Round-trip informational note (departure step) */
.b2e-roundtrip-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: #edf4fd;
    border: 1px solid #d4e4f7;
    color: var(--b2e-text);
}

.b2e-roundtrip-note .small {
    color: var(--b2e-primary-2);
}

.b2e-rt-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--b2e-primary-2);
    color: #fff;
    font-size: 1rem;
    transform: rotate(45deg);
}

.b2e-amadeus-json {
    background: #0b2d4f;
    color: #e6eef8;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.8rem;
    line-height: 1.45;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
}

.b2e-kv {
    color: var(--b2e-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.b2e-error-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff0f0;
    color: #b42318;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.b2e-footer {
    padding: 1rem 0;
    background: #fff;
    border-top: 1px solid var(--b2e-border);
    color: var(--b2e-muted);
}

[dir="rtl"] .b2e-navbar .nav-link,
[dir="rtl"] .b2e-auth-card,
[dir="rtl"] .b2e-section-card,
[dir="rtl"] .b2e-error-card {
    text-align: right;
}

@media (max-width: 991.98px) {
    .b2e-main-wrapper {
        margin-top: 1.25rem;
    }

    .b2e-language-switch {
        margin-bottom: 0.75rem;
    }

    .b2e-language-switch .small {
        display: none;
    }
}

/* ---------- Flight booking components ---------- */

.nav-ico {
    font-size: 0.9em;
    margin-inline-end: 0.15rem;
    opacity: 0.9;
}

.b2e-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(11, 45, 79, 0.86), rgba(31, 109, 178, 0.72)),
        url("/img/flight-hero.jpg") center/cover no-repeat, var(--b2e-primary);
    color: #fff;
    border-radius: 20px;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    box-shadow: 0 18px 34px rgba(15, 63, 111, 0.22);
}

.b2e-hero-content { position: relative; z-index: 2; }

.b2e-hero-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.b2e-flight-search .form-check-label { font-weight: 600; }

.b2e-summary-banner {
    background: linear-gradient(135deg, var(--b2e-primary), var(--b2e-primary-2));
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 14px 30px rgba(15, 63, 111, 0.2);
}

.b2e-offer-card {
    background: var(--b2e-card);
    border: 1px solid var(--b2e-border);
    border-radius: 16px;
    padding: 1.05rem 1.25rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.b2e-offer-card:hover {
    border-color: #b6c7df;
    box-shadow: 0 12px 28px rgba(16, 45, 80, 0.1);
    transform: translateY(-1px);
}

/* Premium airline logo tile (initials rendered as a rounded pill logo). */
.b2e-airline-logo {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef4fd, #dfeafb);
    color: var(--b2e-primary);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: 1px solid #d7e4f6;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* "Direct" / stops pill shown beneath the flight times. */
.b2e-direct-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1f9d55;
    line-height: 1.2;
}

.b2e-direct-pill.has-stops { color: #b45309; }

.b2e-direct-pill svg { width: 13px; height: 13px; }

/* Trailing price / additional-price cluster on each offer row. */
.b2e-offer-pricecol {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

/* Combined round trips: the departure step has no separate price (the single
   trip total is shown on the return cards), so keep the cell tidy and centered. */
.b2e-offer-pricecol--departure {
    justify-content: center;
}

.b2e-offer-pricecol--departure .b2e-price-hint {
    text-align: end;
}

.b2e-offer-pricecol .b2e-price-label {
    font-size: 0.7rem;
    color: var(--b2e-muted);
    font-weight: 600;
}

.b2e-offer-pricecol .b2e-price-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b2e-primary);
}

.b2e-offer-pricecol .b2e-price-hint {
    font-size: 0.66rem;
    line-height: 1.15;
    color: var(--b2e-muted);
    max-width: 12rem;
    margin-top: 0.1rem;
}

.b2e-offer-pricecol .b2e-price-add {
    font-size: 1rem;
    font-weight: 800;
    color: #1f9d55;
}

.b2e-view-details-link {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
    text-decoration: none;
    white-space: nowrap;
}

.b2e-view-details-link:hover { text-decoration: underline; }

/* Rounded pill select button matching the reference. */
.b2e-select-btn {
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    min-width: 104px;
}

/* Selected-departure summary card (round-trip step 2 header). */
.b2e-selected-departure {
    border: 1px solid #cbe6d5;
    background: linear-gradient(180deg, #f3fbf6, #ffffff);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 22px rgba(22, 101, 52, 0.08);
}

.b2e-selected-departure-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.b2e-selected-departure-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #166534;
    font-size: 0.95rem;
}

.b2e-selected-check {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1f9d55;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.b2e-selected-departure-body {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.b2e-selected-departure-times {
    font-weight: 700;
    color: var(--b2e-text);
    font-size: 1rem;
}

.b2e-selected-departure-route {
    font-size: 0.78rem;
    color: var(--b2e-muted);
    font-weight: 600;
}

.b2e-selected-departure-price {
    margin-inline-start: auto;
    text-align: end;
}

.b2e-selected-departure-price .amt {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--b2e-primary);
}

.b2e-selected-departure-price .tag {
    font-size: 0.7rem;
    color: var(--b2e-muted);
    font-weight: 600;
}

/* Sort tabs strip (Cheapest / Best value / Shortest / Sort by other). */
.b2e-sort-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    background: #f1f5fb;
    border: 1px solid var(--b2e-border);
    border-radius: 12px;
    padding: 0.3rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.b2e-sort-tab {
    flex: 1 1 0;
    min-width: 120px;
    border: none;
    background: transparent;
    border-radius: 9px;
    padding: 0.45rem 0.7rem;
    text-align: center;
    cursor: pointer;
    color: #55617a;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.b2e-sort-tab .b2e-sort-tab-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.b2e-sort-tab .b2e-sort-tab-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--b2e-muted);
    font-weight: 600;
}

.b2e-sort-tab.active {
    background: #fff;
    color: var(--b2e-primary-2);
    box-shadow: 0 4px 12px rgba(16, 45, 80, 0.1);
}

.b2e-sort-tab.active .b2e-sort-tab-sub { color: var(--b2e-primary-2); }

/* ------------------------------------------------------------------ */
/* Offer-card balanced layout (airline | itinerary | info | price)      */
/* ------------------------------------------------------------------ */
.b2e-offer-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(300px, 2.4fr) minmax(150px, 1.2fr) minmax(150px, 1.1fr);
    align-items: center;
    gap: 1.25rem;
}

.b2e-offer-airline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Baggage / seat info gets its own column instead of stacking on the price. */
.b2e-offer-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

.b2e-offer-info .b2e-offer-chips {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0;
}

.b2e-offer-pricecol .b2e-select-btn {
    margin-top: 0.35rem;
}

@media (max-width: 991.98px) {
    .b2e-offer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.85rem 1rem;
    }
    .b2e-offer-airline { grid-column: 1 / -1; }
    .b2e-offer-itinerary { grid-column: 1 / -1; }
    .b2e-offer-pricecol { align-items: flex-end; }
}

@media (max-width: 575.98px) {
    .b2e-offer-grid { grid-template-columns: 1fr; }
    .b2e-offer-info,
    .b2e-offer-pricecol { align-items: flex-start; text-align: start; }
}

/* ------------------------------------------------------------------ */
/* Branded fares (upsell) modal                                         */
/* ------------------------------------------------------------------ */
/* DEPARTURE stays blue and RETURN uses the single shared accent (#d98324)
   everywhere - including inside the upgrade modal - so the two directions are
   consistently color-coded across the whole flow. */
#upsellModal .b2e-leg-tag.return,
#upsellModal .b2e-leg-panel-tag.return {
    background: #fdf0dd;
    color: #d98324;
}

.b2e-upsell-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.b2e-fare-summary {
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    background: #f7faff;
    padding: 1rem;
    position: sticky;
    top: 0;
}

.b2e-fare-summary-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.75rem;
}

.b2e-fare-summary-leg {
    padding: 0.6rem 0;
    border-top: 1px dashed var(--b2e-border);
}

.b2e-fare-summary-leg:first-of-type { border-top: none; }

.b2e-fare-summary-tag {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--b2e-primary-2);
    margin-bottom: 0.25rem;
}

.b2e-fare-summary-tag.return {
    color: #d98324;
}

.b2e-fare-summary-route {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--b2e-text);
}

.b2e-fare-summary-times {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
    margin-top: 0.1rem;
}

.b2e-fare-summary-meta {
    font-size: 0.74rem;
    color: var(--b2e-muted);
}

.b2e-upsell-main {
    min-width: 0;
    position: relative;
}

.b2e-upsell-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
    color: var(--b2e-muted);
}

.b2e-tier-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.6rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.b2e-tier-grid::-webkit-scrollbar {
    height: 8px;
}

.b2e-tier-grid::-webkit-scrollbar-thumb {
    background: #c7d2e0;
    border-radius: 999px;
}

.b2e-tier-grid::-webkit-scrollbar-track {
    background: transparent;
}

.b2e-tier-card {
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    background: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    flex: 0 0 240px;
    width: 240px;
    scroll-snap-align: start;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.b2e-tier-card:hover {
    border-color: #b6c7df;
    box-shadow: 0 10px 24px rgba(16, 45, 80, 0.1);
    transform: translateY(-1px);
}

.b2e-tier-card.selected {
    border-color: var(--b2e-primary-2);
    background: #f2f8fd;
    box-shadow: 0 0 0 3px rgba(31, 109, 178, 0.28), 0 12px 26px rgba(16, 45, 80, 0.12);
    transform: translateY(-1px);
}

/* Corner ribbon check so the chosen fare is unmistakable. */
.b2e-tier-card.selected::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    width: 34px;
    height: 34px;
    background: var(--b2e-primary-2);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    border-start-end-radius: 14px;
}

.b2e-tier-card.selected::after {
    content: "";
    position: absolute;
    inset-block-start: 5px;
    inset-inline-end: 5px;
    width: 12px;
    height: 8px;
    border-inline-start: 2px solid #fff;
    border-block-end: 2px solid #fff;
    transform: rotate(-45deg);
}

.b2e-tier-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.b2e-tier-name {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--b2e-text);
}

.b2e-tier-delta {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1f9d55;
    white-space: nowrap;
}

.b2e-tier-delta.zero { color: var(--b2e-muted); }

.b2e-tier-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #374151;
    margin: 0.6rem 0 0.3rem;
}

.b2e-tier-feats {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.b2e-tier-feats li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #4b5563;
    padding: 0.15rem 0;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.b2e-feat-icon {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 0.1rem;
}

.b2e-feat-icon.ok { color: #1f9d55; }
.b2e-feat-icon.no { color: #cbd5e1; }

.b2e-tier-card .b2e-pick-tier {
    margin-top: auto;
    border-radius: 999px;
    font-weight: 700;
}

.b2e-tier-card .b2e-pick-tier.is-selected {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.b2e-pick-check {
    width: 15px;
    height: 15px;
}

@media (max-width: 767.98px) {
    .b2e-upsell-layout { grid-template-columns: 1fr; }
    .b2e-fare-summary { position: static; }
    .b2e-tier-card { flex-basis: 220px; width: 220px; }
}

.b2e-offer-card.selected {
    border-color: var(--b2e-primary-2);
    box-shadow: 0 0 0 2px rgba(31, 109, 178, 0.35);
    position: relative;
}

.b2e-offer-card.selected::after {
    content: "✓";
    position: absolute;
    top: -10px;
    inset-inline-end: -10px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1f9d55;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(22, 101, 52, 0.3);
}

.b2e-offer-card.selected .b2e-select-btn {
    background: var(--b2e-primary-2);
    color: #fff;
    border-color: var(--b2e-primary-2);
}

.b2e-offer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.b2e-offer-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid var(--b2e-border);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    line-height: 1.2;
}

.b2e-offer-chip.warn {
    color: #b45309;
    background: #fff7ed;
    border-color: #fed7aa;
}

/* ------------------------------------------------------------------ */
/* Flight results: filter sidebar + main column                        */
/* ------------------------------------------------------------------ */
.b2e-results-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.b2e-filter-aside {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.b2e-filter-card {
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}

.b2e-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.b2e-filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.b2e-filter-reset {
    color: var(--b2e-primary-2);
    text-decoration: none;
}

.b2e-filter-group {
    padding: 0.85rem 0;
    border-top: 1px solid var(--b2e-border);
}

.b2e-filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.b2e-filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    padding: 0.2rem 0;
    cursor: pointer;
    margin: 0;
}

.b2e-filter-check .form-check-input {
    margin: 0;
    flex-shrink: 0;
}

.b2e-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

/* Two-step round-trip selection (departure -> return). */
.b2e-stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.b2e-stepper-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: #f1f5fb;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.b2e-stepper-item:not(:last-child)::after {
    content: "";
    width: 22px;
    height: 2px;
    background: #d7e0ee;
    margin-inline-start: 0.5rem;
}

.b2e-stepper-num {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d7e0ee;
    color: #55617a;
    font-size: 0.78rem;
    font-weight: 700;
}

.b2e-stepper-item.active {
    background: #edf4fd;
    color: var(--b2e-primary-2);
    border-color: #cfe1f6;
}

.b2e-stepper-item.active .b2e-stepper-num {
    background: var(--b2e-primary-2);
    color: #fff;
}

.b2e-stepper-item.done {
    color: #1f9d55;
    background: #eef8f0;
}

.b2e-stepper-item.done .b2e-stepper-num {
    background: #1f9d55;
    color: #fff;
}

.b2e-chosen-outbound {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: 12px;
    background: #f6f9fe;
    border: 1px solid var(--b2e-border);
}

.b2e-change-departure {
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.b2e-chosen-summary {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 600;
}


.b2e-results-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.b2e-results-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
    background: #edf4fd;
    border: 1px solid #d7e6f7;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    white-space: nowrap;
}

.b2e-no-results {
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--b2e-border);
    border-radius: 14px;
    color: #6b7280;
    background: #fff;
}

@media (max-width: 991.98px) {
    .b2e-results-layout {
        grid-template-columns: 1fr;
    }
    .b2e-filter-aside {
        position: static;
    }
}

.b2e-airline-badge {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.b2e-price { color: var(--b2e-primary); font-weight: 700; }

.b2e-selection-bar {
    background: #ffffff;
    border: 1px solid var(--b2e-border);
    border-radius: 999px;
    padding: 0.75rem 0.85rem 0.75rem 1.35rem;
    position: sticky;
    bottom: 1.25rem;
    z-index: 20;
    box-shadow: 0 14px 34px rgba(16, 45, 80, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
    animation: b2eBarRise 0.35s ease both;
    margin-bottom: 1.25rem;
}

@keyframes b2eBarRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.b2e-selection-bar:not(.ready) {
    animation: b2eBarRise 0.35s ease both, b2eBarPulse 2.4s ease-in-out 0.5s infinite;
}

@keyframes b2eBarPulse {
    0%, 100% { box-shadow: 0 14px 34px rgba(16, 45, 80, 0.18); }
    50% { box-shadow: 0 14px 34px rgba(16, 45, 80, 0.18), 0 0 0 6px rgba(31, 109, 178, 0.10); }
}

.b2e-selection-bar.ready {
    background: #eef8f0;
    border-color: #86c79a;
    box-shadow: 0 16px 38px rgba(22, 101, 52, 0.22);
}

.b2e-selection-bar #continueBtn {
    border-radius: 999px;
}

.b2e-sel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cdd8e8;
    border: 2px solid #cdd8e8;
    flex: 0 0 auto;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.b2e-sel-dot:not(.done) {
    animation: b2eDotBlink 1.6s ease-in-out infinite;
}

@keyframes b2eDotBlink {
    0%, 100% { background: #cdd8e8; border-color: #cdd8e8; }
    50% { background: var(--b2e-primary-2); border-color: var(--b2e-primary-2); }
}

.b2e-sel-dot.done {
    background: #1f9d55;
    border-color: #1f9d55;
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .b2e-selection-bar,
    .b2e-selection-bar:not(.ready),
    .b2e-sel-dot:not(.done) {
        animation: none;
    }
}

/* Bundled offer legs (outbound + return shown on one card). */
.b2e-leg-detail {
    display: grid;
    grid-template-columns: 84px 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.b2e-leg-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: #e3f0ff;
    color: #0b5ed7;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.b2e-leg-tag.return {
    background: #fdf0dd;
    color: #d98324;
}

/* ---- Two-step round-trip: color-coded departure vs return cards ---------- */
/* Step 1 departure cards carry a blue inline-start accent (matches the blue
   DEPARTURE tag); step 2 return cards carry an amber accent (matches RETURN),
   so the two directions are instantly distinguishable. */
.b2e-offer-card--departure {
    border-inline-start: 4px solid #0b5ed7;
}

.b2e-offer-card--departure:hover {
    border-color: #9dc0f2;
}

.b2e-offer-card--return {
    border-inline-start: 4px solid #d98324;
}

.b2e-offer-card--return:hover {
    border-color: #eabb84;
}

.b2e-offer-card--return.selected {
    border-color: #d98324;
    box-shadow: 0 0 0 2px rgba(217, 131, 36, 0.4);
}

.b2e-offer-card--return.selected .b2e-select-btn {
    background: #d98324;
    border-color: #d98324;
    color: #fff;
}

.b2e-offer-card--return.selected::after {
    background: #d98324;
    box-shadow: 0 4px 10px rgba(217, 131, 36, 0.35);
}

/* Step-2 header: back-to-departure control plus the chosen-departure recap. */
.b2e-return-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: 12px;
    background: #f5f8fd;
    border: 1px solid var(--b2e-border);
}

.b2e-change-departure {
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.b2e-return-recap {
    font-size: 0.85rem;
    font-weight: 600;
}

.b2e-return-recap .b2e-leg-tag {
    margin-inline-end: 0.4rem;
}

/* Rich "Selected departure flight" summary shown at the top of step 2. Mirrors
   the Wego pattern: green-check header, a Change control, and a compact echo of
   the chosen outbound leg with its round-trip total. */
.b2e-depart-summary {
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    background: #f2f8f4;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.b2e-depart-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.b2e-depart-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: #0f5132;
}

.b2e-depart-check {
    width: 18px;
    height: 18px;
    color: #1a7f45;
    flex: 0 0 auto;
}

.b2e-depart-summary .b2e-change-departure {
    color: var(--b2e-primary, #0b5ed7);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--b2e-primary, #0b5ed7);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    line-height: 1.2;
    background: #fff;
    transition: background-color .15s ease, color .15s ease;
}

.b2e-depart-summary .b2e-change-departure:hover {
    background: var(--b2e-primary, #0b5ed7);
    color: #fff;
}

.b2e-depart-summary-body {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 2fr) auto auto;
    align-items: center;
    gap: 1rem;
}

/* Step-2 heading above the return list. */
.b2e-return-heading {
    margin: 0.25rem 0 0.85rem;
}

.b2e-return-heading-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.b2e-return-heading-sub {
    font-size: 0.85rem;
    color: var(--b2e-muted, #6c757d);
    margin: 0.15rem 0 0;
}

/* Once a departure is chosen the long list collapses to just the selected card
   so the return panel is immediately reachable. */
.b2e-offer-card.b2e-leg-collapsed {
    display: none;
}

/* Combined single-query round trips: only the return itineraries bundled with the
   chosen departure are valid one-PNR offers, so hide every other return card. */
.b2e-offer-card.b2e-return-hidden {
    display: none !important;
}

/* Step header above each leg's list (Departure / Return). A small pill tag sits
   above a clear title, with an optional "Change" link pinned to the end. */
.b2e-leg-panel-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin: 1.25rem 0 0.85rem;
}

.b2e-leg-panel-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--b2e-primary-2, #0b5ed7);
    background: #eaf1fb;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    line-height: 1;
    flex: 0 0 auto;
    order: 1;
}

/* Force the title onto its own row (below the tag pill) so the route can sit
   inline right after the heading text. */
.b2e-leg-panel-head::after {
    content: "";
    flex-basis: 100%;
    height: 0;
    order: 2;
}

.b2e-leg-panel-tag.return {
    color: #d98324;
    background: #fdf0dd;
}

.b2e-leg-panel-title {
    flex: 0 1 auto;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--b2e-ink, #1f2d3d);
    order: 3;
}

.b2e-leg-panel-head .b2e-return-heading-sub {
    flex: 1 1 100%;
    order: 6;
}

/* Route (e.g. "MED → RUH") shown inline right after the panel title so the user
   sees exactly which direction they're choosing a flight for. */
.b2e-leg-panel-route {
    flex: 0 1 auto;
    order: 4;
    align-self: baseline;
    font-size: 1rem;
    font-weight: 700;
    color: var(--b2e-primary-2, #0b5ed7);
}

.b2e-leg-panel-route span {
    margin-inline: 0.15rem;
}

.b2e-change-leg {
    margin-inline-start: auto;
    padding: 0;
    font-weight: 600;
    text-decoration: none;
    order: 5;
}

/* Per-leg upsell tabs inside the "Upgrade your fare" modal. Segmented control
   with a title on top and the chosen fare price/checkmark underneath. */
.b2e-upsell-tabs {
    display: flex;
    gap: 0.4rem;
    background: #f1f5fb;
    border: 1px solid var(--b2e-border, #e2e8f0);
    border-radius: 12px;
    padding: 0.3rem;
    margin-bottom: 1rem;
}

.b2e-upsell-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    border: none;
    background: transparent;
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #55617a;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.b2e-upsell-tab .b2e-upsell-tab-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.b2e-upsell-tab .b2e-upsell-tab-route {
    font-size: 0.72rem;
    font-weight: 600;
    color: #55617a;
    line-height: 1.1;
}

.b2e-upsell-tab.active .b2e-upsell-tab-route {
    color: var(--b2e-primary-2, #0b5ed7);
}

.b2e-upsell-tab .b2e-upsell-tab-state {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--b2e-muted, #6c757d);
    min-height: 1rem;
}

.b2e-upsell-tab.active {
    background: #fff;
    color: var(--b2e-primary-2, #0b5ed7);
    box-shadow: 0 4px 12px rgba(16, 45, 80, 0.1);
}

.b2e-upsell-tab.active .b2e-upsell-tab-state {
    color: var(--b2e-primary-2, #0b5ed7);
}

/* RETURN tab carries the shared #d98324 accent so the modal header matches the
   departure/return color-coding used across the rest of the flow. */
#upsellTabReturn .b2e-upsell-tab-route,
#upsellTabReturn.active .b2e-upsell-tab-route,
#upsellTabReturn.active .b2e-upsell-tab-state,
#upsellTabReturn.active {
    color: #d98324;
}

/* Combined round-trip live "Trip total" shown in the upsell modal footer. It sits
   at the start (inline) so the action buttons stay at the end. */
.b2e-upsell-triptotal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-inline-end: auto;
    line-height: 1.15;
}

.b2e-upsell-triptotal-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--b2e-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.b2e-upsell-triptotal-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--b2e-primary-2, #0b5ed7);
}

/* Small helper under the total explaining it's the airline's combined whole-trip
   price, so the per-leg "+" upgrade badges are never mistaken for additive costs. */
.b2e-upsell-triptotal-note {
    font-size: 0.68rem;
    color: var(--b2e-muted, #6c757d);
    max-width: 32ch;
}

/* Collapsible cancellation & change policy section. The airline supplies the
   penalty rules as free text (from the priced offer's detailed-fare-rules), so
   we show a toggle that reveals the full policy text. Shared by the upsell
   modal, the Passenger review card and the Dashboard booking details. */
.b2e-upsell-cancellation {
    flex: 1 1 100%;
    margin-top: 0.5rem;
}

.b2e-policy {
    border: 1px solid var(--b2e-border, #e0e3e8);
    border-radius: 0.5rem;
    background: var(--b2e-surface-soft, #f8f9fb);
    overflow: hidden;
}

.b2e-policy-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 0;
    background: transparent;
    text-align: start;
    cursor: pointer;
    font: inherit;
}

.b2e-policy-toggle-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--b2e-text, #2b2f36);
}

.b2e-policy-icon {
    color: var(--b2e-primary, #0d6efd);
    font-size: 0.95rem;
}

.b2e-policy-fare {
    font-weight: 500;
    font-size: 0.76rem;
    color: var(--b2e-muted, #6c757d);
}

/* Refundable / Non-refundable badge (derived from priced fareRules REFUND rule) */
.b2e-refund-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

.b2e-refund-status.is-refundable {
    color: #0f5132;
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
}

.b2e-refund-status.is-nonrefundable {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
}

.b2e-refund-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.6);
}

.b2e-refund-text {
    display: flex;
    flex-direction: column;
}

.b2e-refund-penalty {
    font-weight: 500;
    font-size: 0.72rem;
    opacity: 0.85;
}

.b2e-policy-toggle-action {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--b2e-primary, #0d6efd);
    white-space: nowrap;
}

.b2e-policy-body {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border-top: 1px solid var(--b2e-border, #e0e3e8);
    max-height: 16rem;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--b2e-text, #2b2f36);
    background: #fff;
}

/* Prettified airline fare-penalty policy (rendered by policy-format.js). */
.b2e-policy-pretty {
    padding: 0.75rem 0.85rem;
    border-top: 1px solid var(--b2e-border, #e0e3e8);
    background: #fff;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--b2e-text, #2b2f36);
}

/* When rendered inside an existing .b2e-policy-body wrapper (which already draws
   the top border and scroll area), avoid doubling the border/padding. */
.b2e-policy-body {
    padding: 0;
}

.b2e-policy-body > .b2e-policy-pretty {
    border-top: 0;
    max-height: 20rem;
    overflow-y: auto;
}

.b2e-policy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.b2e-policy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.1;
}

.b2e-policy-chip-value {
    font-weight: 700;
}

.b2e-policy-chip--change {
    background: #e7f1ff;
    color: #0a58ca;
    border-color: #cfe2ff;
}

.b2e-policy-chip--cancel {
    background: #fff3cd;
    color: #98730b;
    border-color: #ffe69c;
}

.b2e-policy-chip--warn {
    background: #fdece7;
    color: #b5432b;
    border-color: #f8d3c8;
}

.b2e-policy-chip--danger {
    background: #fbe0e0;
    color: #b02a37;
    border-color: #f5c2c7;
}

.b2e-policy-heading {
    margin: 0.65rem 0 0.35rem;
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--b2e-muted, #6c757d);
}

.b2e-policy-heading:first-child {
    margin-top: 0;
}

.b2e-policy-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.b2e-policy-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.4rem;
    background: var(--b2e-surface-soft, #f8f9fb);
}

.b2e-policy-row-icon {
    flex: 0 0 auto;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--b2e-muted, #6c757d);
}

.b2e-policy-row-text {
    flex: 1 1 auto;
}

.b2e-policy-row--change {
    background: #f2f7ff;
}

.b2e-policy-row--change .b2e-policy-row-icon {
    color: #0a58ca;
}

.b2e-policy-row--cancel {
    background: #fffaf0;
}

.b2e-policy-row--cancel .b2e-policy-row-icon {
    color: #98730b;
}

.b2e-policy-row--warn {
    background: #fdf1ee;
}

.b2e-policy-row--warn .b2e-policy-row-icon {
    color: #b5432b;
}

.b2e-policy-row--danger {
    background: #fdeaec;
}

.b2e-policy-row--danger .b2e-policy-row-icon {
    color: #b02a37;
}

.b2e-policy-amount {
    color: #0a58ca;
    font-weight: 700;
    white-space: nowrap;
}

.b2e-policy-flag-danger {
    color: #b02a37;
    font-weight: 700;
}

.b2e-policy-original {
    margin-top: 0.75rem;
    border-top: 1px dashed var(--b2e-border, #e0e3e8);
    padding-top: 0.5rem;
}

.b2e-policy-original-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--b2e-primary, #0d6efd);
    cursor: pointer;
}

.b2e-policy-original-text {
    margin: 0.5rem 0 0;
    max-height: 14rem;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--b2e-muted, #6c757d);
}


/* Return price column: "Additional price +X" with a view-details link, so the
   customer sees the round-trip delta rather than repeating the full total. */
.b2e-offer-pricecol--return {
    text-align: end;
}

.b2e-view-details {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.2rem;
    color: var(--b2e-primary, #0b5ed7);
}

.b2e-view-details:hover {
    text-decoration: underline;
}

.b2e-addon-value {
    color: #1a7f45;
    font-weight: 700;
}

/* Genuine branded-fare upsell tier gets a small "Offer" badge + accent. */
.b2e-tier-card--upsell {
    border-color: #1a7f45;
    box-shadow: 0 0 0 1px rgba(26, 127, 69, 0.25);
}

.b2e-tier-badge {
    display: inline-block;
    margin-inline-start: 0.4rem;
    padding: 0.05rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    background: #1a7f45;
    border-radius: 999px;
    vertical-align: middle;
}

/* Upsell offer flag shown on result cards and in the fare-options filter. */
.b2e-upsell-flag {
    display: inline-block;
    margin-top: 0.2rem;
    padding: 0.05rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #7a4a00;
    background: linear-gradient(90deg, #ffe08a, #ffcf4d);
    border: 1px solid #f0b429;
    border-radius: 999px;
    vertical-align: middle;
}

.b2e-offer-card.has-upsell {
    box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.55);
}

.b2e-filter-check--upsell .b2e-upsell-flag {
    margin-top: 0;
    margin-inline-end: 0.3rem;
}

@media (max-width: 640px) {
    .b2e-depart-summary-body {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Combined round-trip card: stack the outbound and return legs, each with a
   distinct colored accent so the two directions are easy to tell apart. */
.b2e-offer-itinerary--stacked {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.b2e-leg-wrap {
    border-inline-start: 3px solid transparent;
    padding-inline-start: 0.6rem;
}

.b2e-leg-wrap--outbound {
    border-inline-start-color: #0b5ed7;
    background: linear-gradient(90deg, rgba(11, 94, 215, 0.06), transparent 60%);
    border-radius: 8px;
}

.b2e-leg-wrap--return {
    border-inline-start-color: #d98324;
    background: linear-gradient(90deg, rgba(217, 131, 36, 0.06), transparent 60%);
    border-radius: 8px;
}

.b2e-leg-endpoint {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.b2e-leg-endpoint.text-end {
    align-items: flex-end;
}

.b2e-leg-time {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--b2e-text);
}

.b2e-leg-code {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
}

.b2e-leg-date {
    font-size: 0.8rem;
    color: var(--b2e-muted);
}

.b2e-leg-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 96px;
}

.b2e-leg-dur {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--b2e-muted);
}

.b2e-leg-arrow {
    color: #b6c7df;
    font-size: 0.9rem;
    line-height: 1;
}

.b2e-leg-stops {
    font-size: 0.7rem;
    color: #1f9d55;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .b2e-leg-detail {
        grid-template-columns: 1fr auto 1fr;
    }
    .b2e-leg-tag {
        grid-column: 1 / -1;
        justify-self: start;
        margin-bottom: 0.15rem;
    }
}

.b2e-itinerary-strip .b2e-flight-line,
.b2e-flight-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--b2e-border);
}

.b2e-itinerary-strip .b2e-flight-line:last-child { border-bottom: none; }

.b2e-dir-badge {
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-weight: 600;
}

.b2e-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #166534;
    font-size: 2rem;
    font-weight: 700;
}

.b2e-confirm-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf4fd;
}

.b2e-confirm-spinner .spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--b2e-primary-2);
}

[dir="rtl"] .b2e-offer-card,
[dir="rtl"] .b2e-summary-banner,
[dir="rtl"] .b2e-flight-search { text-align: right; }

/* Mirror the two-step stepper connector for RTL. */
[dir="rtl"] .b2e-stepper-item:not(:last-child)::after {
    margin-inline-start: 0.5rem;
}

/* Step badge inside the outbound/return selection tabs. */
.b2e-tab-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    margin-inline-end: 0.35rem;
}

.nav-pills .nav-link:not(.active) .b2e-tab-step {
    background: #e2e8f0;
    color: #475569;
}

/* Full-page loader overlay (shown when opening a pending booking). */
.b2e-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.b2e-loader-box {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* ===================================================================
   WEGO-style flight search widget components
   =================================================================== */

/* Trip-type pills */
.b2e-trip-pills {
    display: inline-flex;
    gap: 0.35rem;
    background: #eef3fa;
    padding: 0.3rem;
    border-radius: 999px;
}

.b2e-trip-pill {
    border: none;
    background: transparent;
    color: var(--b2e-muted);
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.42rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.b2e-trip-pill:hover {
    color: var(--b2e-primary-2);
}

.b2e-trip-pill.active {
    background: #fff;
    color: var(--b2e-primary);
    box-shadow: 0 3px 10px rgba(16, 45, 80, 0.12);
}

/* Currency selector */
.b2e-currency-select {
    border-radius: 10px;
    font-weight: 600;
    min-width: 84px;
}

/* Origin/destination swap button */
.b2e-swap-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.15rem;
    line-height: 1;
    border-color: var(--b2e-border);
    color: var(--b2e-primary-2);
    background: #fff;
    box-shadow: 0 2px 6px rgba(16, 45, 80, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.b2e-swap-btn:hover {
    background: #f0f6fd;
    box-shadow: 0 4px 12px rgba(16, 45, 80, 0.16);
    transform: rotate(180deg);
}

/* Search widget inputs */
.b2e-flight-search .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--b2e-muted);
    margin-bottom: 0.3rem;
}

.b2e-flight-search .form-control,
.b2e-flight-search .form-select {
    border-radius: 10px;
    border-color: var(--b2e-border);
    padding: 0.6rem 0.85rem;
    min-height: 46px;
}

.b2e-flight-search .form-control:focus,
.b2e-flight-search .form-select:focus {
    border-color: var(--b2e-focus);
    box-shadow: 0 0 0 0.2rem rgba(31, 109, 178, 0.15);
}

/* Passenger stepper popover */
.b2e-pax-toggle {
    border-radius: 10px;
    border: 1px solid var(--b2e-border);
    background: #fff;
    min-height: 46px;
    font-weight: 600;
    color: var(--b2e-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.b2e-pax-toggle::after {
    content: "▾";
    color: var(--b2e-muted);
    font-size: 0.8rem;
    margin-inline-start: 0.5rem;
}

.b2e-pax-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    width: min(340px, 92vw);
    background: #fff;
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 18px 40px rgba(16, 45, 80, 0.18);
}

.b2e-pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
}

.b2e-pax-row + .b2e-pax-row {
    border-top: 1px solid #eef2f7;
}

.b2e-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.b2e-step-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--b2e-border);
    background: #f7faff;
    color: var(--b2e-primary-2);
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.b2e-step-btn:hover:not(:disabled) {
    background: var(--b2e-primary-2);
    border-color: var(--b2e-primary-2);
    color: #fff;
}

.b2e-step-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.b2e-step-val {
    width: 44px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    color: var(--b2e-text);
    pointer-events: none;
}

/* Multi-city leg rows */
.b2e-leg-row {
    background: #f9fbfe;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    margin-inline: 0;
}

.b2e-add-leg {
    font-weight: 600;
    text-decoration: none;
}

/* RTL swap direction */
[dir="rtl"] .b2e-swap-btn:hover {
    transform: rotate(-180deg);
}

/* RTL: mirror the leg arrow */
[dir="rtl"] .b2e-leg-arrow {
    transform: scaleX(-1);
}

/* ------------------------------------------------------------------ */
/* Passenger / traveller form: grouped sections with icon headers      */
/* ------------------------------------------------------------------ */
.b2e-pax-block {
    padding: 1rem 1rem 1.15rem;
    border: 1px solid var(--b2e-border);
    border-radius: 16px;
    background: #fff;
}

.b2e-pax-block + .b2e-pax-block {
    margin-top: 1.1rem;
}

.b2e-pax-block-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.b2e-pax-block-index {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: var(--b2e-primary, #0d6efd);
}

.b2e-pax-form .b2e-form-section {
    padding: 1.25rem 1.25rem 1.35rem;
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    background: #fbfcfe;
}

.b2e-pax-form .b2e-form-section + .b2e-form-section {
    margin-top: 1.1rem;
}

.b2e-form-section-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--b2e-border);
}

/* Compact passport-upload button pinned to the end of the personal-info header
   so it no longer occupies its own full-width row. */
.b2e-ocr-upload {
    margin-inline-start: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
}

.b2e-form-section-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
}

.b2e-form-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--b2e-ink, #1f2937);
}

.b2e-form-section-hint {
    font-size: 0.8rem;
    margin: 0;
    color: #6b7280;
}

/* Softer, friendlier inputs inside the passenger form */
.b2e-pax-form .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.3rem;
}

.b2e-pax-form .form-control,
.b2e-pax-form .form-select {
    border-radius: 10px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.b2e-pax-form .form-control:focus,
.b2e-pax-form .form-select:focus {
    border-color: var(--b2e-primary-2);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* Green valid state uses a checkmark cue without shouting */
.b2e-pax-form .form-control.is-valid,
.b2e-pax-form .form-select.is-valid,
.b2e-pax-form .was-validated .form-control:valid,
.b2e-pax-form .was-validated .form-select:valid {
    border-color: #16a34a;
}

@media (max-width: 575.98px) {
    .b2e-pax-form .b2e-form-section {
        padding: 1rem;
    }
}

/* ------------------------------------------------------------------ */
/* Friendly form error banner (booking/pricing failures)              */
/* ------------------------------------------------------------------ */
.b2e-form-alert {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    margin-bottom: 1.35rem;
    border: 1px solid #f5c2c7;
    border-inline-start: 4px solid #dc3545;
    border-radius: 12px;
    background: linear-gradient(0deg, #fff, #fdf3f4);
    box-shadow: 0 4px 14px rgba(220, 53, 69, .08);
}

.b2e-form-alert-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fde4e6;
    color: #dc3545;
}

.b2e-form-alert-body { min-width: 0; }

.b2e-form-alert-title {
    font-weight: 700;
    color: #b02a37;
    margin-bottom: 0.15rem;
}

.b2e-form-alert-list {
    margin: 0.15rem 0 0;
    padding-inline-start: 1.1rem;
    color: #842029;
    font-size: 0.9rem;
}

.b2e-form-alert-list:empty { display: none; }

.b2e-form-alert-hint {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #9a6a6f;
}

/* ------------------------------------------------------------------ */
/* Passenger page: trip summary + fare breakdown sidebar (airline UI)  */
/* ------------------------------------------------------------------ */
.b2e-trip-aside {
    position: sticky;
    top: 1rem;
}

.b2e-trip-aside-card,
.b2e-fare-card {
    border: 1px solid var(--b2e-border);
    border-radius: 16px;
    background: #fff;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .05);
}

.b2e-trip-aside-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--b2e-border);
}

.b2e-trip-aside-head .b2e-airline-badge {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-weight: 700;
}

.b2e-trip-leg { margin-bottom: 0.9rem; }
.b2e-trip-leg:last-of-type { margin-bottom: 0; }

.b2e-trip-leg-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--b2e-primary-2);
    background: #edf4fd;
    border-radius: 999px;
    padding: 0.12rem 0.6rem;
    margin-bottom: 0.4rem;
}

.b2e-trip-leg-tag.return {
    color: #d98324;
    background: #fdf0dd;
}

.b2e-trip-leg-body {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.b2e-trip-point { display: flex; flex-direction: column; min-width: 54px; flex: 1; }
.b2e-trip-point.text-end { align-items: flex-end; }

.b2e-trip-time { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.b2e-trip-code { font-size: 0.8rem; color: #6b7280; font-weight: 600; }

.b2e-trip-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    max-width: 260px;
    margin-inline: auto;
}

.b2e-trip-dur { font-size: 0.72rem; color: #6b7280; }

.b2e-trip-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--b2e-border) 20%, var(--b2e-border) 80%, transparent);
    position: relative;
}

.b2e-trip-line::after {
    content: "✈";
    position: absolute;
    top: 50%;
    inset-inline-end: -2px;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--b2e-primary-2);
    background: #fff;
    padding-inline: 2px;
}

[dir="rtl"] .b2e-trip-line::after { transform: translateY(-50%) scaleX(-1); }

.b2e-trip-stops { font-size: 0.72rem; color: #16a34a; font-weight: 600; }

.b2e-trip-date { font-size: 0.75rem; color: #6b7280; margin-top: 0.3rem; }

.b2e-trip-facts {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0.9rem 0 0;
    border-top: 1px solid var(--b2e-border);
    font-size: 0.85rem;
}

.b2e-trip-facts li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    color: #4b5563;
}

.b2e-trip-fact-ico { width: 1.2rem; text-align: center; }

.b2e-trip-seats {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
}

.b2e-upgraded-fare {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--b2e-border);
}

.b2e-upgraded-fare-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.b2e-upgraded-fare-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.b2e-upgraded-fare-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #4b5563;
    padding: 0.15rem 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Sub-heading separating the departure vs return upgrade lists. */
.b2e-upgraded-fare-list li.b2e-upgraded-fare-leg {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--b2e-primary-2, #0b5ed7);
    padding-top: 0.5rem;
}

.b2e-upgraded-fare-list li.b2e-upgraded-fare-leg:first-child {
    padding-top: 0;
}

.b2e-fare-card { margin-top: 0.75rem; }

.b2e-fare-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.b2e-fare-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
    padding: 0.22rem 0;
}

.b2e-fare-divider {
    height: 1px;
    background: var(--b2e-border);
    margin: 0.55rem 0;
}

.b2e-fare-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b2e-primary-2);
}

.b2e-fare-note {
    margin: 0.6rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Wallet affordability summary shown above the Issue ticket action so the agent
   sees their balance vs. the amount due before ticketing. */
.b2e-wallet-summary {
    border: 1px solid var(--b2e-border);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
}

.b2e-wallet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    padding: 0.18rem 0;
}

.b2e-wallet-label {
    color: #55617a;
    font-weight: 600;
}

.b2e-wallet-value {
    font-weight: 700;
    color: var(--b2e-text);
}

@media (max-width: 991.98px) {
    .b2e-trip-aside { position: static; }
}

/* ---------- Booking details page ---------- */

.b2e-detail-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
}

.b2e-detail-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.b2e-back-link {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
}

.b2e-back-link:hover { text-decoration: underline; }

.b2e-detail-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.b2e-detail-hero-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.b2e-detail-route-air {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.b2e-detail-air {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--b2e-primary);
    line-height: 1;
}

.b2e-detail-route-arrow {
    position: relative;
    flex: 0 0 90px;
    height: 20px;
    display: flex;
    align-items: center;
}

.b2e-detail-route-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--b2e-primary-2), var(--b2e-border));
    border-radius: 2px;
}

.b2e-detail-route-plane {
    position: absolute;
    inset-inline-end: -4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--b2e-primary-2);
    background: #f5f9ff;
    padding-inline: 3px;
    font-size: 1rem;
}

[dir="rtl"] .b2e-detail-route-plane { transform: translateY(-50%) scaleX(-1); }

/* Round-trip route indicator: outbound plane at the destination side,
   return plane pointing back toward the origin side. */
.b2e-detail-route-arrow.is-round .b2e-detail-route-line {
    background: linear-gradient(90deg, var(--b2e-primary-2), var(--b2e-primary-2));
}

.b2e-detail-route-plane-back {
    inset-inline-end: auto;
    inset-inline-start: -4px;
    transform: translateY(-50%) scaleX(-1);
}

[dir="rtl"] .b2e-detail-route-plane-back { transform: translateY(-50%) scaleX(1); }

.b2e-detail-route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.b2e-detail-refs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.b2e-ref-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.b2e-ref-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--b2e-muted);
}

.b2e-ref-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--b2e-text);
    word-break: break-all;
}

.b2e-ref-pnr {
    color: #166534;
    background: #dcfce7;
    border-radius: 8px;
    padding: 0.1rem 0.55rem;
    align-self: flex-start;
    letter-spacing: 0.06em;
}

.b2e-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--b2e-primary-2);
    background: #edf4fd;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
}

.b2e-chip-soft {
    color: var(--b2e-muted);
    background: #f1f4f9;
}

.b2e-chip-brand {
    color: #1f9d55;
    background: #e7f7ee;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.b2e-card-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.b2e-card-ico {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #edf4fd;
    color: var(--b2e-primary-2);
    font-size: 0.95rem;
}

/* Itinerary leg blocks */
.b2e-itin-leg {
    border: 1px solid var(--b2e-border);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    background: #fff;
}

.b2e-itin-leg + .b2e-itin-leg { margin-top: 0.75rem; }

.b2e-itin-leg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.b2e-itin-leg-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--b2e-muted);
}

.b2e-itin-leg-body {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px dashed var(--b2e-border);
}

.b2e-itin-segs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.b2e-itin-seg {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--b2e-border, #e6ebf2);
    border-radius: 12px;
    background: #fbfcfe;
}

.b2e-itin-seg-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

/* Modern timeline segment: departure — connector — arrival */
.b2e-seg-dep,
.b2e-seg-arr {
    display: flex;
    flex-direction: column;
    min-width: 74px;
}

.b2e-seg-arr { align-items: flex-end; text-align: end; }

.b2e-seg-time {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--b2e-primary);
    line-height: 1.1;
}

.b2e-seg-air {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--b2e-primary-2);
    letter-spacing: 0.4px;
}

.b2e-seg-sub {
    font-size: 0.72rem;
    color: var(--b2e-muted);
}

.b2e-seg-conn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    padding-inline: 0.3rem;
}

.b2e-seg-flight {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--b2e-primary);
}

.b2e-seg-track {
    position: relative;
    width: 100%;
    height: 14px;
    display: flex;
    align-items: center;
}

.b2e-seg-track-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--b2e-border), var(--b2e-primary-2), var(--b2e-border));
    border-radius: 2px;
}

.b2e-seg-track-plane {
    position: absolute;
    inset-inline-end: -2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--b2e-primary-2);
    background: #fbfcfe;
    padding-inline: 2px;
    font-size: 0.8rem;
}

[dir="rtl"] .b2e-seg-track-plane { transform: translateY(-50%) scaleX(-1); }


.b2e-itin-seg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--b2e-border, #e6ebf2);
}

.b2e-airline-badge-sm {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 700;
}

.b2e-itin-seg-flight { font-weight: 700; font-size: 0.9rem; }

.b2e-itin-seg-cabin { align-self: center; }

.b2e-itin-seg-chips .b2e-chip { align-self: auto; }

@media (max-width: 575.98px) {
    .b2e-seg-conn { display: none; }
    .b2e-itin-seg-head { justify-content: space-between; }
    .b2e-detail-air { font-size: 1.6rem; }
}

/* Passenger cards */
.b2e-pax-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.b2e-pax-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid var(--b2e-border);
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    flex-wrap: wrap;
}

.b2e-pax-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--b2e-primary-2), var(--b2e-primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.b2e-pax-main { flex: 1; min-width: 140px; }

.b2e-pax-name { font-weight: 700; }

.b2e-pax-doc {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: end;
    gap: 0.1rem;
}

[dir="rtl"] .b2e-pax-doc { align-items: flex-start; text-align: start; }

.b2e-pax-doc-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--b2e-muted);
}

.b2e-pax-doc-value { font-weight: 600; font-size: 0.88rem; }

.b2e-cancel-note {
    border: 1px solid #fecaca;
    background: #fef2f2;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.b2e-cancel-note-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b91c1c;
    margin-bottom: 0.25rem;
}

/* Completed booking list cards */
.b2e-completed-card { padding: 0.6rem 0.9rem; }

.b2e-bcard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px dashed var(--b2e-border);
}

.b2e-bcard-id {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.b2e-bcard-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

[dir="rtl"] .b2e-bcard-status { align-items: flex-start; }

.b2e-bcard-route {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

.b2e-bcard-air {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--b2e-primary);
    line-height: 1;
}

.b2e-bcard-arrow {
    position: relative;
    flex: 0 0 54px;
    height: 18px;
    display: flex;
    align-items: center;
}

.b2e-bcard-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--b2e-primary-2), var(--b2e-border));
    border-radius: 2px;
}

.b2e-bcard-plane {
    position: absolute;
    inset-inline-end: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    color: var(--b2e-primary-2);
    background: var(--b2e-card);
    padding-inline: 4px;
    font-size: 0.95rem;
    font-weight: 700;
}

.b2e-bcard-facts {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem 1.5rem;
    flex-wrap: wrap;
}

.b2e-bcard-fact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.b2e-bcard-fact-total {
    margin-inline-start: auto;
    text-align: end;
}

[dir="rtl"] .b2e-bcard-fact-total { text-align: start; }

.b2e-bcard-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--b2e-primary-2);
}

.b2e-bcard-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--b2e-border);
}

.b2e-bcard-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--b2e-primary-2);
}

.b2e-booking-card:hover .b2e-bcard-link { text-decoration: underline; }

@media (max-width: 575.98px) {
    .b2e-bcard-air { font-size: 1.2rem; }
    .b2e-bcard-fact-total { margin-inline-start: 0; }
}

/* Booking success modal */
.b2e-success-modal { border-radius: 20px; border: none; }

.b2e-success-check {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    animation: b2e-success-pop 0.35s ease;
}

@keyframes b2e-success-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.b2e-success-refs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    border-top: 1px dashed var(--b2e-border);
    padding-top: 1rem;
}

.b2e-success-refs .b2e-ref-item { align-items: center; }
.b2e-success-refs .b2e-ref-pnr { align-self: center; }

@media (prefers-reduced-motion: reduce) {
    .b2e-success-check { animation: none; }
}

/* Align the Select2 country/dial-code widget with Bootstrap's form-select look. */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    min-height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 0.375rem;
    background-color: #fff;
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem);
    padding-inline-start: 0.75rem;
    padding-inline-end: 2.25rem;
    color: var(--bs-body-color, #212529);
    font-size: 1rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-body-color, #212529);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem);
    inset-inline-end: 0.5rem;
    inset-inline-start: auto;
}

.select2-container .select2-selection--single {
    box-sizing: border-box;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bs-primary, #0d6efd);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
}

.select2-dropdown {
    border-color: #86b7fe;
    border-radius: 0.375rem;
    z-index: 1060;
}

/* RTL fine-tuning so the search box and options mirror correctly. */
html[dir="rtl"] .select2-container--default .select2-search--dropdown .select2-search__field {
    text-align: right;
}



