/* ck_realtime.css — WebSocket live dot, price flash, alert toasts */

/* ── WebSocket live indicator ─────────────────────────────────────────────── */
.cl-ws-status {
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.cl-ws-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a3a3a;
  display: inline-block;
  transition: background 0.4s;
  flex-shrink: 0;
}

.cl-ws-dot.cl-ws-live {
  background: #00C896;
  animation: ckrt-pulse 2.5s ease-in-out infinite;
}

.cl-ws-dot.cl-ws-connecting {
  background: #FFC107;
  animation: ckrt-pulse 1s ease-in-out infinite;
}

.cl-ws-dot.cl-ws-offline {
  background: #555;
  animation: none;
}

@keyframes ckrt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.85); }
}

/* ── Price flash animations ───────────────────────────────────────────────── */
.ck-flash-up {
  animation: ckrt-flash-green 0.8s ease-out forwards;
}

.ck-flash-dn {
  animation: ckrt-flash-red 0.8s ease-out forwards;
}

@keyframes ckrt-flash-green {
  0%   { background-color: rgba(0, 200, 150, 0.22); }
  100% { background-color: transparent; }
}

@keyframes ckrt-flash-red {
  0%   { background-color: rgba(255, 68, 68, 0.22); }
  100% { background-color: transparent; }
}

/* ── Price direction text colours ────────────────────────────────────────── */
.ck-up { color: #00C896; }
.ck-dn { color: #FF4444; }

/* ── Alert toast ─────────────────────────────────────────────────────────── */
.ck-alert-toast {
  background: linear-gradient(135deg, #1a2d26 0%, #141414 100%);
  border: 1px solid rgba(0, 200, 150, 0.28);
  border-left: 3px solid #00C896;
  border-radius: 8px;
  padding: 11px 15px 11px 14px;
  min-width: 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  margin-top: 8px;
}

.ck-alert-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.ck-alert-toast strong {
  font-size: 13px;
  font-weight: 700;
  color: #e8e8e8;
  line-height: 1.3;
}

.ck-alert-toast .ck-toast-count {
  font-size: 12px;
  color: #00C896;
}

.ck-alert-toast .ck-toast-symbols {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Inline live price elements ──────────────────────────────────────────── */
.ck-ltp {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.ck-chg {
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}
