/* Additions to the app's own stylesheet (public/assets/index.css is the
   product's build and stays untouched).

   The top-right nav has seven tabs since the Slack Integration tab was added,
   which no longer fits beside the brand and the account menu on smaller
   screens. Below 1180px the header wraps: brand on the left and the account
   menu on the right of the first row, the tabs on their own full-width row,
   scrolling sideways if they still don't fit, so every tab stays reachable at
   any width. */
/* The Slack Integration tab fills the screen below the navbar: no page margins and
   no trust banner. <veloura-slack> sizes itself to the space left under the
   navbar (it measures the navbar, which wraps on smaller screens). */
.shell:has(> veloura-slack) { max-width: none; padding: 0; }
.shell:has(> veloura-slack) > .trust-banner { display: none; }

/* The account menu sits at the far right of the header, after the tabs. It is
   wrapped in the app's own inline-flex span, so the span is what gets ordered. */
.utility-right > span:has(> veloura-usermenu) { order: 9; margin-left: 4px; }

/* While the guided tour is open, the Brief's floating "on this page" bar would
   sit on top of whatever the tour is pointing at (it positions itself at
   z-index 90 as you scroll). */
body.tour-open .page-bar { display: none; }

@media (max-width: 1180px) {
  .utility-bar { flex-wrap: wrap; row-gap: 10px; column-gap: 16px; }
  .utility-right { display: contents; }
  .utility-right > .mode-toggle {
    order: 3; flex: 1 1 100%; max-width: 100%; justify-content: flex-start;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .utility-right > .mode-toggle::-webkit-scrollbar { display: none; }
  .utility-right > .mode-toggle > button { flex: 0 0 auto; white-space: nowrap; }
  /* the menu keeps to the right of the first row, beside the brand */
  .utility-right > span:has(> veloura-usermenu) { order: 1; margin-left: auto; }
}

@media (max-width: 720px) {
  .utility-bar { padding: 10px 16px; }
}
