/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

:global(.theme-code-block:hover) .copyButtonCopied {
  opacity: 1 !important;
}

.copyButtonIcons {
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
}

.copyButtonError {
  width: 1rem;
  height: 1rem;
}

.copyButtonIcon,
.copyButtonSuccessIcon,
.copyButtonErrorIcon {
  position: absolute;
  top: 0;
  left: 0;
  fill: currentColor;
  opacity: inherit;
  width: inherit;
  height: inherit;
  transition: all var(--ifm-transition-fast) ease;
}

.copyButtonSuccessIcon {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.33);
  opacity: 0;
  color: #00d600;
}

.copyButtonErrorIcon {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.33);
  opacity: 0;
  color: #d53035;
}

.copyButtonCopied .copyButtonIcon,
.copyButtonCopied .copyButtonErrorIcon {
  transform: scale(0.33);
  opacity: 0;
}

.copyButtonCopied .copyButtonSuccessIcon {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition-delay: 0.075s;
}

.copyButtonError .copyButtonIcon,
.copyButtonError .copyButtonSuccessIcon {
  transform: scale(0.33);
  opacity: 0;
}

.copyButtonError .copyButtonErrorIcon {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition-delay: 0.075s;
}
