/* stylelint-disable no-descending-specificity */
.ds-link-with-arrow-icon {
  display: inline-flex;
  flex-wrap: nowrap;
  font-family: var(--ds-type-system-sans-lining);
  font-size: var(--ds-type-scale-1);
  font-weight: 400;
  line-height: var(--ds-type-leading-border-link);
  text-decoration: none;
  span {
    border-bottom: 0.125rem solid transparent;
    color: var(--ds-color-london-5);
    margin: 0.125rem 0 0 0;
    transition: border-color var(--ds-interactions-transition), color var(--ds-interactions-transition);
    will-change: border-color, color;
  }
  &:hover {
    span {
      border-bottom-color: var(--ds-color-chicago-45);
      color: var(--ds-color-chicago-30);
    }
  }
  &:focus {
    outline: solid transparent;
    span {
      border-bottom-color: transparent;
      box-shadow: 0 0 0 0.125rem var(--ds-color-hong-kong-55);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
      box-shadow: none;
      color: var(--ds-color-london-5);
    }
  }
  &::before {
    color: var(--ds-color-chicago-45);
    content: '⇒';
    font-size: 1.875rem;
    margin: -0.185rem 0.375rem 0 0;
  }
}

.ds-link-with-arrow-icon--heavy {
  font-weight: 500;
  &::before {
    color: var(--ds-color-london-5);
  }
  &:hover {
    span {
      border-bottom-color: var(--ds-color-london-5);
      color: var(--ds-color-london-5);
    }
  }
  &:focus {
    span {
      color: var(--ds-color-london-5);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
      color: var(--ds-color-london-5);
    }
  }
}

.ds-link-with-arrow-icon--minor {
  font-size: var(--ds-type-scale-0);
  span {
    border-bottom-width: 0.0625rem;
  }
  &:focus {
    span {
      border-bottom-color: transparent;
      box-shadow: 0 0 0 0.0625rem var(--ds-color-hong-kong-55);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
      box-shadow: none;
    }
  }
  &::before {
    font-size: 1.625rem;
  }
}

.ds-link-with-arrow-icon--inverse {
  span {
    color: var(--ds-color-london-100);
  }
  &:hover {
    span {
      border-bottom-color: var(--ds-color-london-100);
      color: var(--ds-color-london-100);
    }
  }
  &:focus {
    span {
      color: var(--ds-color-london-100);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
    }
  }
  &::before {
    color: var(--ds-color-london-100);
  }
}
