/**
 * Loaders.css - Pure CSS Loading Animations
 * A standalone rewrite based on the original Loaders.css library.
 * Version: 2.0.0
 */

/* Base Loader Container */
.loader {
  box-sizing: border-box;
  display: inline-block;
}

/* =============================================
   1. Ball Pulse (3 dots scaling)
   ============================================= */
.ball-pulse {
  position: relative;
  width: 58px;
  height: 20px;
}
.ball-pulse > div {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 100%;
  background-color: currentColor;
  top: 2px;
  animation: ball-pulse 1.2s ease-in-out infinite;
}
.ball-pulse > div:nth-child(1) { left: 0; }
.ball-pulse > div:nth-child(2) { left: 21px; animation-delay: -0.4s; }
.ball-pulse > div:nth-child(3) { left: 42px; animation-delay: -0.2s; }

@keyframes ball-pulse {
  0%, 100% { transform: scale(0); opacity: 0.5; }
  50% { transform: scale(1); opacity: 1; }
}

/* =============================================
   2. Ball Spin Fade (8 particles rotating)
   ============================================= */
.ball-spin-fade {
  position: relative;
  width: 50px;
  height: 50px;
}
.ball-spin-fade > div {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background-color: currentColor;
  top: 21px;
  left: 21px;
  animation: ball-spin-fade 1.2s linear infinite;
}
.ball-spin-fade > div:nth-child(1) { transform: rotate(0deg) translate(0, -18px); animation-delay: 0s; }
.ball-spin-fade > div:nth-child(2) { transform: rotate(45deg) translate(0, -18px); animation-delay: -0.15s; }
.ball-spin-fade > div:nth-child(3) { transform: rotate(90deg) translate(0, -18px); animation-delay: -0.3s; }
.ball-spin-fade > div:nth-child(4) { transform: rotate(135deg) translate(0, -18px); animation-delay: -0.45s; }
.ball-spin-fade > div:nth-child(5) { transform: rotate(180deg) translate(0, -18px); animation-delay: -0.6s; }
.ball-spin-fade > div:nth-child(6) { transform: rotate(225deg) translate(0, -18px); animation-delay: -0.75s; }
.ball-spin-fade > div:nth-child(7) { transform: rotate(270deg) translate(0, -18px); animation-delay: -0.9s; }
.ball-spin-fade > div:nth-child(8) { transform: rotate(315deg) translate(0, -18px); animation-delay: -1.05s; }

@keyframes ball-spin-fade {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* =============================================
   3. Ball Grid Beat (9 dots grid)
   ============================================= */
.ball-grid-beat {
  position: relative;
  width: 57px;
  height: 57px;
}
.ball-grid-beat > div {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 100%;
  background-color: currentColor;
  animation: ball-grid-beat 1.5s ease-in-out infinite;
}
.ball-grid-beat > div:nth-child(1) { top: 0; left: 0; animation-delay: 0s; }
.ball-grid-beat > div:nth-child(2) { top: 0; left: 21px; animation-delay: 0.2s; }
.ball-grid-beat > div:nth-child(3) { top: 0; left: 42px; animation-delay: 0.4s; }
.ball-grid-beat > div:nth-child(4) { top: 21px; left: 0; animation-delay: 0.6s; }
.ball-grid-beat > div:nth-child(5) { top: 21px; left: 21px; animation-delay: 0.8s; }
.ball-grid-beat > div:nth-child(6) { top: 21px; left: 42px; animation-delay: 1.0s; }
.ball-grid-beat > div:nth-child(7) { top: 42px; left: 0; animation-delay: 1.2s; }
.ball-grid-beat > div:nth-child(8) { top: 42px; left: 21px; animation-delay: 1.4s; }
.ball-grid-beat > div:nth-child(9) { top: 42px; left: 42px; animation-delay: 1.6s; }

@keyframes ball-grid-beat {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1); }
}

/* =============================================
   4. Square Spin (Single square rotating)
   ============================================= */
.square-spin {
  position: relative;
  width: 40px;
  height: 40px;
  background-color: currentColor;
  animation: square-spin 1.5s infinite ease-in-out;
}

@keyframes square-spin {
  0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg); }
  25% { transform: perspective(120px) rotateX(-180deg) rotateY(0deg); }
  50% { transform: perspective(120px) rotateX(-180deg) rotateY(-180deg); }
  75% { transform: perspective(120px) rotateX(0deg) rotateY(-180deg); }
  100% { transform: perspective(120px) rotateX(0deg) rotateY(-360deg); }
}

/* =============================================
   5. Cube Transition (Two squares flipping)
   ============================================= */
.cube-transition {
  position: relative;
  width: 40px;
  height: 40px;
}
.cube-transition > div {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  top: 10px;
  left: 10px;
  animation: cube-transition 1.8s infinite ease-in-out;
}
.cube-transition > div:last-child {
  animation-delay: -0.9s;
}

@keyframes cube-transition {
  25% { transform: translateX(20px) rotate(-90deg) scale(0.5); }
  50% { transform: translateX(20px) translateY(20px) rotate(-180deg); }
  75% { transform: translateX(0) translateY(20px) rotate(-270deg) scale(0.5); }
  100% { transform: rotate(-360deg); }
}

/* =============================================
   6. Ball Scale (Single ball pulsing)
   ============================================= */
.ball-scale {
  position: relative;
  width: 40px;
  height: 40px;
}
.ball-scale > div {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  background-color: currentColor;
  animation: ball-scale 1s infinite ease-in-out;
}

@keyframes ball-scale {
  0%, 100% { transform: scale(0); opacity: 0.3; }
  50% { transform: scale(1); opacity: 1; }
}

/* =============================================
   7. Line Scale (5 bars waving)
   ============================================= */
.line-scale {
  position: relative;
  width: 60px;
  height: 40px;
}
.line-scale > div {
  position: absolute;
  width: 4px;
  height: 35px;
  background-color: currentColor;
  border-radius: 2px;
  top: 2px;
  animation: line-scale 1.2s infinite ease-in-out;
}
.line-scale > div:nth-child(1) { left: 0; animation-delay: -1.1s; }
.line-scale > div:nth-child(2) { left: 10px; animation-delay: -1.0s; }
.line-scale > div:nth-child(3) { left: 20px; animation-delay: -0.9s; }
.line-scale > div:nth-child(4) { left: 30px; animation-delay: -0.8s; }
.line-scale > div:nth-child(5) { left: 40px; animation-delay: -0.7s; }
.line-scale > div:nth-child(6) { left: 50px; animation-delay: -0.6s; }

@keyframes line-scale {
  0%, 40%, 100% { transform: scaleY(0.4); }
  20% { transform: scaleY(1); }
}

/* =============================================
   8. Ball Clip Rotate (Circular spinner)
   ============================================= */
.ball-clip-rotate {
  position: relative;
  width: 40px;
  height: 40px;
}
.ball-clip-rotate > div {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  border: 3px solid currentColor;
  border-bottom-color: transparent;
  background: transparent;
  animation: ball-clip-rotate 1s linear infinite;
}

@keyframes ball-clip-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================
   9. Ball Triangle Path (Three dots orbiting)
   ============================================= */
.ball-triangle-path {
  position: relative;
  width: 60px;
  height: 60px;
}
.ball-triangle-path > div {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 100%;
  background-color: currentColor;
  top: 24px;
  left: 24px;
  animation: ball-triangle-path 2s ease-in-out infinite;
}
.ball-triangle-path > div:nth-child(1) { animation-delay: 0s; }
.ball-triangle-path > div:nth-child(2) { animation-delay: -0.66s; }
.ball-triangle-path > div:nth-child(3) { animation-delay: -1.33s; }

@keyframes ball-triangle-path {
  33% { transform: translate(20px, -35px); }
  66% { transform: translate(-20px, -35px); }
  100% { transform: translate(0, 0); }
}

/* =============================================
   10. Semi Circle Spin (Two arcs rotating)
   ============================================= */
.semi-circle-spin {
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
}
.semi-circle-spin > div {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 100%;
  border: 4px solid transparent;
  border-top-color: currentColor;
  top: 0;
  left: 0;
  animation: semi-circle-spin 1.5s infinite linear;
}
.semi-circle-spin > div:last-child {
  width: 24px;
  height: 24px;
  top: 8px;
  left: 8px;
  border-top-color: currentColor;
  opacity: 0.6;
  animation-duration: 1s;
  animation-direction: reverse;
}

@keyframes semi-circle-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}