/* ============================================================
   Parsisho — «آنلاین» presence chip  (lives inside .ph-topbar)
   Loaded by assets/online-now.js (self-injected <link>).
   Blinking green dot + softly pulsing number, glassy pill.
   ============================================================ */

.ph-online{
  position:relative; display:inline-flex; align-items:center; gap:6px;
  height:25px; padding:0 10px 0 9px; border-radius:999px;
  font-weight:800; letter-spacing:.2px; color:#eafff6; flex:none;
  background:linear-gradient(135deg,rgba(63,230,160,.22),rgba(255,255,255,.09));
  border:1px solid rgba(120,240,190,.42);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  box-shadow:inset 0 0 0 1px rgba(63,230,160,.10), 0 0 12px rgba(63,230,160,.20);
  animation:ph-on-breathe 3.2s ease-in-out infinite;
}
.ph-online:hover{background:linear-gradient(135deg,rgba(63,230,160,.32),rgba(255,255,255,.14))}

/* blinking dot */
.ph-online .ph-dot{
  position:relative; width:8px; height:8px; border-radius:50%; flex:none;
  background:#3fe6a0; box-shadow:0 0 8px rgba(63,230,160,.9);
  animation:ph-on-blink 1.6s ease-in-out infinite;
}
.ph-online .ph-dot::after{
  content:""; position:absolute; inset:-4px; border-radius:50%;
  border:1px solid rgba(63,230,160,.65);
  animation:ph-on-ring 1.8s ease-out infinite;
}

/* number */
.ph-online .ph-online-num{
  font-variant-numeric:tabular-nums; min-width:1.2ch; text-align:center;
  color:#fff; text-shadow:0 0 8px rgba(63,230,160,.65);
  animation:ph-on-numpulse 2.4s ease-in-out infinite;
}
.ph-online .ph-online-lbl{opacity:.92}

/* slightly warmer/louder when more than one person is on */
.ph-online.ph-hot{
  border-color:rgba(150,255,205,.6);
  box-shadow:inset 0 0 0 1px rgba(63,230,160,.16), 0 0 16px rgba(63,230,160,.32);
}

@keyframes ph-on-blink{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.45;transform:scale(.7)}
}
@keyframes ph-on-ring{
  0%{transform:scale(.6);opacity:.85}
  70%,100%{transform:scale(1.9);opacity:0}
}
@keyframes ph-on-breathe{
  0%,100%{box-shadow:inset 0 0 0 1px rgba(63,230,160,.10),0 0 12px rgba(63,230,160,.18)}
  50%{box-shadow:inset 0 0 0 1px rgba(63,230,160,.18),0 0 18px rgba(63,230,160,.34)}
}
@keyframes ph-on-numpulse{
  0%,100%{opacity:1}
  50%{opacity:.7}
}

/* responsive: keep the pill compact on phones */
@media (max-width:560px){
  .ph-online .ph-online-lbl{display:none}
  .ph-online{padding:0 8px;gap:5px}
}
@media (max-width:380px){
  .ph-online{padding:0 6px;gap:4px}
  .ph-online .ph-dot{width:7px;height:7px}
}

@media (prefers-reduced-motion:reduce){
  .ph-online,.ph-online .ph-dot,.ph-online .ph-dot::after,.ph-online .ph-online-num{animation:none !important}
}
