.root {
  --base-bottom-pos: 5.3125rem;
  --translate-y: 4.5rem;

  pointer-events: none;

  position: absolute;
  z-index: var(--z-scroll-down-button);
  right: max(1rem, env(safe-area-inset-right));
  bottom: var(--base-bottom-pos);
  transform: translate(0, var(--translate-y));

  opacity: 0;

  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;

  .hidden {
    pointer-events: none;
    opacity: 0;
  }

  .reactions {
    transition: 0.2s ease opacity, 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) transform;
  }

  .transform-down {
    transform: translateY(3.5rem);
  }

  .unread {
    pointer-events: none;
  }

  :global(body.no-page-transitions) & {
    --translate-y: 0 !important;

    transition: opacity 0.15s;
  }

  &.revealed {
    --translate-y: 0;

    opacity: 1;

    .unread {
      pointer-events: auto;
    }

    &.no-composer.no-extra-shift {
      --translate-y: 4rem;
    }
  }

  &.hide-scroll-down {
    --translate-y: 3.5rem;

    .unread {
      pointer-events: none;
      opacity: 0;
    }
  }

  @media (max-width: 600px) {
    right: 0.5rem;
    bottom: 4.5rem;

    :global(body:not(.keyboard-visible)) & {
      bottom: calc(4.5rem + env(safe-area-inset-bottom));
    }
  }

  @media (max-width: 600px) {
    body.is-symbol-menu-open & {
      bottom: calc(var(--base-bottom-pos) + var(--symbol-menu-height));
    }
  }
}
