/* ============================================================
   Physio Painter Preloader — preloader.css
   ============================================================ */

/* ── Reset & Base ── */
#ppp-preloader *,
#ppp-preloader *::before,
#ppp-preloader *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Overlay ── */
#ppp-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* bg set via JS from config, fallback white */
  background: #ffffff;
  opacity: 1;
  transition-property: opacity, visibility;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

#ppp-preloader.ppp-hiding {
  opacity: 0;
  visibility: hidden;
}

#ppp-preloader.ppp-hidden {
  display: none !important;
}

/* ── Animated Background Blobs ── */
.ppp-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ppp-bg::before,
.ppp-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: ppp-blob-drift 6s ease-in-out infinite alternate;
}

.ppp-bg::before {
  width: 60vw;
  height: 60vw;
  top: -20%;
  left: -20%;
  background: #F4A623;
  animation-delay: 0s;
}

.ppp-bg::after {
  width: 50vw;
  height: 50vw;
  bottom: -15%;
  right: -15%;
  background: #e85d04;
  animation-delay: -3s;
}

@keyframes ppp-blob-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(4%, 4%) scale(1.08); }
}

/* ── Content Wrapper ── */
.ppp-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Paint Splash Rings ── */
.ppp-rings {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  pointer-events: none;
}

.ppp-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #F4A623;
  opacity: 0;
  animation: ppp-ring-pulse 2.4s ease-out infinite;
}

.ppp-ring-1 { animation-delay: 0s; }
.ppp-ring-2 { animation-delay: 0.8s; }
.ppp-ring-3 { animation-delay: 1.6s; }

@keyframes ppp-ring-pulse {
  0%   { transform: scale(0.5); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Logo ── */
.ppp-logo-wrap {
  position: relative;
  margin-bottom: 28px;
  animation: ppp-logo-enter 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ppp-logo-enter {
  0%   { opacity: 0; transform: scale(0.6) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.ppp-logo {
  display: block;
  width: 180px;
  height: auto;
  animation: ppp-logo-float 3s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(244, 166, 35, 0.25));
}

@keyframes ppp-logo-float {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-8px); }
}

/* ── Dot Loader ── */
.ppp-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  animation: ppp-fade-in 0.6s 0.4s ease both;
}

@keyframes ppp-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ppp-dots span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #F4A623;
  animation: ppp-dot-bounce 1.3s ease-in-out infinite;
}

.ppp-dots span:nth-child(1) { animation-delay: 0s; }
.ppp-dots span:nth-child(2) { animation-delay: 0.13s; }
.ppp-dots span:nth-child(3) { animation-delay: 0.26s; }
.ppp-dots span:nth-child(4) { animation-delay: 0.39s; }
.ppp-dots span:nth-child(5) { animation-delay: 0.52s; }

@keyframes ppp-dot-bounce {
  0%, 60%, 100% { transform: translateY(0) scale(0.8); opacity: 0.4; }
  30%            { transform: translateY(-12px) scale(1); opacity: 1; }
}

/* ── Progress Bar ── */
.ppp-progress-wrap {
  width: 160px;
  height: 3px;
  background: rgba(244, 166, 35, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
  animation: ppp-fade-in 0.6s 0.5s ease both;
}

.ppp-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F4A623, #e85d04);
  border-radius: 99px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(244, 166, 35, 0.6);
}

/* ── Tagline ── */
.ppp-tagline {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #888;
  text-align: center;
  animation: ppp-fade-in 0.6s 0.7s ease both;
  max-width: 260px;
  line-height: 1.5;
}

/* ── Paint drip decoration ── */
.ppp-content::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(244,166,35,0.3));
  border-radius: 0 0 4px 4px;
  animation: ppp-drip 2s ease-in-out infinite alternate;
}

@keyframes ppp-drip {
  from { height: 40px; opacity: 0.3; }
  to   { height: 60px; opacity: 0.6; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .ppp-logo { width: 140px; }
  .ppp-progress-wrap { width: 120px; }
  .ppp-tagline { font-size: 13px; }
}
