// @use '../button/states' as *;
@use '../../tokens/breakpoints' as *;

@mixin menu-hover {
  color: var(--cbp-color-text-darkest);
  background-color: var(--cbp-color-interactive-secondary-lighter);
  border-color: var(--cbp-color-interactive-secondary-darker);
}

.cbp-application-header {
  display: flex;
  align-items: center;
  height: var(--cbp-space-14x);
  width: 100%;
  position: sticky;
  top: calc(-1 * var(--cbp-space-half-x));
  background-color: var(--cbp-color-white);
  box-shadow: var(--cbp-shadow-level-1-down);
  padding-right: var(--cbp-space-4x);
  z-index: var(--cbp-z-index-level-1);

  nav {
    a {
      text-decoration: none;
    }
  }

  .cbp-nav-menu {
    display: flex;
    align-items: center;
    justify-content: end;
    height: 100%;
    width: 100%;

    @media (min-width: 768px) {
      justify-content: space-between;
    }
  }

  .cbp-application-menus {
    display: flex;
    height: 100%;
  }

  .nav-home,
  .cbp-nav-item,
  .cbp-menu-dropdown {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 var(--cbp-space-3x);
    color: var(--cbp-color-interactive-secondary-darker);
    background-color: transparent;
    font-size: var(--cbp-font-size-heading-xs);
    font-weight: var(--cbp-font-weight-medium);
    text-decoration: none;
    white-space: nowrap;
    border-color: transparent;
    border-style: solid;
    border-width: 0 0 var(--cbp-border-size-md) 0;
    
    & > i {
      margin-left: var(--cbp-space-2x);
    }

    &:hover {
      @include menu-hover;
    }

    &:focus {
      // @include btn-focus;
      border-bottom: 0;
    }

    &:active {
      // this is supposed to be the same as focus but with an animation.
    }
  }

  .nav-home {
    font-size: var(--cbp-font-size-heading-sm);
    font-weight: var(--cbp-font-weight-bold);
    padding-left: var(--cbp-space-5x);
    padding-right: var(--cbp-space-5x);
  }
}

@media (min-width: $cbp-breakpoint-md) {
  .cbp-application-header {
    padding-right: var(--cbp-space-8x);
    
    .nav-home {
      padding-left: var(--cbp-space-8x);
    }
  }

}

@media (min-width: $cbp-breakpoint-xl) {
  .cbp-application-header {
    padding-right: var(--cbp-space-11x);

    .nav-home {
      padding-left: var(--cbp-space-11x);
    }
  }
}