/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0B0F19;
}
::-webkit-scrollbar-thumb {
  background: #1F2937;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Animations */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-fast {
  animation: spin-slow 0.8s linear infinite;
}

/* Pulsing animation for Refresh button */
@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 5px rgba(168, 85, 247, 0.65);
  }
}

.animate-pulse-btn {
  animation: pulse-glow 1.2s ease-in-out infinite !important;
}

/* Star favorite transition */
.star-btn {
  transition: transform 0.15s ease, color 0.15s ease;
}
.star-btn:hover {
  transform: scale(1.2);
}

/* Row hover highlight */
tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background-color: rgba(31, 41, 55, 0.4);
}

/* Selected row highlight when checkbox is checked */
tbody tr.row-selected {
  background-color: rgba(139, 92, 246, 0.05);
}

/* Chart Canvas adjustments */
#views-chart {
  width: 100% !important;
  height: 100% !important;
}

/* Sort header indicator */
th[data-sort] {
  user-select: none;
}

/* YouTube Subscribers Hover Modal */
#yt-subscribers-modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

#yt-subscribers-wrapper:hover #yt-subscribers-modal,
#yt-subscribers-wrapper:focus-within #yt-subscribers-modal,
#yt-subscribers-wrapper.is-open #yt-subscribers-modal {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}
