/* ===========================================================================
 * Vendor stylesheets for the search-results pages.
 *
 * Every sheet is pulled into the `leisure-vendor` cascade layer, whose position
 * is declared in app/globals.css. That keeps these global, element-level rules
 * (Bootstrap's reboot restyles bare a / ul / button / headings) from
 * overriding corp's Tailwind header and footer, while leaving them fully in
 * charge of the ported Bootstrap markup below.
 *
 * Order matches leisure-ui's root layout exactly — these sheets override one
 * another by position, so reordering silently restyles the page.
 * ========================================================================= */

/* Bootstrap 5.3.6, self-hosted. It used to come from cdn.jsdelivr.net, which put
   a third-party round trip in front of first paint on every vendor route and
   failed or stalled on some networks (notably corporate Windows machines), so
   the page rendered with Bootstrap missing, then re-flowed. Same file, same
   version, served from our own origin. */
@import url("/assets/vendor/bootstrap/bootstrap.min.css") layer(leisure-vendor);
@import url("/styles/home-v3.css") layer(leisure-vendor);
@import url("/assets/css/leisure-new-style.css") layer(leisure-vendor);
@import url("/assets/css/flights.css") layer(leisure-vendor);
@import url("/assets/css/cardnew.css") layer(leisure-vendor);
@import url("/assets/css/flight-form-style.css") layer(leisure-vendor);
@import url("/assets/css/header-footer-style.css") layer(leisure-vendor);
@import url("/assets/css/custom-fixes.css") layer(leisure-vendor);
@import url("/assets/css/newStyle.css") layer(leisure-vendor);
@import url("/assets/css/hotel-responsive.css") layer(leisure-vendor);
@import url("/assets/css/form-modal.css") layer(leisure-vendor);

/* ---------------------------------------------------------------------------
 * Inline SVG icons, as leisure-ui draws them.
 *
 * Tailwind's Preflight sets `img, svg, video, canvas, … { display: block }`.
 * leisure-ui has no Preflight at all — its Tailwind is installed but inert, so
 * nothing ever generates those base rules — which means every icon in the
 * ported SRP markup was authored against the CSS default of `display: inline`.
 *
 * Under Preflight those icons become block-level and drop onto a line of their
 * own: the baggage row rendered as a luggage glyph stacked above "Cabin: 7 KG"
 * instead of beside it, in a 34px-tall row rather than 17px.
 *
 * Restoring `inline` here, in the vendor layer, puts the ported markup back on
 * leisure-ui's footing. Bootstrap's reboot already supplies the matching
 * `vertical-align: middle`, so the pair behaves exactly as it does there.
 *
 * Scoped by file, not by selector: this sheet is loaded only by app/srp/layout,
 * so it cannot reach corp's own Tailwind chrome on any other route. The one
 * thing it *can* reach is the request-approval overlay, which is portalled to
 * document.body and therefore shares this document — so that is put back, and
 * anything else corp authors under /srp should opt out the same way.
 * ------------------------------------------------------------------------- */
@layer leisure-vendor {
  svg {
    display: inline;
  }

  [data-corp-modal] svg {
    display: block;
  }
}

/* ---------------------------------------------------------------------------
 * Images, as leisure-ui draws them.
 *
 * The same Preflight rule that blocked the inline SVGs above
 * (`img, svg, video, canvas, … { display: block }`) also catches every <img>
 * in the ported markup, and leisure-ui has no Preflight — so those images were
 * authored against the CSS default of `display: inline`.
 *
 * The visible symptom was the airline logo on the flights SRP card. Its column
 * centres its contents with Bootstrap's `.text-center`, which only moves
 * inline-level boxes; as a 55px block the logo pinned itself to the left edge
 * of the column while the carrier name and flight numbers below it — plain
 * text — stayed centred, so the whole cell read as misaligned.
 *
 * Restored in the vendor layer for the same reason, and with the same caveat:
 * corp's own header and footer render above these routes and ARE authored
 * against Preflight, so they opt back out, exactly as the portalled overlay
 * does. Anything else corp authors under /srp should do likewise.
 * ------------------------------------------------------------------------- */
@layer leisure-vendor {
  img {
    display: inline;
  }

  [data-corp-modal] img,
  header img,
  footer img {
    display: block;
  }
}
