@import "../../constants/_variables.scss";

button {
  -webkit-appearance: button;
  -webkit-writing-mode: horizontal-tb !important;
  text-rendering: auto;
  color: buttontext;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  display: inline-block;
  text-align: center;
  align-items: flex-start;
  cursor: default;
  background-color: buttonface;
  box-sizing: border-box;
  margin: 0em;
  font: 400 11px system-ui;
  padding: 1px 7px 2px;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(216, 216, 216) rgb(209, 209, 209) rgb(186, 186, 186);
  border-image: initial;

  &:focus {
    outline: none;
  }
}

.efe-button {
  font-size: 0.813rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  padding: 0.375rem 0.75rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out,
    -webkit-box-shadow 0.15s ease-in-out;

  & + button {
    margin-left: var(--size-gutter);
  }

  &.color-white {
    color: blue;
  }

  &:active:hover {
    filter: brightness(80%);
  }
}

.btn-primary {
  background-color: $primary !important;
  border-color: $primary !important;
  color: $white;

  &:hover {
    color: $white;
    background-color: $primary-color-hover !important;
    box-shadow: 0 8px 25px -8px $primary;
    border-color: $primary !important;
  }
}

.btn-success {
  background-color: $success !important;
  border-color: $success !important;
  color: $white;

  &:hover {
    background: $success;
    box-shadow: 0 8px 25px -8px $success;
    border-color: $success;
  }
}

.btn-danger {
  background-color: $danger;
  border-color: $danger;
  color: $white;

  &:hover {
    background: $danger;
    box-shadow: 0 8px 25px -8px $danger;
    border-color: $danger;
  }
}

.btn-warning {
  background-color: $warning;
  border-color: $warning;
  color: $black;

  &:hover {
    background: $warning;
    box-shadow: 0 8px 25px -8px $warning;
    border-color: $warning;
    color: $black;
  }
}

.btn-info {
  background-color: $info;
  border-color: $info;
  color: $white;

  &:hover {
    background: $info;
    box-shadow: 0 8px 25px -8px $info;
    border-color: $info;
  }
}

.btn-light {
  background-color: $light;
  border-color: $light;
  color: $white;

  &:hover {
    background: $light;
    box-shadow: 0 8px 25px -8px $light;
    border-color: $light;
  }
}

.btn-dark {
  background-color: $dark;
  border-color: $dark;
  color: $white;

  &:hover {
    background: $dark;
    box-shadow: 0 8px 25px -8px $dark;
    border-color: $dark;
  }
}

.btn-outline-primary {
  border-color: $primary !important;
  color: $primary !important;
  background-color: transparent;

  &:hover {
    background-color: $primary !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $primary !important;
  }
}

.btn-outline-success {
  border-color: $success !important;
  color: $success !important;
  background-color: transparent;

  &:hover {
    background-color: $success !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $success !important;
  }
}

.btn-outline-danger {
  border-color: $danger !important;
  color: $danger !important;
  background-color: transparent;

  &:hover {
    background-color: $danger !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $danger !important;
  }
}

.btn-outline-warning {
  border-color: $warning !important;
  color: $warning !important;
  background-color: transparent;

  &:hover {
    background-color: $warning !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $warning !important;
  }
}

.btn-outline-info {
  border-color: $info !important;
  color: $info !important;
  background-color: transparent;

  &:hover {
    background-color: $info !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $info !important;
  }
}

.btn-outline-light {
  border-color: $light !important;
  color: $light !important;
  background-color: transparent;

  &:hover {
    background-color: $light !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $light !important;
  }
}

.btn-outline-dark {
  border-color: $dark !important;
  color: $dark !important;
  background-color: transparent;

  &:hover {
    background-color: $dark !important;
    color: $white !important;
    box-shadow: 0 8px 25px -8px $dark !important;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);

  &:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
  }

  &:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
  }
}

.efe-rounded-button {
  border-radius: 20px !important;
}
