.button {
  --color: var(--color-text);
  --background: transparent;
  --border-color: var(--color);
  --bg-base-opacity:
    calc(
      var(--is-light-theme-on) * 0.06 +
      var(--is-dark-theme-on) * 0.12
    );
  margin: 0;
  position: relative;
  z-index: 0;
  appearance: none;
  overflow: hidden;
  display: inline-block;
  box-sizing: border-box;
  padding: 0.5em 1.33em;
  border: 1px solid var(--border-color);
  font: inherit;
  text-decoration: none;
  color: var(--color);
  background-color: var(--background);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.button::before {
  content: '';
  opacity: 0;
  position: absolute;
  inset: -1px;
  background-color: currentColor;
  transition: opacity 0.2s;
}

.button:disabled {
  pointer-events: none;
}

.button:hover::before {
  opacity: var(--bg-base-opacity);
}

.button:active::before {
  opacity: calc(var(--bg-base-opacity) * 2);
  transition: none;
}

.button--active,
.button--invert {
  --color: var(--color-background);
  --background: var(--color-text);
  --border-color: var(--background);
  --bg-base-opacity:
    calc(
      var(--is-light-theme-on) * 0.16 +
      var(--is-dark-theme-on) * 0.1
    );
}

.button--round {
  border-radius: 2em;
}
