/*
Copyright 2023 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.bg {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(3, 12, 27, 0.528);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bg.animate[data-state="open"] {
  animation: fade-in 200ms;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.bg.animate[data-state="closed"] {
  animation: fade-out 130ms;
}

.overlay {
  position: fixed;
  z-index: 101;
}

.overlay.animate {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(80%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(100%);
  }
}

@keyframes zoom-out {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(100%);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(80%);
  }
}

.overlay.animate[data-state="open"] {
  animation: zoom-in 200ms;
}

.overlay.animate[data-state="closed"] {
  animation: zoom-out 130ms;
}

@media (prefers-reduced-motion) {
  .overlay.animate[data-state="open"] {
    animation-name: fade-in;
  }

  .overlay.animate[data-state="closed"] {
    animation-name: fade-out;
  }
}
