/**
 * Skip to main content link.
 *
 * Based on visually-hidden-focusable but with a background to ensure contrast
 */

@use "../settings" as *;
@use "../tools" as *;

.skip-link {
  @include transition($btn-transition);
  display: block;
  padding: space(1) space(3);
  background-color: $white;

  &:focus {
    text-decoration: $link-hover-decoration;
    outline: 0;
    box-shadow: inset 0 0 0 .25rem rgba(var(--#{$prefix}link-color-rgb), .5);
  }

  &:hover {
    color: color-contrast($link-color);
    background-color: $link-color;
  }
}

.skip-link:not(:focus):not(:focus-within) {
  @include visually-hidden();
}
