/*
 * https://github.com/morethanwords/tweb
 * Copyright (C) 2019-2021 Eduard Kuzmenko
 * https://github.com/morethanwords/tweb/blob/master/LICENSE
 */

$btn-menu-z-index: 4;

.btn,
.btn-icon {
  background: none;
	outline: none;
  border: none;
  cursor: pointer;

  body.animation-level-0 & {
    transition: none;
  }

  @include btn-hoverable();

  &:disabled {
    pointer-events: none !important;
    opacity: var(--disabled-opacity);
  }
}

.btn-icon {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50% !important;
  color: var(--secondary-text-color);
  background-color: transparent;
  border: none;
  padding: .5rem;
  position: relative;
  // overflow: hidden;
  transition: color .15s ease-in-out, opacity .15s ease-in-out/* , background-color .15s ease-in-out */;

  /* kostil */
  display: flex;
  align-items: center;
  justify-content: center;

  &.rp {
    overflow: hidden;
  }

  &.active {
    color: var(--primary-color);
  }
}

.btn-corner {
  --offset: 1.25rem;
  --translateY: calc(54px + var(--offset));
  position: absolute !important;
  bottom: var(--offset);
  inset-inline-end: var(--offset);
  //transition: .2s ease;
  transition: transform var(--btn-corner-transition) !important;
  transform: translate3d(0, var(--translateY), 0);
  z-index: 1;
  user-select: none;
  background-color: var(--primary-color);
  text-align: center;
  font-size: 1.5rem;
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  box-shadow: none !important;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;

  @include hover() {
    background-color: var(--dark-primary-color);
  }

  &.is-visible {
    --translateY: 0;
  }

  body.animation-level-0 & {
		transition: none !important;
  }

  &:disabled {
    opacity: 1 !important;
    pointer-events: all !important;
  }

  .preloader-circular {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.btn-menu {
  --transform-extra: translateX(0);
  --transform-origin-x: center;
  --transform-origin-y: center;
  position: absolute;
  z-index: $btn-menu-z-index;
  top: 100%;
  // transform: scale(.8) !important;
  font-size: 1rem;
  min-width: 11.25rem;
  // max-width: 16.25rem;
  -webkit-user-select: none; /* disable selection/Copy of UIWebView */
  -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
  width: max-content;
  transform-origin: var(--transform-origin-x) var(--transform-origin-y);

  &,
  &-items {
    box-shadow: var(--menu-box-shadow);
    padding: .3125rem 0;
    border-radius: $border-radius-medium;
  }

  &,
  &-transition {
    visibility: hidden;
    opacity: 0;
    transform: var(--transform-extra) scale(.8);
    transition: opacity var(--btn-menu-transition), transform var(--btn-menu-transition), visibility var(--btn-menu-transition);

    body.animation-level-0 & {
      transition: none;
    }
  }

  &-transition {
    transform-origin: inherit;
  }

  &,
  &-items,
  &-reactions-container/* ,
  &-reactions-bubble-big */ {
    background-color: var(--menu-background-color);
    backdrop-filter: var(--menu-backdrop-filter);
  }

  &.has-items-wrapper {
    opacity: 1 !important;
    transform: unset !important;
    transition: unset !important;
    visibility: visible !important;
    backdrop-filter: unset;
    background-color: unset;
    box-shadow: unset;
    padding: 0;
  }

  &-old,
  .is-mobile & {
    --menu-background-color: var(--surface-color);
    --menu-backdrop-filter: none;
    padding: .5rem 0;
    background-color: var(--surface-color);
    backdrop-filter: none;
    min-width: auto;

    .btn-menu-reactions-container {
      --menu-offset: calc((var(--height) + 1rem) * -1);
    }

    .btn-menu-item {
      --padding-left: 1rem;
      --padding-right: 2.5rem;
      --icon-margin: 1.5rem;
      --icon-size: 1.5rem;
      height: 3rem;
      line-height: var(--line-height-16);
      font-size: var(--font-size-16);
      border-radius: 0;
      margin: 0;
      font-weight: 400;
      transform: none !important;

      &-icon {
        color: var(--secondary-text-color);
        align-self: unset;
        margin-top: 0;
      }
    }

    .is-multiline,
    .is-secondary {
      min-width: auto;
      font-size: var(--font-size-14);
      line-height: var(--line-height-14);
      max-width: 15rem;
    }

    .btn-menu-footer {
      background-color: var(--background-color);
    }
  }

  &.active {
    &,
    .btn-menu-transition {
      visibility: visible;
      opacity: 1;
      transform: var(--transform-extra) scale3d(1, 1, 1); // * scale3d (NOT scale) will fix jumping text
    }
  }

  .is-mobile &.was-open {
    &,
    .btn-menu-transition {
      transform: var(--transform-extra) scale3d(1, 1, 1); // * scale3d (NOT scale) will fix jumping text
    }
  }

  /* &:not(.active) {
    &, .btn-menu-item {
      pointer-events: none !important;
    }
  } */

  &.bottom-left {
    --transform-origin-x: var(--transform-origin-inline-end);
    --transform-origin-y: top;
    inset-block: 100% auto;
    inset-inline: auto 0;
  }

  &.bottom-right {
    --transform-origin-x: var(--transform-origin-inline-start);
    --transform-origin-y: top;
    inset-block: 100% auto;
    inset-inline: 0 auto;
  }

  &.bottom-center {
    --transform-origin-x: center;
    --transform-origin-y: top;
    --transform-extra: translateX(calc(-50% + var(--parent-half-width)));
    inset-block: 100% auto;
    inset-inline: 0 auto;
  }

  &.top-left {
    --transform-origin-x: var(--transform-origin-inline-end);
    --transform-origin-y: bottom;
    inset-block: auto 100%;
    inset-inline: auto 0;
  }

  &.top-right {
    --transform-origin-x: var(--transform-origin-inline-start);
    --transform-origin-y: bottom;
    inset-block: auto 100%;
    inset-inline: 0 auto;
  }

  &.top-center {
    --transform-origin-x: center;
    --transform-origin-y: bottom;
  }

  &.center-left {
    --transform-origin-x: var(--transform-origin-inline-end);
    --transform-origin-y: center;
  }

  &.center-right {
    --transform-origin-x: var(--transform-origin-inline-start);
    --transform-origin-y: center;
  }

  &-item {
    --padding-vertical: .25rem;
    --padding-left: .75rem;
    --padding-right: .75rem;
    --icon-margin: 1.25rem;
    --icon-size: 1.25rem;
    display: flex;
    position: relative;
    padding-block: var(--padding-vertical);
    padding-inline: var(--padding-left) var(--padding-right);
    height: 2rem;
    cursor: pointer !important;
    pointer-events: all !important;
    color: var(--primary-text-color);
    text-transform: none;
    // white-space: nowrap;
    // overflow: hidden;
    // text-overflow: ellipsis;
    align-items: center;
    text-align: start;
    font-size: var(--font-size-14);
    line-height: var(--line-height-14);
    border-radius: .3125rem;
    margin-inline: .3125rem;
    font-weight: 500;
    transform: scale(1);

    &.a {
      .btn-menu-item-icon {
        font-family: "Roboto" !important;
        // font-weight: var(--font-weight-bold);
        width: var(--icon-size);
        text-align: center;
      }
    }

    @include animation-level(2) {
      transition: transform .1s var(--transition-standard-easing);
    }

    &.submenu-trigger {
      cursor: default !important;
      padding-right: 6px;
    }

    &:not(.submenu-trigger):not(.btn-menu-search):active {
      transform: scale(.96);
    }

    // background-blend-mode: overlay, normal;
    // @include hover() {
    //   background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), rgba(0, 0, 0, 0.05);
    // }

    @include hover-background-effect();

    &.danger {
      @include hover-background-effect(red);
    }

    &.btn-menu-search {
      @include hover-background-effect(transparent);
      cursor: default !important;
    }

    &-icon {
      --add: 0px;
      --total: calc(var(--icon-size) + var(--add));
      flex: 0 0 auto;
      width: var(--total);
      height: var(--total);
      margin-inline-end: calc(var(--icon-margin) - var(--add) / 2);
      margin-inline-start: calc(var(--add) / -2);
      color: currentColor;
      font-size: var(--icon-size);
      align-self: flex-start;
      margin-top: .125rem;
      padding: 0;
      position: relative;

      &-right {
        margin-inline: .25rem -.5rem;
        font-size: calc(var(--icon-size) - 2px);
        display: flex;
        align-items: center;
        justify-content: center;
      }

      &.is-external {
        --add: .25rem;
        margin-top: 0;
      }

      .media-photo {
        width: inherit;
        height: inherit;
      }
    }

    &-input {
      border: none;
      outline: none;
      padding: 0;
      background-color: transparent;
      font-size: var(--font-size-14);
      line-height: var(--line-height-16);

      &::placeholder {
        color: var(--secondary-text-color);
      }
    }

    @include respond-to(handhelds) {
      --padding-right: 1.875rem;
    }

    &-text {
      position: relative;
      flex: 1 1 auto;
      @include text-overflow();

      &,
      &-fake {
        // margin-top: 1px;
        pointer-events: none;
      }

      &-fake {
        --margin-left: calc(var(--icon-size) + var(--icon-margin));
        position: absolute;
        margin-inline-start: var(--margin-left);
        max-width: calc(100% - var(--margin-left) - var(--padding-left) - var(--padding-right));

        @include text-overflow();
      }
    }

    &-badge {
      text-transform: uppercase;
      border-radius: 4px;
      background-color: var(--primary-color);
      color: #fff;
      padding: .125rem .3125rem;
      flex: 0 0 auto;
      // margin-inline-end: .125rem;
      transform: scale(.75);
    }

    &-subtitle {
      font-size: .875rem;
      color: var(--secondary-text-color);
    }

    &-header {
      color: var(--secondary-text-color);
      height: 2rem;
      font-weight: var(--font-weight-bold);
      pointer-events: none !important;
    }

    &-loader {
      height: 8px;
      border-radius: 8px;
      width: 100px;
      background-color: var(--secondary-color);
      overflow: hidden;
      position: relative;
    }

    .stacked-avatars {
      --margin-right: -.6875rem;
      flex: 0 0 auto;
      inset-inline-end: .5rem;
      // margin-right: -1.5rem;
      // margin-left: 1rem;
      position: absolute;
      pointer-events: none;

      /* @include respond-to(handhelds) {
        margin-right: -.875rem;
      } */
    }

    &.is-multiline,
    &.is-secondary {
      height: auto !important;
      width: fit-content;
      min-width: calc(100% - .625rem);
      max-width: 16.25rem;

      .btn-menu-item-text {
        white-space: pre-wrap;
        width: fit-content;
        word-break: break-word;
      }
    }

    &.is-multiline:not(.is-secondary) .btn-menu-item-icon {
      align-self: unset;
      margin-top: unset;
    }

    &.is-secondary {
      // --icon-margin: .5rem;
      font-size: .75rem;
    }


    .submenu-label {
      display: flex;
      justify-content: space-between;
      align-items: center;

      gap: 16px;

      &-text {
        @include text-overflow();
        flex: 1 1 auto;
      }

      .tgico {
        font-size: 20px;
        transform: rotate(-90deg);
        color: var(--secondary-color);
      }
    }

    // &.is-smaller {
    //   --icon-margin: .5rem;
    //   font-size: .75rem;
    // }

    .checkbox-field-toggle {
      padding: 0;
    }

    &-avatar {
      // width: 1.5rem !important;
      // height: 1.5rem !important;
      // display: flex;
      // align-items: center;
      // justify-content: center;
      // position: relative;

      &.active:before {
        --offset: -3px;
        content: " ";
        position: absolute;
        top: var(--offset);
        right: var(--offset);
        bottom: var(--offset);
        left: var(--offset);
        border: 1.5px solid var(--primary-color);
        border-radius: inherit;
      }
    }
  }

  &-items {
    pointer-events: none;
    max-width: inherit;
  }

  &-items &-item {
    pointer-events: all;
  }

  /* &-overlay {
    position: fixed !important;
    left: -100vw;
    right: -100vw;
    top: -100vh;
    bottom: -100vh;
    z-index: 1;
    background-color: rgba(0, 0, 0, .2);
  } */
  &-overlay {
    position: fixed !important;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: $btn-menu-z-index;
    cursor: default;
    user-select: none;
    //background-color: rgba(0, 0, 0, .2);
  }

  /* &-toggle  */&-overlay {
    left: -100vw;
    right: -100vw;
    top: -100vh;
    bottom: -100vh;

    width: auto !important;
    max-width: none !important;
  }

  &.has-footer {
    padding-bottom: 0;
  }

  &-footer {
    height: 2rem;
    // background: var(--background-color-true);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    font-size: .875rem;
    color: #a2acb4;
    font-weight: 500;
    font-size: 12px;
    // cursor: default;

    /* &-text {
      margin-top: -.125rem;
    } */
  }

  hr {
    padding: 0;
    margin: .3125rem 0;
    display: block !important;

    margin-left: auto;
    margin-right: auto;
    opacity: .6;
  }

  html:not(.is-mobile) & .badge {
    background-color: transparent;
    color: var(--secondary-text-color);
  }

  &-reactions {
    $use-hover-scale: false;
    $standalone: false;
    $no-scrollable: true;
    max-width: 100%;
    max-height: 100%;
    height: inherit;
    border-radius: inherit;
    // background-color: var(--menu-background-color);
    // backdrop-filter: var(--menu-backdrop-filter);
    // filter: drop-shadow(0 .125rem .5rem rgba(0, 0, 0, .24));

    &-container/* ,
    &-bubble-big */ {
      filter: drop-shadow(0 .125rem .5rem rgba(0, 0, 0, .24));
    }

    @if $standalone {
      position: absolute;
      transform: scale(.8);
      transform-origin: bottom left;

      @include animation-level(2) {
        transition: opacity var(--transition-standard-in), transform var(--transition-standard-in);
      }

      &.is-visible {
        opacity: 1;
        transform: scale(1);
      }
    }

    &-container {
      --height: 2.5rem; // 3
      --bubble-side-offset: -2.5rem;
      --other-side-offset: -1rem;
      --menu-offset: calc((var(--height) + .5rem) * -1);
      // position: absolute;
      margin-top: var(--menu-offset);
      // margin-inline-start: var(--other-side-offset);
      // left: var(--bubble-side-offset);
      inset-inline-end: var(--bubble-side-offset);
      display: flex;
      // justify-content: flex-end;
      height: var(--height);
      z-index: 4;
      border-radius: var(--height);
      transform-origin: inherit;
      -webkit-transform-origin-x: inherit;
      -webkit-transform-origin-y: bottom;

      @if $standalone {
        --width: calc(var(--menu-width) + (var(--bubble-side-offset) + var(--other-side-offset)) * -1);
        width: var(--width);
        max-width: var(--width);
        position: fixed;
        justify-content: flex-start;

        .contextmenu.center-left + &,
        .contextmenu.bottom-left + & {
          .btn-menu-reactions {
            transform-origin: bottom right !important;
          }
        }

        .contextmenu.bottom-center + & {
          .btn-menu-reactions {
            transform-origin: bottom center !important;
          }
        }
      } @else {
        justify-content: center;
        position: absolute;
        min-width: 3.5rem;
        // max-width: calc(100% + (var(--bubble-side-offset) + var(--other-side-offset)) * -1);

        &:not(.is-visible) {
          opacity: 0 !important;
        }
      }

      &-tags {
        --height: 3.5rem;
        height: auto;
        min-height: var(--height);
        border-radius: 1rem;
        flex-direction: column;
        min-width: 290px;

        .btn-menu-reactions {
          height: 2.5rem;
        }

        .btn-menu-reactions-bubble {
          --height: 2.5rem;
        }
      }

      // &-vertical {
      //   // top: var(--other-side-offset);
      //   // left: calc((var(--height) + .5rem) * -1);
      //   width: var(--height);
      //   height: var(--width);
      //   max-width: var(--height);
      //   max-height: var(--width);
      //   flex-direction: column;
      //   margin-top: 0;
      //   margin-inline-start: var(--menu-offset);

      //   .btn-menu-reactions {
      //     width: inherit;
      //     height: auto;
      //     display: flex;
      //     flex-direction: column;
      //     transform-origin: top right;

      //     .inner-shadow {
      //       --inner-shadow-degree: 180deg;
      //     }
      //   }

      //   .btn-menu-reactions-reaction {
      //     --padding-vertical: var(--padding-base);
      //     --padding-horizontal: 0rem;
      //   }

      //   .btn-menu-reactions-bubble-big {
      //     right: calc(var(--size) / -2);
      //     bottom: var(--offset);
      //   }
      // }
    }

    &-description {
      --link-color: var(--primary-color);
      position: relative;
      font-size: 12px;
      color: var(--secondary-text-color);
      text-align: center;
      line-height: 14px;
      margin-top: .3125rem;
    }

    &-bubble {
      position: absolute;
      z-index: -1;
      background-color: inherit;

      /* &-small {
        width: .5rem;
        height: .5rem;
        right: .5rem;
        bottom: -1.25rem;
      } */

      &-big {
        --size: 1rem;
        --offset: calc(var(--height) / 2);
        width: var(--size);
        height: calc(var(--size) / 2);
        right: var(--offset);
        // left: var(--offset);
        bottom: calc(var(--size) / -2);
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0 0 1rem 1rem;
      }
    }

    @if $no-scrollable {
      $padding: .0625rem;
      display: flex;
      align-items: center;
      padding: 0 #{$padding};
    } @else {
      .scrollable {
        $padding: .0625rem;
        position: relative;
        display: flex;
        border-radius: inherit;

        &-x {
          align-items: center;
          padding: 0 #{$padding};
        }

        &-y {
          align-items: center;
          padding: #{$padding} 0;
          flex-direction: column;
        }
      }
    }

    &-reaction {
      --size: 1.75rem; // 2.25
      --padding-base: .25rem;
      --padding-vertical: 0rem;
      --padding-horizontal: var(--padding-base);
      width: calc(var(--size) + var(--padding-horizontal) * 2);
      height: calc(var(--size) + var(--padding-vertical) * 2);
      flex: 0 0 auto;
      padding: var(--padding-vertical) var(--padding-horizontal);
      cursor: pointer;

      &-scale {
        width: 100%;
        height: 100%;

        @if $use-hover-scale {
          html:not(.is-safari) & {
            transform: scale(1);
          }

          html:not(.is-safari) body.animation-level-2 & {
            transition: transform .1s linear;
          }
        }
      }

      @if $use-hover-scale {
        &-select {
          html.no-touch:not(.is-safari) & {
            transform: scale(1);

            &:hover,
            &:active {
              transform: scale(1.25);
            }
          }

          html.no-touch:not(.is-safari) body.animation-level-2 & {
            transition: transform var(--transition-standard-in);
          }
        }
      }

      .btn-menu-reactions-reaction-appear,
      .btn-menu-reactions-reaction-select {
        position: relative;
        width: 100%;
        height: 100%;
      }
    }

    &-more {
      color: var(--secondary-text-color);
      background-color: transparent;
      flex: 0 0 auto;
      width: 2rem;
      height: 2rem;
      padding: 0 .125rem;
      margin-inline-end: .25rem;
    }

    // * for mobiles
    .currency-star-icon {
      width: 100%;
      height: 100%;
      padding: .0625rem;
    }
  }

  &-select {
    padding-bottom: 0;

    &-text-faded {
      opacity: 0.3;
    }
  }

  &-search-delimiter {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.3125rem;
    margin-bottom: 0;
  }

  &-search-scrollable {
    position: relative;
    .scrollable {
      padding-block: 0.3125rem;
    }
  }
}

.btn-menu-item-with-auxiliary-text {
  display: flex;
  justify-content: space-between;
  align-items: center;

  min-width: 114px;
}

.btn-menu-item-auxiliary-text {
  font-weight: 400;
  opacity: 0.5;
}

.floating-button-menu-container {
  position: fixed;
  transition: .2s;

  z-index: 10;

  &--minimized#{&}--right-start {
    transform-origin: 0 0;
    transform: scale(0.5);
    opacity: 0;
  }
}

.btn-primary {
  border-radius: $border-radius-medium;
  width: 100%;
  text-align: center;
  height: 54px;
  border: none;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  padding: 0; // new
  transition: .2s opacity;

  @include hover() {
    transition: /* .2s background-color,  */.2s opacity;
    background: var(--dark-primary-color);
  }

  &-transparent {
    --ripple-color: var(--light-primary-color);
    color: var(--primary-color);
    background-color: transparent;

    @include hover() {
      background: var(--light-primary-color);
    }

    &.danger {
      @include hover-background-effect(red, false);
    }

    .preloader-circular .preloader-path {
      stroke: var(--primary-color);
    }
  }

  body.animation-level-0 & {
    transition: none;
  }

  > svg,
  use {
    height: calc(100% - 20px);
    inset-inline-end: 15px;
    left: auto;
  }

  &:disabled {
    pointer-events: none !important;
    opacity: var(--disabled-opacity);
  }
}

// ! example: multiselect input, button in pinned messages chat, settings, chat background tab
.btn-transparent {
  color: var(--primary-text-color);
  background-color: transparent;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 3rem;
  //width: auto;
  //text-transform: capitalize;
  font-weight: normal;
  line-height: var(--line-height); // * it centers the text

  @include respond-to(handhelds) {
    height: 3rem;
  }

  @include hover-background-effect();

  &.danger {
    @include hover-background-effect(red);
  }

  &.primary {
    @include hover-background-effect(primary);
  }

  // * tgico
  .button-icon {
    color: var(--secondary-text-color);
    font-size: 1.5rem;
    margin-inline-end: 2rem;

    @include respond-to(handhelds) {
      margin-inline-end: 1.5rem;
    }
  }

  &.btn-short .button-icon {
    margin-inline-end: 1rem;
  }
}

.btn-control {
  width: auto;
  height: 2.5rem;
  line-height: 2.5rem;
  align-items: center;
  padding-inline: 1.125rem;
  margin: .9375rem auto 1rem;
  border-radius: 1.25rem;
  display: flex;

  &-small {
    height: 1.875rem;
    padding-inline: .75rem;
    font-size: .9375rem;
    width: auto;
    margin: 0;
    border-radius: .9375rem;
    line-height: 1;
    font-weight: var(--font-weight-bold);

    @include animation-level(2) {
      transition: width 0.2s, background-color .2s, color .2s;
    }

    &.active {
      background-color: var(--light-primary-color) !important;
      color: var(--primary-color);
    }
  }

  .button-icon {
    font-size: 1.5rem;
    margin-inline-end: .375rem;
    margin-inline-start: -.375rem;
  }
}

.btn-primary.btn-circle {
  .preloader-circular {
    height: calc(100% - 20px);
    right: auto;
    left: auto;
    margin: 0;
    top: 10px;

    .preloader-path {
      stroke: #fff;
    }
  }
}

.btn-menu-toggle {
  position: relative;
  overflow: visible !important;
  font-weight: normal !important;
  cursor: pointer !important;
  pointer-events: all !important;

  &:not(.btn-primary):not(.btn-corner).menu-open {
    background-color: var(--light-secondary-text-color);
  }

  .btn-menu {
    margin-top: .5rem;
  }
}

.btn-circle {
  --size: 54px;
  border-radius: 50%;
  height: var(--size);
  width: var(--size);
  line-height: var(--size);

  @include respond-to(handhelds) {
    --size: 46px;
  }
}

.btn-disabled {
  pointer-events: none !important;
  cursor: default !important;
  color: var(--secondary-text-color) !important;

  .button-icon {
    color: inherit !important;
  }
}

.btn-secondary {
  margin-top: -1rem !important;
}

.btn-color-primary {
  background: var(--primary-color);
  color: #fff;

  /* .c-ripple__circle {
    background-color: var(--light-primary-color);
  } */
}

.call-button {
  width: var(--call-button-size);
  height: var(--call-button-size);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  position: relative;
  border-radius: 50%;
  backdrop-filter: blur(25px);

  &-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: var(--call-button-size);

    &.disabled {
      pointer-events: none;

      .call-button { // ! fix backdrop-filter transition
        pointer-events: none;

        &,
        &-text {
          opacity: .8;
        }
      }
    }
  }

  &-text {
    white-space: nowrap;
    font-size: .875rem;
    margin-top: .25rem;

    @include animation-level(2) {
      transition: opacity var(--transition-standard-in);
    }
  }

  @include animation-level(2) {
    transition: background-color var(--transition-standard-in), opacity var(--transition-standard-in);
  }

  & + &,
  &-container + &-container {
    margin-inline-start: var(--call-button-margin);
  }
}

// .btn-update {
//   position: absolute;
//   right: 0;
//   bottom: 0;
//   left: 0;
//   height: 2.5rem;
//   line-height: 2.5rem;
//   text-align: center;
//   color: #fff;

//   &-weave {
//     position: absolute;
//     top: 0;
//     right: 0;
//     bottom: -2.5rem;
//     left: 0;
//     z-index: -1;
//     transform: scale(1, -1);

//     &-canvas {
//       width: 100%;
//       height: 100%;
//     }
//   }
// }

.btn-update {
  width: auto;
  padding: 0 2rem !important;
  border-radius: var(--size);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  /* margin-right: calc(var(--size) + 0.5rem); */
  /* left: var(--offset); */
  inset-inline-end: auto !important;
}

.btn-large {
  height: 3.375rem;
  font-size: 1rem;

  text-transform: uppercase;
  font-weight: 600;
}
