.nav-wrapper {
  display: none;

  @include bp("tablet") {
    display: block;
  }
}

.navigation {
  display: flex;
  align-items: center;
  list-style-type: none;
  gap: 1rem;
  font-family: var(--font-atyp-text);
  font-size: 1rem;
  color: var(--color-navy);

  @include bp("desktop") {
    gap: 1.625rem;
  }

  .menuItem,
  .menuItem a {
    text-decoration: none;
    .dot {
      border-color: var(--color-navy);
    }

    &:hover,
    &.active {
      .dot {
        background-color: var(--color-navy);
      }
    }
  }

  .submenu {
    background-color: var(--color-white);
    color: var(--color-black);

    .submenuItem a {
      .newTab {
        color: var(--color-dark-gray);
      }

      &.iconItem {
        background-color: var(--color-navy);

        img {
          width: 100%;
          height: auto;
        }
      }
    }
  }

  li {
    position: relative;
    line-height: 1;

    &:last-child {
      .submenu {
        left: unset;
        right: 0;
      }
    }
  }

  .menuItem,
  .menuItem a {
    &:hover {
      .dot {
        background-color: var(--color-navy);
      }
    }
  }

  .menuItem.show {
    .submenu {
      visibility: visible;
    }
  }

  .submenu {
    visibility: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateY(calc(100% + 0.75rem));
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.3125rem;
    background-color: var(--color-white);
    width: max-content;
    border-radius: 0.625rem;
    color: var(--color-navy);

    box-shadow:
      0 0.4rem 0.6rem rgba(0, 0, 0, 0.1),
      0 0.8rem 2.4rem rgba(0, 0, 0, 0.08);

    .right {
      display: flex;
      gap: 0.5rem;
      padding: 0.5rem;
      justify-content: space-between;
    }

    .submenuItem a {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 0.5rem;
      border-radius: 0.3125rem;
      gap: 0.375rem;
      transition:
        color,
        background-color 0.2s ease;

      &.iconItem {
        width: 1.75rem;
        height: 1.75rem;
        padding: 0.375rem;
        background-color: var(--color-cyan);
        object-fit: contain;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
          background-color: var(--color-icterine);
        }
      }

      &:not(.iconItem):hover {
        background-color: var(--color-indigo);
        color: var(--color-white);

        .subtext,
        .newTab {
          color: var(--color-white);
        }
      }
    }

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 0.75rem;
      transform: translateY(-100%);
    }
  }
}

.connect {
  height: 2.375rem;
  min-width: 6.5rem;
  display: flex;
  align-items: center;
}

.subtext {
  color: var(--color-darker-gray);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.submenuItemLabel {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.menuItemLabel {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;

  .dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 1px solid var(--color-navy);
    transition: background-color 0.2s ease;
  }
}

.newTab {
  width: 0.5rem;
  height: 0.5rem;
  color: var(--color-silver);
  transition: color 0.2s ease;
}

.submenuWithIcon {
  display: flex;
  background-color: var(--color-light-pink);
  padding: 0.5rem;
  border-radius: 0.3125rem;
  gap: 1.5rem;

  & > a:hover {
    .submenuIcon {
      opacity: 1;
    }
  }

  .submenuIcon {
    width: 0.875rem;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.2s ease;
  }
}
