/*
 * Public site (`_FrontLayout`) navbar — P-07.
 * demo.css is template-owned and forces `.app-brand-logo.demo .billding-logo { height: 50px }` (≈222 px wide), so on a phone the
 * toggler, the logo and the toolbar did not fit one row and Bootstrap's `flex-wrap: wrap` moved the toolbar to a second row.
 * The selectors below are one class more specific than demo.css, so they win without !important (except the logo swap).
 */

/* Desktop: a slimmer logo, aspect ratio kept */
.landing-navbar .app-brand-logo.demo .billding-logo-full {
  height: auto;
  max-height: 40px;
  max-width: none;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  /* One row: toggler · logo · toolbar (theme switch, «Σύνδεση»); the navbar stays at most 72 px high */
  .landing-navbar {
    flex-wrap: nowrap;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  .landing-navbar .navbar-brand {
    min-width: 0;
    margin-inline-end: .5rem !important;
  }

  .landing-navbar .navbar-toggler {
    margin-inline-end: .5rem !important;
  }

  .landing-navbar .app-brand-logo.demo .billding-logo-full {
    height: auto;
    max-height: 32px;
    max-width: min(140px, 34vw);
    object-fit: contain;
  }

  .landing-navbar > .navbar-nav {
    flex-shrink: 0;
  }
}

/* Very narrow phones: only the logo mark, so the toolbar keeps its place on the row */
@media (max-width: 359.98px) {
  .landing-navbar .app-brand-logo.demo .billding-logo-full {
    display: none !important;
  }

  .landing-navbar .app-brand-logo.demo .billding-logo-mark {
    display: block;
    height: 32px;
    width: auto;
  }
}

/* The public navbar stays solid: the template makes it 38% transparent until the page scrolls, so text scrolling behind it
   mixed with the menu (seen on long help articles). Same specificity as the template rule, loaded after it. */
nav.layout-navbar .navbar.landing-navbar {
  --bs-front-navbar-bg: var(--bs-paper-bg);
  background-color: var(--bs-paper-bg);
  box-shadow: var(--bs-box-shadow-sm);
}

/* The fixed navbar is always above the page content (a positioned hero or search box must never paint over the menu) */
nav.layout-navbar { z-index: 1040; }

/* Menu entries of the public navbar: the page that is open and the entry under the pointer are blue */
.landing-navbar .dropdown-menu .dropdown-item:hover,
.landing-navbar .dropdown-menu .dropdown-item:focus-visible,
.landing-navbar .dropdown-menu .dropdown-item.active {
  color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), .1);
}
.landing-navbar .dropdown-menu .dropdown-item.active { font-weight: 600; }
