@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

:root {
  --top-alert-show: 10vh;
  --top-alert-hide: -100px;
}

.flex {
  display: flex;
  position: relative;
}

.hidden {
  display: none;
}

/* .alert2 is deprecated, use .custome-alert (see below) */

.alert2 {
  display: none;
  min-height: 50px;
  width: 400px;
  top: var(--top-alert-hide);
  left: calc(50% - 200px);
  text-align: center;
  font-family: 'Roboto';
  font-weight: 400;
  font-size: 1.25rem;
  color: #2b2e36;
  background: #b3f1b6;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 1px 1px 6px 1px #b4b5b7;
  position: fixed;
  z-index: 999999 !important;
}

.alert2.error {
  color: #712320;
  background: #ffdddc;
}

.alert2.warn {
  color: #664d03;
  background-color: #fff3cd;
}

.alert2.show {
  display: block;
  animation: slide 4s ease-in;
}

.custom-alert {
  display: grid;
  align-content: center;
  min-height: 50px;
  min-width: 500px;
  max-width: 75vw;
  padding: .5rem 1rem;
  top: var(--top-alert-show);
  /* left: calc(50% - 250px); -- will be calculated dynamically with JS */
  text-align: center;
  font-family: 'Roboto';
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 1px 1px 3px 1px #b4b5b7ad;
  position: fixed;
  z-index: 999999 !important;
}

.custom-alert.info {
  color: #2b2e36;
  background: #b3daf1;
}

.custom-alert.success {
  color: #2b2e36;
  background: #b3f1b6;
}

.custom-alert.error {
  color: #712320;
  background: #ffdddc;
}

.custom-alert.warning {
  color: #291e00;
  background-color: #ffe697;
}

.fade-out {
  animation: fade-out .5s ease-in;
}

._debug-show {
  top: var(--top-alert-show);
}

.slide-in {
  animation: slide-in .4s ease-in;
}

.slide-out {
  animation: slide-out .3s ease-out;
}

@keyframes slide-in {
  0% {
    top: var(--top-alert-hide);
  }
  100% {
    top: var(--top-alert-show);
  }
}

@keyframes slide-out {
  0% {
    top: var(--top-alert-show);
  }
  100% {
    top: var(--top-alert-hide);
  }
}

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

    100% {
        opacity: 0;
    }
}

@keyframes slide {
  0% {
    top: var(--top-alert-hide);
  }

  10% {
    top: var(--top-alert-show);
  }

  95% {
    top: var(--top-alert-show);
  }

  100% {
    top: var(--top-alert-hide);
  }
}
