/*
 * BAT VISAS — header stability candidate v1 (STAGING TEST ONLY)
 * 2026-12-01. Based on the shared V78 header retrieved from batvisas.com.
 * No markup, logo, images, links, forms, fees or scripts are replaced.
 * Existing mobile layout (760px and below) is left alone.
 */

@media (min-width: 761px) {
  /* Reserve the same classic-scrollbar space across service views. */
  html {
    scrollbar-gutter: stable;
  }

  /* Keep labels intact and their widths stable between selected states.
     Existing gold text and underline rules still identify the active tab. */
  header > .wrap.nav > nav > a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700 !important;
  }
  header > .wrap.nav > .brand > .brandText,
  header > .wrap.nav > .batTopContact {
    white-space: nowrap;
  }
}

@supports not (scrollbar-gutter: stable) {
  @media (min-width: 761px) {
    html {
      overflow-y: scroll;
    }
  }
}

@media (min-width: 931px) {
  /* Preserve original 78px desktop header when the contents fit.
     Grow only if necessary, rather than clipping a wrapped menu. */
  header {
    height: auto;
    min-height: 78px;
    padding-block: 8px;
  }
  header > .wrap.nav > .brand,
  header > .wrap.nav > .brand > .brandText {
    flex: 0 0 auto;
  }
  header > .wrap.nav > nav {
    flex: 1 1 0%;
    min-width: 0;
    flex-wrap: wrap;
  }
}
