@import '../../variables';

:local {
  .item {
    color: var(--terra-consumer-nav-link-color, #3d3d3d);
    display: flex;
    font-size: var(--terra-consumer-nav-link-font-size, 16px);
    line-height: 20px;
    padding: 9px 0 9px 25px;
    position: relative;
    text-decoration: none;
    text-transform: var(--terra-consumer-nav-link-text-transform, none);
  }

  .icon {
    padding-right: 10px;
  }

  .link {
    display: block;
    text-decoration: none;

    &:hover {
      background: var(--terra-consumer-link-hover-background, rgba(255, 255, 255, 0.4));
      color: var(--terra-consumer-nav-link-color, #3d3d3d);
    }
  }

  /* stylelint-disable selector-max-compound-selectors, max-nesting-depth */
  .nested {
    .link {
      .item {
        padding-left: 48px;
      }

      .label {
        padding-right: 35px;
      }

      .icon {
        padding-right: 10px;
      }

      .badge {
        position: absolute;
        right: 5px;
        top: 10px;
      }
    }
  }

  .badge {
    align-self: center;
    background: var(--terra-consumer-badge-background, #fff);
    border-radius: 10px;
    color: var(--terra-consumer-badge-color, #3d3d3d);
    display: inline-block;
    font-size: 12px;
    margin: 0 10px;
    padding: 0 10px;
  }

  .active {
    background: var(--terra-consumer-nav-active-link-background, rgba(255, 255, 255, 0.5));
    background-attachment: fixed;
    background-size: cover;
    font-weight: 900;
    position: relative;

    @media screen and (max-width: $terra-medium-breakpoint - 1) {
      background-attachment: none;
      background-image: none;
      background-size: none;
    }

    &::before {
      background: var(--terra-consumer-nav-link-color, #383f42);
      border-radius: 3px;
      bottom: -0;
      content: '';
      left: 0;
      position: absolute;
      top: -0;
      width: 4px;
    }
  }
}
