/* ---------- E. Issue 3 - exact code from the review PDF (page 2) ---------- */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }          /* stop sideways scroll */
  img, video, iframe, table { max-width: 100%; height: auto; }

  /* search form: one field per row.
     Scoped to the flight form's own field wrappers (#flight_form). The PDF's
     generic .col-xs-6 / .col-md-4 / button selectors also hit columns that are
     meant to sit side by side (From + Economy, the 2-per-row passenger boxes)
     and stretched the +/- buttons, so they are not used. */
  #flight_form .searchsbmtfot {                       /* Search button row */
    width: 100% !important; float: none !important;
  }
  #flight_form #Advance_serch .width_mobile_adavncd_shows,   /* phone HTML */
  #flight_form #Advance_serch .plcetogo.pre_air > .padfive { /* desktop HTML */
    width: 100% !important; float: none !important;
  }

  /* text fields and selects only - not the +/- buttons or counters */
  #flight_form input[type="text"]:not(.input-number),
  #flight_form input[list],
  #flight_form select {
    font-size: 16px;                           /* no iOS zoom-on-focus */
    min-height: 44px;                          /* comfortable tap target */
  }
  #flight_form #preferred_airline { width: 100%; }

  /* 44px tap targets without changing the design */
  #flight_form .one-way-roundtrip li a { min-height: 44px; }
  #flight_form .btn-number { position: relative; }
  #flight_form .btn-number::after {              /* invisible 9px zone: 27px -> 45px */
    content: ""; position: absolute;
    top: -9px; right: -9px; bottom: -9px; left: -9px;
  }
  /* trip type tabs on one line, swipeable */
  .trip-type, .nav-tabs {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* date / passenger pop-ups stay on screen
     (.dropdown-menu removed from this list: it pinned the Economy / class
     list to the top of the screen under the header. Header dropdowns are
     handled by section H.) */
  .ui-datepicker, .daterangepicker, .pax-dropdown {
    position: fixed !important; left: 8px !important; right: 8px !important;
    width: auto !important; max-height: 80vh; overflow-y: auto;
  }
  #Advance_serch { margin-top: 8px; }
}

/* ---------- F. Preferred airline type-to-search box (issue 4): blend into
   the white "Airline" card like the two time selects above it. */
#flight_form #preferred_airline {
  border: 0;
  box-shadow: none;
  background: transparent;
  height: auto;
  min-height: 34px;
}

/* ---------- G. Images with width/height size hints (issue 6): keep their
   shape when the template CSS only sets a width (e.g. logo max-width:150px,
   footer badges width:90px). The special-offer images already have a fixed
   CSS height, so they are not listed here. */
.mylogo img,
.footer_address-travrun img,
.footer_icons_new li img {
  height: auto;
}

@media (max-width: 767px) {  
  .modal-dialog { 
    width: auto !important; 
    margin: 8px !important; 
  } 
  .modal-content { 
    max-height: calc(100vh - 16px); 
    overflow-y: auto !important; 
  }  
  .modal img[src*="login_travrun-logob2c"] { display: none; }  
  body.modal-open { position: fixed; width: 100%; }  /* no background scroll */ 
}


/* ---------- H. Issue 7 - exact code from the review PDF (page 3):
   hamburger menu nested dropdowns as inline lists, scrollable menu. */
@media (max-width: 767px) {
  .navbar-collapse { max-height: calc(100vh - 60px); overflow-y: auto; }
  .navbar-nav .dropdown-menu {
    position: static !important; float: none; width: 100%;
    box-shadow: none; border: 0;
  }
  .navbar-nav > li > a, .dropdown-menu > li > a { padding: 12px 16px; }
}

/* ---------- I. Issue 9 - Manage Booking, Log In / Sign up, Sign up for free
   and Sign In now are now <button type="button"> (they only open a pop-up),
   not <a href="#">. These rules make the buttons look exactly like the old
   links (values measured from the live site). */
button.tr-link-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
}
button.tr-link-btn:focus { outline: none; }
button.tr-link-btn:focus-visible { outline: 2px solid #3C627A; outline-offset: 2px; }

/* header menu items (desktop) */
.navbar-nav > li > button.tr-link-btn {
  display: block;
  position: relative;
  margin-top: 2px;
  color: #3C627A;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
}
.navbar-nav > li > button.tr-link-btn img { margin-right: 6px; vertical-align: middle; }
/* header menu items (phone layout) */
.tr-ua-mobile .navbar-nav > li > button.tr-link-btn {
  width: 100%;
  margin-top: 0;
  font-weight: 500;
  font-size: 13px;
  line-height: 22px;
}
@media (max-width: 767px) {
  .navbar-nav > li > button.tr-link-btn { padding: 12px 16px; }   /* same as section H links */
}
/* RTL (Arabic) */
.tr-lang-ar .navbar-nav > li > button.tr-link-btn { text-align: right; }
.tr-lang-ar .navbar-nav > li > button.tr-link-btn img { margin-right: 0; margin-left: 6px; }

/* login pop-up: "Sign up for free" / "Sign In now" */
.passLogins button.tr-link-btn {
  display: inline;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 22.53px;
}
#sign_up_for_free_click.tr-link-btn { color: #EE1935; }
#sign_up_for_free_show.tr-link-btn { color: #113255; }

/* "Access My Booking" pop-up: Log In / Sign up */
.access_booking h6 button.tr-link-btn { color: #113255; }

/* ---------- J. Issue 7 (RTL): media_arabic.css fixes the Arabic menu panel at
   height:217px, and the currency / language blocks are floated, so the inline
   dropdown from section H spilled out of the white panel. Let it grow. */
@media (max-width: 767px) {
  .tr-lang-ar .colinsides .navbar.colorwhite.navme .navbar-nav { height: auto; min-height: 217px; }
  .tr-lang-ar .navbar-collapse .navbar-nav > li { display: flow-root; }
}
