@use '@beeline/design-tokens/scss/tokens/themes' as *;
@use '@beeline/design-tokens/scss/tokens/components/fab' as *;
@use '@beeline/design-tokens/scss/tokens/components/button' as *;
@use '@beeline/design-tokens/scss/tokens/globals' as *;
@use '@beeline/design-tokens/scss/mixin';

@mixin fab_button {
  background-color: $button-overlay-background-color;
  padding-left: $button-only-text-small-padding-horizontal;
  padding-right: $button-only-text-small-padding-horizontal;
  letter-spacing: $button-small-text-font-letter-spacing;
  line-height: $button-small-text-font-line-height;
  font-size: $button-small-text-font-size;
  height: $button-small-height;
  color: $button-overlay-text-color;
  box-shadow: none;
  border: 1px solid $button-outline-border-color;
  border-radius: $button-border-radius;

  &:hover {
    cursor: pointer;
    background-color: $button-overlay-background-color-hover;
  }
}

.app-fab {
  height: $fab-standard-height;
  width: $fab-standard-width;
  position: fixed;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: $fab-standard-padding;
  letter-spacing: $fab-text-font-letter-spacing;
  line-height: $fab-text-font-line-height;
  font-size: $fab-text-font-size;
  font-weight: $fab-text-font-weight;
  box-shadow: $fab-shadow;
  background-color: $color-background-inverse;
  color: $color-text-active-inverse;
  cursor: pointer;

  &__icon {
    width: 24px;
    height: 24px;
  }

  &:hover {
    // background-color: $fab-hover-background-color;
  }

  &--focused {
    border-color: $fab-focused-border-color;
    border-width: $fab-focused-border-width;
  }

  &--mini {
    height: $fab-mini-height;
    width: $fab-mini-width;
    border-radius: $fab-mini-border-radius;
    padding: $fab-mini-padding;
  }

  &--extended {
    height: $fab-extended-height;
    border-radius: $fab-extended-border-radius;
    padding-right: $fab-extended-padding-right;
    padding-left: $fab-extended-padding-left;

    & &__icon {
      margin-right: $fab-extended-icon-spacing;
    }
  }

  .app-fab--extended.app-fab--mini {
    height: $fab-mini-height;
  }

  &--disabled {
    opacity: $fab-disabled-opacity;
  }
}

.app-fab-dialog {
  position: fixed;
  bottom: 44px;
  right: 0;
  // background-color: $color-background-medium;
  background-color: transparent;
  // border-radius: 12px;
  padding: 1rem;
  // border: 1px solid $color-border;
  // min-width: 300px;
  // box-shadow: $elevation-medium;

  .icon-contained {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: $color-status-neutral-background;
    color: $color-status-neutral;
    border-radius: 12px;
  }

  #feedback_button {
    @include fab_button();
  }

  #bug_button {
    @include fab_button();
    line-height: 38px;
  }

  a#bug_button,
  a#bug_button:visited,
  a#bug_button:active {
    color: $button-overlay-text-color !important;
  }
}
