/* Chocola Studio — splash & async loaders */

.chocola-preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.chocola-preloader-overlay--async {
  z-index: 999999;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chocola-preloader-overlay--process {
  z-index: 9999;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.chocola-preloader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
}

.chocola-preloader__stage {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chocola-preloader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #000;
  border-right-color: rgba(0, 0, 0, 0.12);
  animation: chocola-preloader-spin 1.1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.chocola-preloader__ring--inner {
  inset: 0.55rem;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.55);
  border-left-color: rgba(0, 0, 0, 0.08);
  animation-direction: reverse;
  animation-duration: 0.85s;
}

.chocola-preloader__logo {
  position: relative;
  z-index: 1;
  width: 3.75rem;
  height: 3.75rem;
  object-fit: contain;
  animation: chocola-preloader-breathe 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.08));
}

.chocola-preloader__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 0.5rem;
}

.chocola-preloader__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #000;
  opacity: 0.25;
  animation: chocola-preloader-dot 1.2s ease-in-out infinite;
}

.chocola-preloader__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chocola-preloader__dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chocola-preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes chocola-preloader-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.88;
  }
}

@keyframes chocola-preloader-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.25;
  }
  40% {
    transform: translateY(-0.35rem);
    opacity: 1;
  }
}
