/* =============================================================
   partners.wppbx.com - narrow viewport

   Loaded last, after partners-polish.css, so these rules win.

   The partner site never had a mobile navigation. The header lays out
   brand + Pricing/FAQ + wppbx.com + Partner Portal Login in one row that
   needs 545px, so in a 390px window the whole page scrolls sideways and
   the right-hand end of the header sits off-screen. Measured 2026-08-02.

   Below 880px the two nav rows collapse into a button and a panel. The
   header markup itself is unchanged apart from the button and the panel;
   nothing is duplicated, the panel holds the same four destinations.

   Second, independent offender: the cookie banner. .cookie-banner-text
   carries min-width:260px and sits in a flex row beside the actions, so
   the banner alone demands 525px and cannot shrink. It is released here.
   ============================================================= */

/* The button only exists on narrow screens; it must never appear on
   desktop, where the real nav is perfectly usable. */
.nav-burger { display: none; }
.mobile-nav { display: none; }

@media (max-width: 880px) {

  /* ---- header: collapse both nav rows into a button --------------- */
  .site-header .site-nav { display: none; }

  .nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-burger:hover,
  .nav-burger[aria-expanded="true"] {
    color: var(--yellow);
    border-color: var(--yellow);
  }

  /* The brand must be allowed to shrink or it re-widens the row on the
     narrowest phones. */
  .site-header .header-left { min-width: 0; }
  .site-header .brand { min-width: 0; }
  .site-header .brand-name { min-width: 0; }
  .site-header .container { padding: 0 1rem; }

  /* ---- the panel -------------------------------------------------- */
  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    transition: max-height 0.22s ease-out, border-color 0.22s;
  }
  .mobile-nav.open {
    max-height: 22rem;
    border-top-color: var(--border);
  }
  .mobile-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem 1rem;
  }
  .mobile-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-nav a:hover,
  .mobile-nav a:focus-visible {
    background: var(--surface-2);
    color: var(--yellow);
    text-decoration: none;
  }
  /* the login action keeps its emphasis inside the panel */
  .mobile-nav a.mobile-nav-login {
    margin-top: 0.4rem;
    justify-content: center;
    background: var(--yellow);
    color: #0d1117;
  }
  .mobile-nav a.mobile-nav-login:hover {
    background: var(--yellow);
    color: #0d1117;
    filter: brightness(1.08);
  }

  /* ---- cookie banner: stop it demanding 525px --------------------- */
  #cookieBanner .cookie-banner-inner { flex-wrap: wrap; gap: 0.75rem; }
  #cookieBanner .cookie-banner-text  { min-width: 0; flex: 1 1 100%; }
  #cookieBanner .cookie-banner-actions {
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
  }
  #cookieBanner .cookie-banner-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav { transition: none; }
}
