/* Dallas Airlinesticket Desk — responsive-only corrections, 2026-10-15.
   Every layout rule is inside a <=991.98px media query: desktop is unchanged. */
@media (max-width:991.98px){
  html,body{max-width:100%;overflow-x:clip}
  main,main>section,.tb-page-hero,.tb-booking-search-section{min-width:0}
  main img{max-width:100%}
  main .container,footer .container{min-width:0}
  .tb-header.tb-ffs-header .navbar{min-width:0!important;flex-wrap:nowrap!important}
  .tb-header.tb-ffs-header .navbar-brand.tb-ffs-brand{min-width:0!important;margin-right:auto!important}
  .tb-header.tb-ffs-header .navbar-toggler{flex:0 0 auto!important;min-width:42px!important;min-height:40px!important}
  .tb-header.tb-ffs-header .navbar-brand.tb-ffs-brand img{width:auto!important;max-width:min(220px,calc(100vw - 110px))!important;height:auto!important;object-fit:contain!important}

  /* Keep cards and their images inside the viewport on all public listing pages. */
  .tb-blog-listing-grid,.tb-blog-premium-container,.tb-package-layout,
  .tb-package-listing-page .tb-package-layout,.tb-detail-layout,
  .tb-flight-results-layout,.tb-hotel-results-layout,
  .tb-booking-layout,.tb-list-package-grid{max-width:100%;min-width:0}
  .tb-blog-listing-grid > *, .tb-package-layout > *, .tb-detail-layout > *,
  .tb-flight-results-layout > *, .tb-hotel-results-layout > *{min-width:0}
  .tb-blog-listing-grid img,.tb-list-package-card img,.tb-hotel-card img{max-width:100%;object-fit:cover}
  .tb-flight-results-page .tb-flight-result-search-card,
  .tb-hotel-results-page .tb-hotel-result-search-card{max-width:100%!important;min-width:0!important}
  .tb-flight-results-page .tb-flight-result-search-card input,
  .tb-hotel-results-page .tb-hotel-result-search-card input{min-width:0!important}
  .tb-flight-results-page .tb-trip-tabs{max-width:100%;overflow-x:auto;scrollbar-width:none}
  .tb-flight-results-page .tb-trip-tabs>*{flex-shrink:0}
  .tb-dallas-contact-grid,.tb-dallas-contact-card,.tb-dallas-contact-fields,
  .tb-dallas-input-wrap{min-width:0!important;max-width:100%}

  /* Tablet: the hero title and the search card should not collide. */
  #home.tb-reference-hero{padding-top:52px!important}
  #home .tb-kiwi-home-hero-copy{max-width:100%!important;display:block!important;text-align:center!important}
  #home .tb-kiwi-home-hero-copy h1{position:static!important;display:block!important;max-width:100%!important;white-space:normal!important;overflow-wrap:break-word!important}
  #home .tb-kiwi-home-hero-copy p{position:static!important;display:block!important;white-space:normal!important;overflow-wrap:break-word!important}
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > .tb-hero-search-field,
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > .tb-travellers-field{min-width:0!important;max-width:100%!important}
  #home-search .tb-flight-search-form .tb-traveller-box.tb-kiwi-pax-box.is-open .tb-pax-controls{
    max-height:min(500px,calc(100dvh - 110px))!important;overflow-y:auto!important;overscroll-behavior:contain;
  }
  #home-search .tb-flight-search-form .tb-pax-controls button{min-height:32px}
}
@media (max-width:767.98px){
  /* Root cause: legacy 850px fixed hero plus -640px search overlap.
     Let both sections take their natural content height in document flow. */
  #home.tb-reference-hero,
  #home.tb-reference-hero.tb-reference-hero-flight{
    box-sizing:border-box!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    margin:0!important;padding:48px 0 24px!important;
    overflow:visible!important;border-radius:0!important;
    background:#eaf2ff!important;
  }
  #home .tb-reference-hero-pattern{
    background-image:none!important;background:#eaf2ff!important;
    opacity:1!important;
  }
  #home .tb-kiwi-home-hero-copy,
  #home .container.tb-kiwi-home-hero-copy{
    width:calc(100% - 36px)!important;max-width:420px!important;
    margin:0 auto!important;padding:0!important;position:relative!important;
    display:block!important;text-align:center!important;
  }
  #home .tb-kiwi-home-hero-copy h1{
    display:block!important;font-size:clamp(23px,6.3vw,27px)!important;
    line-height:1.23!important;margin:0 auto 10px!important;
    max-width:370px!important;letter-spacing:-.02em!important;
  }
  #home .tb-kiwi-home-hero-copy p{
    display:block!important;font-size:13.5px!important;line-height:1.5!important;
    max-width:355px!important;margin:0 auto!important;font-weight:400!important;
  }
  #home-search.tb-booking-search-section,
  #home-search.tb-booking-search-section-flight{
    box-sizing:border-box!important;display:block!important;position:relative!important;
    margin:0!important;top:auto!important;bottom:auto!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    padding:0 0 24px!important;
    background:#eaf2ff url('../images/flight-hero-plane-reference.jpg') 76% bottom/cover no-repeat!important;
    border-radius:0 0 24px 24px!important;overflow:visible!important;
  }
  #home-search>.container{box-sizing:border-box!important;width:calc(100% - 24px)!important;max-width:100%!important;padding:0!important;margin:0 auto!important;transform:none!important}
  #home-search .tb-booking-search-card.tb-unified-search-card{width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;transform:none!important}
  #home-search .tb-flight-search-form.tb-unified-form{
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    min-height:0!important;height:auto!important;margin:0!important;
    padding:12px!important;border-radius:13px!important;overflow:visible!important;
  }
  #home-search .tb-flight-search-toolbar.tb-kiwi-flight-toolbar{margin:0 0 12px!important;min-height:0!important}
  #home-search .tb-flight-trip-tabs{display:grid!important;width:100%!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  #home-search .tb-flight-trip-tab{box-sizing:border-box!important;min-width:0!important;min-height:35px!important;width:100%!important;padding:0 6px!important;text-align:center!important;font-size:13px!important}
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row,
  #home-search .tb-flight-search-form.tb-unified-form.is-one-way .tb-flight-main-row,
  #home-search .tb-flight-search-form.tb-unified-form.is-round-trip .tb-flight-main-row{
    box-sizing:border-box!important;display:flex!important;flex-flow:column nowrap!important;
    width:100%!important;min-width:0!important;gap:8px!important;
    grid-template-columns:none!important;
  }
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > .tb-hero-search-field,
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > .tb-travellers-field,
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > button.tb-live-search-btn.tb-kiwi-search-btn{
    box-sizing:border-box!important;display:flex!important;flex:0 0 auto!important;
    position:relative!important;width:100%!important;min-width:0!important;
    max-width:100%!important;grid-column:auto!important;grid-row:auto!important;
    min-height:68px!important;height:68px!important;max-height:68px!important;
    margin:0!important;border-radius:6px!important;
  }
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > .js-return-date-field[hidden]{display:none!important}
  #home-search .tb-flight-search-form.tb-unified-form .tb-flight-main-row > button.tb-live-search-btn.tb-kiwi-search-btn{
    min-height:54px!important;height:54px!important;max-height:54px!important;
    padding:0 12px!important;font-size:16px!important;justify-content:center!important;
  }
  #home-search .tb-flight-search-form.tb-unified-form .tb-home-direct-row{padding:12px 0 0!important}
  #home-search .tb-flight-search-form.tb-unified-form .tb-home-direct-toggle{min-height:24px!important;display:flex!important;align-items:center!important;gap:8px!important}
  #home-search .tb-flight-search-form .tb-traveller-box.tb-kiwi-pax-box .tb-pax-controls{
    width:min(310px,calc(100vw - 48px))!important;
    max-width:calc(100vw - 48px)!important;right:0!important;left:auto!important;
    top:calc(100% + 8px)!important;z-index:120!important;
  }
  /* The benefits must start AFTER the card, never behind it. */
  .tb-flight-benefits{position:relative!important;z-index:1!important;clear:both!important;margin:0!important;padding:18px 0 22px!important}
  .tb-flight-benefits .tb-flight-benefits-grid{width:calc(100% - 24px)!important;grid-template-columns:1fr!important;gap:10px!important}
  .tb-flight-benefit{box-sizing:border-box!important;min-width:0!important;min-height:80px!important;padding:13px!important;gap:12px!important;align-items:center!important}
  .tb-flight-benefit>i{font-size:27px!important;flex:0 0 36px!important}
  .tb-flight-benefit h3{font-size:15px!important;margin:0 0 4px!important;line-height:1.24!important}
  .tb-flight-benefit p{font-size:12.5px!important;line-height:1.4!important}

  /* Search history: 4 compact columns and readable price on phones. */
  .tb-flight-deals-section{padding:26px 0 32px!important}
  .tb-flight-deals-section>.container{width:calc(100% - 24px)!important;max-width:100%!important}
  .tb-flight-deals-content{grid-template-columns:1fr!important;gap:22px!important}
  .tb-recent-flight-list{grid-template-columns:1fr!important;gap:10px!important}
  .tb-flight-deal-route.tb-popular-flight-card{
    box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr) 78px!important;
    min-height:84px!important;padding:9px 7px!important;gap:3px!important;
  }
  .tb-flight-route-side small{font-size:10px!important}
  .tb-flight-route-side strong{font-size:15px!important}
  .tb-flight-route-side>span{font-size:11px!important}
  .tb-flight-route-airline i{width:18px;height:18px;font-size:10px}
  .tb-flight-route-pricing{padding-left:4px!important;gap:5px!important}
  .tb-flight-route-pricing strong{font-size:12px!important}
  .tb-flight-route-pricing em{font-size:10px!important;padding:6px 5px!important}
  .tb-flight-deal-destinations{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .tb-flight-destination-card{height:156px!important;min-width:0!important}
  .tb-flight-destination-caption{left:8px!important;right:8px!important;bottom:9px!important}
  .tb-flight-destination-caption strong,.tb-flight-destination-caption b{font-size:11px!important;max-width:100%!important}

  /* Offer, page and footer cards use phone-width grids without text clipping. */
  .tb-ffs-offers>.container,.tb-ffs-about>.container,.tb-ffs-faq>.container,
  .tb-ffs-new-footer>.container,.tb-ffs-new-footer .tb-ffs-footer-bottom>.container{
    width:calc(100% - 24px)!important;max-width:100%!important;
  }
  .tb-ffs-offers-grid,.tb-blog-listing-grid{grid-template-columns:1fr!important;min-width:0!important}
  .tb-ffs-offer-card,.tb-blog-listing-item{min-width:0!important;max-width:100%!important}
  .tb-ffs-offer-visual{height:200px!important}
  .tb-ffs-new-footer .tb-ffs-footer-grid{grid-template-columns:1fr!important;gap:20px!important;padding:30px 0 22px!important}
  .tb-ffs-new-footer .tb-ffs-footer-col{min-width:0!important;gap:8px!important}
  .tb-ffs-new-footer .tb-ffs-footer-col h4{margin-bottom:6px!important}
  .tb-ffs-new-footer .tb-ffs-footer-security{flex-wrap:wrap!important;gap:10px 14px!important;justify-content:flex-start!important}
  .tb-ffs-new-footer .tb-ffs-footer-bottom{line-height:1.5!important}
  .tb-ffs-faq-item summary{overflow-wrap:anywhere}
  .tb-page-hero h1,.tb-blog-listing-hero h1{overflow-wrap:anywhere}
  .tb-package-listing-page .tb-package-layout,.tb-package-detail-page .tb-detail-layout,
  .tb-hotel-results-page .tb-hotel-results-layout,.tb-flight-results-page .tb-flight-results-layout{
    grid-template-columns:minmax(0,1fr)!important;gap:16px!important;
  }
}
@media (max-width:359.98px){
  #home .tb-kiwi-home-hero-copy h1{font-size:22px!important}
  #home-search .tb-flight-search-form.tb-unified-form{padding:10px!important}
  .tb-flight-deal-route.tb-popular-flight-card{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 72px!important}
  .tb-flight-route-pricing strong{font-size:11px!important}
  .tb-flight-destination-card{height:140px!important}
}
