/* Pabill-e site loader — shopping bag logo animation */
.pabill-site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.pabill-site-loader--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pabill-site-loader--leaving {
  opacity: 0;
  visibility: hidden;
}

.pabill-loader-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
}

.pabill-loader-bag-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pabill-loader-bag-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 0, 0, 0.14) 0%, rgba(245, 0, 0, 0) 70%);
  animation: pabill-loader-pulse-ring 1.4s ease-in-out infinite;
}

.pabill-loader-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  animation: pabill-loader-hop 1.1s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
  filter: drop-shadow(0 10px 22px rgba(245, 0, 0, 0.28));
  will-change: transform;
}

.pabill-loader-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 10px;
}

.pabill-loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f50000;
  opacity: 0.35;
  animation: pabill-loader-dot 1.1s ease-in-out infinite;
}

.pabill-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.pabill-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

.pabill-loader-text {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #003049;
  letter-spacing: 0.02em;
}

@keyframes pabill-loader-hop {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  18% {
    transform: translateY(-16px) scale(1.04) rotate(-4deg);
  }
  36% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  52% {
    transform: translateY(-9px) scale(1.02) rotate(3deg);
  }
  68% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes pabill-loader-pulse-ring {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes pabill-loader-dot {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0) scale(1);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px) scale(1.15);
  }
}

/* In-card panel loader (orders list, customers, etc.) */
.pabill-panel-loader-host {
  position: relative;
  min-height: 200px;
}

.pabill-panel-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: inherit;
  pointer-events: none;
}

.pabill-panel-loader-host > .order-empty-msg {
  visibility: hidden;
}

.pabill-loader-stage--compact .pabill-loader-bag-wrap {
  width: 72px;
  height: 72px;
}

.pabill-loader-stage--compact .pabill-loader-logo {
  width: 56px;
  height: 56px;
}

html.pabill-page-loading,
html.pabill-page-loading body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .pabill-loader-logo,
  .pabill-loader-bag-wrap::before,
  .pabill-loader-dots span {
    animation: none;
  }

  .pabill-loader-logo {
    opacity: 0.9;
  }
}
