/* EC Sticky Logo
 *
 * The logo is injected as the first real item of the same responsive
 * .container that contains #top-menu. In sticky state the container
 * becomes a flex row, so the logo follows the theme container grid
 * automatically instead of being positioned with a viewport offset.
 */

.ec-sticky-logo {
  display: none;
  flex: 0 0 auto;
  width: var(--ec-sticky-logo-width, 190px);
  margin-right: var(--ec-sticky-logo-gap, 30px);
  line-height: 1;
}

.ec-sticky-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

.ec-sticky-logo.ec-sticky-logo--white img {
  filter: brightness(0) invert(1);
}

/* Genesis uses the desktop top menu only from 1200 px upward. */
@media (min-width: 1200px) {
  #header.scroll-menu #_desktop_top_menu > .container {
    display: flex;
    align-items: center;
  }

  #header.scroll-menu #_desktop_top_menu > .container::after {
    display: none;
  }

  #header.scroll-menu .ec-sticky-logo {
    display: block;
  }

  #header.scroll-menu #top-menu {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
  }
}

/* The Genesis mobile/tablet header has its own logo and menu structure. */
@media (max-width: 1199px) {
  .ec-sticky-logo {
    display: none !important;
  }
}
