@use "mixins/hover";
@use "variables";
@use "vendor/rfs";

.close {
  float: right;
  @include rfs.font-size(variables.$close-font-size);
  font-weight: variables.$close-font-weight;
  line-height: 1;
  color: variables.$close-color;
  text-shadow: variables.$close-text-shadow;

  // Override <a>'s hover style
  @include hover.hover() {
    color: variables.$close-color;
    text-decoration: none;
  }
}

// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile

// stylelint-disable-next-line selector-no-qualifying-type
button.close {
  padding: 0;
  background-color: transparent;
  border: 0;
}

// Future-proof disabling of clicks on `<a>` elements

// stylelint-disable-next-line selector-no-qualifying-type
a.close.disabled {
  pointer-events: none;
}
