/* EN | FR toggle in the marketing nav (NP-4743). Sits last in the
 * primary_menu region, after Start Trial / Login, and takes the look of
 * those superfish links (15px, regular weight, same grey-blue). */
.bca-lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #ccd8de;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.bca-lang-toggle:hover,
.bca-lang-toggle:focus {
  /* The hover colour of the Start Trial / Login links beside it. */
  color: #6eb6b0;
  text-decoration: none;
}

/* Centred against its neighbours (Start Trial / Login) in the navbar row. */
.block-bca-site-translate-toggle {
  display: flex;
  align-items: center;
  align-self: center;
}

/* The navbar spreads its blocks with justify-content: space-between, which
 * would push the toggle far away from Login. An auto margin on the account
 * block takes up that free space instead, so Start Trial, Login and the
 * toggle sit together on the right. Only when the toggle is there; desktop
 * only (Bootstrap lg), the mobile menu stacks. Coupled to the theme's navbar
 * markup and to bca_lazy_load_block wrapping the superfish account menu: if
 * either changes, this stops matching and the toggle drifts right again. */
@media (min-width: 992px) {
  .navbar-collapse:has(> .block-bca-site-translate-toggle) > .block-bca-lazy-load-block:has(.block-superfishaccount) {
    margin-left: auto;
  }

  /* 5px + the navbar's 7px gap + the link's 12px padding: the same 24px
   * between Login and the label as between Start Trial and Login. */
  .block-bca-site-translate-toggle {
    margin-left: 5px;
  }
}

/* Mobile menu: the toggle shares the Start Trial / Login row, whose links
 * are 55px tall and sit at the bottom of the account block. Match both so
 * the three labels line up. */
@media (max-width: 991.98px) {
  .block-bca-site-translate-toggle {
    align-self: end;
  }

  .bca-lang-toggle {
    line-height: 55px;
  }
}
