// CSS variables that can be mapped to theme settings
.button {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: var(--hscl-button-gap, 8px);
  background-color: var(--hscl-button-backgroundColor);
  color: var(--hscl-button-color);
  padding: var(--hscl-button-paddingBlock) var(--hscl-button-paddingInline);
  border-radius: var(--hscl-button-borderRadius);
  border: var(--hscl-button-borderWidth) solid var(--hscl-button-borderColor);
  font-size: var(--hscl-button-fontSize);
  font-weight: var(--hscl-button-fontWeight);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }

  &:hover {
    background-color: var(--hscl-button-backgroundColor-hover, var(--hscl-button-backgroundColor));
    color: var(--hscl-button-color-hover, var(--hscl-button-color));
    border-width: var(--hscl-button-borderWidth-hover, var(--hscl-button-borderWidth));
    border-color: var(--hscl-button-borderColor-hover, var(--hscl-button-borderColor));
    text-decoration: none;
  }

  &:focus-visible {
    background-color: var(--hscl-button-backgroundColor-focus, var(--hscl-button-backgroundColor));
    color: var(--hscl-button-color-focus, var(--hscl-button-color));
    border-width: var(--hscl-button-borderWidth-focus, var(--hscl-button-borderWidth));
    border-color: var(--hscl-button-borderColor-focus, var(--hscl-button-borderColor));
    outline: var(--hscl-button-outlineWidth-focus, 2px) solid var(--hscl-button-outlineColor-focus, currentColor);
    outline-offset: var(--hscl-button-outlineOffset-focus, 2px);
  }

  &:active {
    background-color: var(--hscl-button-backgroundColor-active, var(--hscl-button-backgroundColor));
    color: var(--hscl-button-color-active, var(--hscl-button-color));
    border-width: var(--hscl-button-borderWidth-active, var(--hscl-button-borderWidth));
    border-color: var(--hscl-button-borderColor-active, var(--hscl-button-borderColor));
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    fill: var(--hscl-button-icon-fill);
  }
}
