/* Live Activity Indicators - Consolidated & Minimal */

/* ============================================
   LIVE STATUS BADGE
   ============================================ */

.live-status-badge {
  position: fixed;
  top: 76px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.2);
  animation: slideInFromRight 0.5s ease-out;
}

.live-status-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

.live-status-badge .pulse-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: #10b981;
  border-radius: 50%;
  animation: ripple 2s ease-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes ripple {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   NEWS CARD ANIMATIONS
   ============================================ */

.news-card {
  position: relative;
  transition: box-shadow 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 24px var(--shadow-color);
}

/* HLC values flash on update */
.hlc-item {
  transition: color 0.3s ease;
}

.hlc-item.updating {
  animation: hlcFlash 0.8s ease-out;
}

@keyframes hlcFlash {
  0%, 100% { color: inherit; }
  50% { color: #10b981; }
}

/* Price value glow */
.price-value.updating {
  animation: priceGlow 0.6s ease-out;
}

@keyframes priceGlow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
}

/* Sentiment bar shimmer */
.sentiment-progress-fill {
  position: relative;
  overflow: hidden;
}

.sentiment-progress-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: sentimentShimmer 4s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes sentimentShimmer {
  0% { left: -50%; }
  50%, 100% { left: 100%; }
}

/* Recent timestamps */
.timestamp.recent {
  color: #10b981;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Technical data flash */
.technical-data-item {
  transition: background 0.3s ease;
}

.technical-data-item.updated {
  animation: dataFlash 0.5s ease-out;
}

@keyframes dataFlash {
  0%, 100% { background: transparent; }
  50% { background: rgba(59, 130, 246, 0.1); }
}

/* ============================================
   WEBSOCKET STATUS INDICATOR
   ============================================ */

.ws-status-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--secondary-border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--secondary-text);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ws-status-indicator.show {
  opacity: 1;
}

.ws-status-indicator .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.ws-status-indicator.disconnected .status-dot {
  background: #ef4444;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .sentiment-progress-fill::before,
  .hlc-item.updating,
  .price-value.updating,
  .technical-data-item.updated,
  .live-status-badge .pulse-dot,
  .live-status-badge .pulse-dot::before {
    animation: none !important;
  }
  
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
  .live-status-badge {
    display: none !important;
  }
  
  .ws-status-indicator {
    bottom: 10px;
    left: 10px;
    right: auto;
    padding: 6px 10px;
    font-size: 10px;
  }
  
  .action-buttons button:hover {
    transform: none;
  }
}

/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] .sentiment-progress-fill::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}
