// CSS variables provided via theme settings variant system (scoped via data-buttons-variant)
.button {
  --hs-link-textDecoration: none;
  --hs-link-textDecoration-hover: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--hs-button-backgroundColor);
  color: var(--hs-button-color);
  padding: 12px 24px;
  border-radius: var(--hs-button-borderRadius);
  border-style: var(--hs-button-borderStyle);
  border-width: var(--hs-button-borderWidth);
  border-color: var(--hs-button-borderColor);
  font-size: var(--hs-button-fontSize);
  font-family: var(--hs-button-fontFamily);
  font-style: var(--hs-button-fontStyle);
  font-weight: var(--hs-button-fontWeight);
  text-decoration: var(--hs-button-textDecoration);
  cursor: pointer;
  transition: all 0.2s ease;

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

  &.inEditor {
    cursor: default;
    transition: none;


    /* allows for inline editing with no content */
    .textWrapper {
      min-width: 20px;
    }

    .textWrapperNoIcon {
      flex: 1;
      text-align: center;
    }
  }

  &:not(.inEditor):hover {
    background-color: var(--hs-button-backgroundColor-hover, var(--hs-button-backgroundColor));
    color: var(--hs-button-color-hover, var(--hs-button-color));
    border-style: var(--hs-button-borderStyle-hover, var(--hs-button-borderStyle));
    border-width: var(--hs-button-borderWidth-hover, var(--hs-button-borderWidth));
    border-color: var(--hs-button-borderColor-hover, var(--hs-button-borderColor));
  }

  &:not(.inEditor):focus-visible {
    background-color: var(--hs-button-backgroundColor-hover, var(--hs-button-backgroundColor));
    color: var(--hs-button-color-hover, var(--hs-button-color));
    border-style: var(--hs-button-borderStyle-hover, var(--hs-button-borderStyle));
    border-width: var(--hs-button-borderWidth-hover, var(--hs-button-borderWidth));
    border-color: var(--hs-button-borderColor-hover, var(--hs-button-borderColor));
  }

  &:not(.inEditor):active {
    background-color: var(--hs-button-backgroundColor-active, var(--hs-button-backgroundColor));
    color: var(--hs-button-color-active, var(--hs-button-color));
    border-style: var(--hs-button-borderStyle-active, var(--hs-button-borderStyle));
    border-width: var(--hs-button-borderWidth-active, var(--hs-button-borderWidth));
    border-color: var(--hs-button-borderColor-active, var(--hs-button-borderColor));
  }

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

  svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    fill: currentColor;
    flex-shrink: 0;
  }
}

