@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .tooltip {
    @apply invisible absolute;
  }

  .has-tooltip:hover .tooltip {
    @apply visible z-50;
  }

  @keyframes spinner {
    to {
      transform: rotate(360deg);
    }
  }

  .base-spinner {
    position: relative;
    overflow: hidden;
  }

  .base-spinner:before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    background-color: inherit;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    top: 0;
    left: 0;
  }

  .base-spinner:after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: inherit;
    animation: spinner 0.6s linear infinite;
    z-index: 2;
  }

  .loader {
    border-top-color: #5a67d8;
    -webkit-animation: spinner 1.5s linear infinite;
    animation: spinner 1.5s linear infinite;
  }

  @-webkit-keyframes spinner {
    0% {
      -webkit-transform: rotate(0deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
    }
  }

  @keyframes spinner {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
}
