/* tpl_businfoapp 1.2.1-alpha1 — compact account actions and header collision guards. */
.bi-header-inner,
.bi-brand,
.bi-primary-navigation,
.bi-header-actions {
  min-inline-size: 0;
}

.bi-header-actions {
  flex: 0 0 auto;
  gap: .5rem;
  white-space: nowrap;
}

.bi-header-actions > .bi-icon-button {
  flex: 0 0 40px;
  inline-size: 40px;
  block-size: 40px;
}

.bi-header-chip {
  flex: 0 0 auto;
  inline-size: auto;
  min-block-size: 44px;
  block-size: 44px;
  max-block-size: 44px;
  padding: 0 .9rem;
  gap: .5rem;
  border-radius: .85rem;
  line-height: 1;
  white-space: nowrap;
}

.bi-header-chip > span {
  display: inline-block;
  white-space: nowrap;
}

.bi-header-login svg {
  flex: 0 0 20px;
  inline-size: 20px;
  block-size: 20px;
}

/* The partner CTA is text-first. A legacy icon from an override must never
   enlarge the action again. */
.bi-header-register svg {
  display: none !important;
}

.bi-brand-copy {
  min-inline-size: 0;
  max-inline-size: 11rem;
}

.bi-brand-copy strong,
.bi-brand-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bi-user-chip-copy {
  min-inline-size: 0;
}

@media (min-width: 1400px) {
  .bi-header-inner {
    gap: 1rem;
  }

  .bi-header-chip {
    padding-inline: 1rem;
  }
}

/* Compact desktop: preserve all actions while reducing logo/navigation pressure. */
@media (min-width: 1200px) and (max-width: 1399px) {
  .bi-header-inner {
    gap: .65rem;
  }

  .bi-brand img {
    block-size: 42px;
    max-inline-size: 150px;
  }

  .bi-brand-copy {
    max-inline-size: 8.5rem;
  }

  .bi-menu-fallback > li > a,
  .bi-menu-link-row > a,
  .bi-menu-heading {
    padding-inline: .55rem;
  }

  .bi-header-actions {
    gap: .35rem;
  }

  .bi-header-chip {
    padding-inline: .75rem;
  }
}

/* Tablet and 200% desktop zoom: the partner CTA remains available in the
   navigation drawer, while the top row keeps search and login unobstructed. */
@media (min-width: 768px) and (max-width: 1023px) {
  .bi-header-register {
    display: none !important;
  }

  .bi-header-login {
    padding-inline: .75rem;
  }
}

@media (max-width: 767px) {
  .bi-header-actions {
    gap: .2rem;
  }

  .bi-header-chip {
    inline-size: 44px;
    min-inline-size: 44px;
    padding: 0;
    border-radius: 999px;
  }

  .bi-header-login > span,
  .bi-header-register {
    display: none !important;
  }

  .bi-mobile-nav-actions .btn {
    min-block-size: 44px;
    white-space: nowrap;
  }
}

/* Long authenticated names must never push the header outside the viewport. */
@media (min-width: 1200px) {
  .bi-user-chip {
    max-inline-size: 18rem;
  }

  .bi-user-chip-copy {
    max-inline-size: 11rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bi-header-chip {
    transition: none;
  }
}
