button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  background-color: rgb(var(--button-background));
  padding: 0.25em 1.25em;
  margin: 0;
  color: rgb(var(--button-text));
  font-size: 1em;
  font-family: var(--theme-font-ui-name);
  font-weight: var(--theme-font-ui-weight);
  font-style: var(--theme-font-ui-style);
  min-height: 2.5em;
  line-height: 1;
  border: 0;
  border-radius: var(--theme-radius);
  position: relative;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  transition: background-color var(--layout-transition-extra-fast), border-color var(--layout-transition-extra-fast), color var(--layout-transition-extra-fast);
}

button:focus,
button:hover,
.button:focus,
.button:hover,
input[type="button"]:focus,
input[type="button"]:hover,
input[type="reset"]:focus,
input[type="reset"]:hover,
input[type="submit"]:focus,
input[type="submit"]:hover {
  background-color: rgb(var(--button-background-focus-hover));
  color: rgb(var(--button-text-focus-hover));
  outline: none;
  text-decoration: none;
}

button:active,
.button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active {
  background-color: rgb(var(--button-background-active));
  color: rgb(var(--button-text-active));
  outline: none;
  text-decoration: none;
  transition: none;
}

button.active,
.button.active {
  color: rgb(var(--button-text-focus-active));
}

button.disabled,
button.disabled:hover,
button.disabled:focus,
button.disabled:active,
.button.disabled,
.button.disabled:hover,
.button.disabled:focus,
.button.disabled:active,
button:disabled,
button:disabled:hover,
button:disabled:focus,
button:disabled:active,
.button:disabled,
.button:disabled:hover,
.button:disabled:focus,
.button:disabled:active {
  background-color: rgb(var(--button-background-disabled));
  color: rgb(var(--button-text-disabled));
  cursor: default;
  text-decoration: none;
}

.button-line:after {
  content: "";
  background: transparent;
  border-radius: var(--theme-radius);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 calc(100% - var(--layout-line-width)), 100% calc(100% - var(--layout-line-width)), 100% 100%, 0% 100%);
  transition: background-color var(--layout-transition-extra-fast);
  pointer-events: none;
}

.button-line:focus:after,
.button-line:hover:after {
  background-color: rgb(var(--button-border-focus-hover));
}

.button-line:active:after,
.button-line.active:after {
  background-color: rgb(var(--button-border-active));
  transition: none;
}

.button-line.disabled:after,
.button-line.disabled:hover:after,
.button-line.disabled:focus:after,
.button-line.disabled:active:after,
.button-line:disabled:after,
.button-line:disabled:hover:after,
.button-line:disabled:focus:after,
.button-line:disabled:active:after {
  background-color: rgb(var(--button-border-disabled));
}

.button-ring {
  transition: background-color var(--layout-transition-extra-fast), border-color var(--layout-transition-extra-fast), color var(--layout-transition-extra-fast), box-shadow var(--layout-transition-extra-fast);
}

.button-ring:focus,
.button-ring:hover {
  box-shadow: var(--form-ring-hover);
}

.button-ring:active,
.button-ring.active {
  box-shadow: var(--form-ring-accent);
}

.button-ring.disabled,
.button-ring:disabled,
.button-ring.disabled:focus,
.button-ring:disabled:focus,
.button-ring.disabled:hover,
.button-ring:disabled:hover,
.button-ring.disabled:active,
.button-ring:disabled:active {
  box-shadow: none;
}

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

button [class^="icon-"],
button [class*=" icon-"],
.button [class^="icon-"],
.button [class*=" icon-"] {
  line-height: 1;
  font-size: 1.5em;
}

.button-small {
  font-size: 0.8em;
}

.button-large {
  font-size: 1.2em;
}

.button-block {
  display: flex;
  width: 100%;
}

button [class^="button-"],
button [class*=" button-"],
.button [class^="button-"],
.button [class*=" button-"] {
  margin-left: 0.25em;
  margin-right: 0.25em;
}

button [class^="button-"]:first-child,
button [class*=" button-"]:first-child,
.button [class^="button-"]:first-child,
.button [class*=" button-"]:first-child {
  margin-left: 0;
}

button [class^="button-"]:last-child,
button [class*=" button-"]:last-child,
.button [class^="button-"]:last-child,
.button [class*=" button-"]:last-child {
  margin-right: 0;
}

.button-link {
  background-color: transparent;
  border: 0;
  color: rgb(var(--button-link-text));
}

.button-link:hover,
.button-link:focus {
  background-color: transparent;
  color: rgb(var(--button-link-text-focus-hover));
}

.button-link:active {
  background-color: transparent;
  color: rgb(var(--button-link-text-active));
}

.button-link.disabled,
.button-link:disabled {
  background-color: transparent;
  color: transparent;
  pointer-events: none;
}

.button-link.disabled:hover,
.button-link.disabled:focus,
.button-link:hover:disabled,
.button-link:focus:disabled {
  background-color: transparent;
  color: transparent;
}
