/*
 * Logo design funnel navbar: editor (all steps), products page (in logo flow), checkout.
 * Loaded after each page's own header CSS. Icons: views/partials/lg-nav-icon.php.
 *
 * Back / account / cart buttons: 32px high, 12px side padding, 14px #ECF1F2 text,
 * 8px between icon and text, #363B46 on hover. 8px between the logo and Back,
 * 8px between account and cart, and the right edge matches the logo's left offset (35px).
 */

.lg-nav-btn,
.lg-nav-btn:visited,
.lg-nav-btn:focus,
.lg-nav-btn:active {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 4px;
  background: #2c313c !important;
  color: #ecf1f2 !important;
  font-family: "Open Sans", sans-serif;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1 !important;
  white-space: nowrap;
  text-decoration: none !important;
  vertical-align: top;
  cursor: pointer;
  box-shadow: none !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.lg-nav-btn:hover,
.lg-nav-btn:focus-visible {
  background: #363b46 !important;
  color: #ecf1f2 !important;
}

/* The old icon-font glyph is replaced by the inline SVG. */
.lg-nav-btn:before,
.lg-nav-btn:hover:before,
.lg-nav-btn:after {
  content: none !important;
  display: none !important;
}

.lg-nav-btn__icon {
  display: block;
  flex: 0 0 auto;
}

.lg-nav-btn__count {
  color: inherit !important;
  font-size: inherit !important;
  line-height: 1;
}

/* Right-side group: 8px between the account button and the cart. */
.lg-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: top;
}

@media (min-width: 769px) {
  /* Logo: 35px from the left, 138px wide, then an 8px gap → Back at 181px. */
  .top-bar .btn-logo-back.lg-nav-btn:not(.btn-logo-forward) {
    position: absolute !important;
    left: 181px !important;
    top: 9px !important;
  }

  /* Template grid on desktop shows Back and "Back to logo" side by side:
     keep "Back to logo" clear of the wider Back (longest label: "Zurück"). */
  .top-bar .btn-logo-forward.lg-nav-after-back {
    left: 285px !important;
  }

  /* Right padding matches the logo's 35px left offset. */
  .top-bar .account-top-bar.lg-nav-end {
    right: 35px !important;
    /* 32px buttons centred in the 50px bar: (50 - 32) / 2 = 9px.
       Checkout otherwise inherits style-2024's top: 15px. */
    top: 9px !important;
    line-height: 0 !important;
  }

  .top-bar .account-top-bar.lg-nav-end .lg-nav-group {
    position: relative;
    top: 0;
  }
}

/* Products page inside the logo flow: same bar as the editor, without the site menu. */
/* No fixed site header above it, so drop the space the page keeps for one. */
body.lg-funnel-page {
  padding-top: 0 !important;
}

/* Beats products-page.css "body.page-industry .headline.first-line.pp-hero" (mobile). */
body.page-industry.lg-funnel-page .headline.first-line.pp-hero {
  margin-top: 0 !important;
}

.lg-funnel-topbar {
  position: relative;
  z-index: 200;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 35px;
  box-sizing: border-box;
  background-color: #1a1a1a;
}

.lg-funnel-topbar__logo {
  display: block;
  flex: 0 0 auto;
  width: 138px;
  height: 26px;
  margin-right: 8px;
  line-height: 0;
}

.lg-funnel-topbar__logo img {
  display: block;
  width: 138px;
  height: 26px;
  object-fit: contain;
  object-position: left center;
}

.lg-funnel-topbar__end {
  margin-left: auto;
}

@media (max-width: 768px) {
  .lg-funnel-topbar {
    padding: 0 15px;
  }

  .lg-funnel-topbar__logo {
    width: 110px;
    margin-right: 8px;
  }

  .lg-funnel-topbar__logo img {
    width: 110px;
  }
}

/* Mobile: home icon square in the funnel colour (editor, preview, product editor). */
@media (max-width: 768px) {
  html body .top-bar .btn-home-engine,
  html body .top-bar .btn-home-engine:hover,
  html body .top-bar .btn-home-engine:focus {
    background: #2c313c !important;
    border-color: #2c313c !important;
  }
}
