/* ==========================================================================
   Woozchat - Profile Preload Loader
   Overlay bonito exibido enquanto o perfil é pré-carregado.
   ========================================================================== */

#wz-profile-loader{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(30,10,60,.92) 0%, rgba(10,5,25,.98) 70%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
#wz-profile-loader.is-visible{
  opacity: 1;
  pointer-events: auto;
}

.wz-pl-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 34px 42px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(168,85,247,.15) inset;
  animation: wz-pl-pop .45s cubic-bezier(.2,.9,.25,1.2);
  max-width: calc(100vw - 32px);
}

@keyframes wz-pl-pop{
  from{ transform: scale(.9) translateY(8px); opacity: 0; }
  to  { transform: scale(1)   translateY(0);  opacity: 1; }
}

/* Avatar ring */
.wz-pl-ring{
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 0deg,
    #a855f7 0%, #ec4899 25%, #f59e0b 50%,
    #22d3ee 75%, #a855f7 100%);
  animation: wz-pl-spin 2.2s linear infinite;
  box-shadow: 0 0 40px rgba(168,85,247,.45);
}
.wz-pl-ring::before{
  content:"";
  position:absolute; inset:-6px;
  border-radius:50%;
  background: conic-gradient(from 90deg,
    rgba(168,85,247,.5), rgba(236,72,153,.0) 40%, rgba(168,85,247,.5));
  filter: blur(10px);
  z-index:-1;
  animation: wz-pl-spin 3.4s linear infinite reverse;
}
.wz-pl-ring .wz-pl-inner{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #12081f;
  display:flex; align-items:center; justify-content:center;
  overflow: hidden;
  position: relative;
}
.wz-pl-ring .wz-pl-inner img,
.wz-pl-ring .wz-pl-inner .wz-pl-fallback{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  animation: wz-pl-breathe 1.6s ease-in-out infinite;
}
.wz-pl-ring .wz-pl-fallback{
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  font-size: 42px;
  color:#fff;
}
.wz-pl-ring .wz-pl-shine{
  position:absolute; inset:0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  animation: wz-pl-shine 1.8s ease-in-out infinite;
  border-radius: 50%;
}

@keyframes wz-pl-spin{ to { transform: rotate(360deg); } }
@keyframes wz-pl-breathe{ 50% { transform: scale(.94); opacity:.85; } }
@keyframes wz-pl-shine{
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Text */
.wz-pl-text{
  color:#f4f0ff;
  font-family: inherit;
  text-align:center;
  letter-spacing:.3px;
}
.wz-pl-text .wz-pl-title{
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(90deg,#f9a8d4,#c4b5fd,#93c5fd);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color: transparent;
}
.wz-pl-text .wz-pl-sub{
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(230,220,255,.7);
}

/* Progress bar */
.wz-pl-bar{
  position: relative;
  width: 220px;
  max-width: 60vw;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.wz-pl-bar::before{
  content:"";
  position:absolute; left:-40%; top:0; bottom:0;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg,#a855f7,#ec4899,#f59e0b);
  animation: wz-pl-slide 1.3s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(236,72,153,.6);
}
@keyframes wz-pl-slide{
  0%   { left:-40%; }
  100% { left: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .wz-pl-ring, .wz-pl-ring::before, .wz-pl-ring .wz-pl-inner img,
  .wz-pl-ring .wz-pl-shine, .wz-pl-bar::before, .wz-pl-card{
    animation: none !important;
  }
}
