/* The member menu (layouts/application, nav.tpf-member-nav; owner, 2026-10-30):
 * members' pages, and staff in Client View.
 *
 * Under 768px nothing here applies: the three bars open the same full-width
 * list in the bar as always (the owner: "works great on mobile").
 *
 * From 768px up (an iPad held upright and wider) the bars stay at the top
 * right on the logo's row, and open a dropdown panel anchored under them at
 * the right edge. The panel floats over the page instead of pushing it down.
 * 768px, not Bootstrap's lg (992px): an iPad in portrait (768-834px) has room
 * for a 240px panel beside nothing, and a full-width list there looked as
 * stretched as it did on the desktop; every phone is narrower than 768px.
 * Closing on Escape, an outside click or a choice: public/js/tpf-member-menu.js.
 */
@media (min-width: 768px) {
  /* .navbar is position: relative, so the panel anchors to the bar. */
  .tpf-member-nav > .container-fluid {
    flex-wrap: nowrap;
  }

  .tpf-member-nav .navbar-toggler {
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
  }

  .tpf-member-nav .navbar-collapse {
    position: absolute;
    top: calc(100% + 0.25rem);
    /* The container's own right padding - the toggler's right edge. */
    right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    z-index: 1045;
    width: auto;
    min-width: 240px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding: 0.5rem;
    background: rgb(var(--bs-dark-rgb, 33, 37, 41));
    border: 1px solid rgba(241, 239, 234, 0.12);
    border-radius: 0.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    text-align: left;
  }

  /* Bootstrap animates the height while opening and closing; keep the panel's
     look during that. */
  .tpf-member-nav .navbar-collapse.collapsing {
    overflow: hidden;
  }

  .tpf-member-nav .navbar-collapse .navbar-nav {
    margin: 0 !important;
    width: 100%;
  }

  .tpf-member-nav .navbar-collapse .nav-item {
    padding: 0 !important;
  }

  .tpf-member-nav .navbar-collapse .tpf-nav-link {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* A panel item hovers in place - no lift inside a list. */
  .tpf-member-nav .navbar-collapse .tpf-nav-link:hover,
  .tpf-member-nav .navbar-collapse .tpf-nav-link:focus-visible {
    transform: none;
  }

  .tpf-member-nav .navbar-collapse .tpf-nav-link:focus-visible {
    outline: 2px solid var(--tpf-signal, #e14a2b);
    outline-offset: -2px;
  }

  /* Logout stands apart from the destinations above it. */
  .tpf-member-nav .navbar-collapse .nav-item:last-child {
    margin-top: 0.25rem !important;
    padding-top: 0.25rem !important;
    border-top: 1px solid rgba(241, 239, 234, 0.12);
  }
}
