@tailwind base;

body fuse-splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    color: #F9FAFB;
    z-index: 999999;
    pointer-events: none;
    visibility: visible;
    transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 0.5);
}

/* body fuse-splash-screen img {
    width: 120px;
    max-width: 120px;
} */

body fuse-splash-screen .spinner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* margin-top: 40px; */
    /* width: 56px; */
}

/* body fuse-splash-screen .spinner > div {
    width: 12px;
    height: 12px;
    background-color: #1E96F7;
    border-radius: 100%;
    display: inline-block;
    -webkit-animation: fuse-bouncedelay 1s infinite ease-in-out both;
    animation: fuse-bouncedelay 1s infinite ease-in-out both;
}

body fuse-splash-screen .spinner .bounce1 {
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

body fuse-splash-screen .spinner .bounce2 {
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

@-webkit-keyframes fuse-bouncedelay {
    0%, 80%, 100% {
        -webkit-transform: scale(0)
    }
    40% {
        -webkit-transform: scale(1.0)
    }
}

@keyframes fuse-bouncedelay {
    0%, 80%, 100% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    40% {
        -webkit-transform: scale(1.0);
        transform: scale(1.0);
    }
} */

body:not(.fuse-splash-screen-hidden) {
    overflow: hidden;
}

body.fuse-splash-screen-hidden fuse-splash-screen {
    visibility: hidden;
    opacity: 0;
}

@keyframes spinner {
  0% { transform: rotate(0) }
  100% { transform: rotate(360deg) }
}
.spinner div { box-sizing: border-box!important }
.spinner > div {
  position: absolute;
  width: 134px;
  height: 134px;
  top: 33px;
  left: 33px;
  border-radius: 50%;
  border: 6px solid #000;
  border-color: var(--fuse-primary) transparent var(--fuse-primary)  transparent;
  animation: spinner 2.2222222222222223s linear infinite;
}

.spinner > div:nth-child(2), .spinner > div:nth-child(4) {
  width: 118px;
  height: 118px;
  top: 41px;
  left: 41px;
  animation: spinner 2.2222222222222223s linear infinite reverse;
}
.spinner > div:nth-child(2) {
  border-color: transparent var(--fuse-accent) transparent var(--fuse-accent)
}
.spinner > div:nth-child(3) { border-color: transparent }
.spinner > div:nth-child(3) div {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
}
.spinner > div:nth-child(3) div:before, .spinner > div:nth-child(3) div:after { 
  content: "";
  display: block;
  position: absolute;
  width: 6px;
  height: 6px;
  top: -6px;
  left: 58px;
  background: var(--fuse-primary);
  border-radius: 50%;
  box-shadow: 0 128px 0 0 var(--fuse-primary);
}
.spinner > div:nth-child(3) div:after {
  left: -6px;
  top: 58px;
  box-shadow: 128px 0 0 0 var(--fuse-primary);
}

.spinner > div:nth-child(4) { border-color: transparent; }
.spinner > div:nth-child(4) div {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
}
.spinner > div:nth-child(4) div:before, .spinner > div:nth-child(4) div:after {
  content: "";
  display: block;
  position: absolute;
  width: 6px;
  height: 6px;
  top: -6px;
  left: 50px;
  background: var(--fuse-accent);
  border-radius: 50%;
  box-shadow: 0 112px 0 0 var(--fuse-accent);
}
.spinner > div:nth-child(4) div:after {
  left: -6px;
  top: 50px;
  box-shadow: 112px 0 0 0 var(--fuse-accent);
}
.spinner-double-ring {
  width: 200px;
  height: 200px;
  display: inline-block;
  overflow: hidden;
  background: #ffffff;
}
.spinner {
  width: 100%;
  height: 100%;
  position: relative;
  transform: translateZ(0) scale(1);
  backface-visibility: hidden;
  transform-origin: 0 0; /* see note above */
}
.spinner div { box-sizing: content-box; }
