/* Custom Styles for ServerPulse */
:root {
  color-scheme: light dark;
}

/* Glassmorphism & custom utility classes */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Pulse animation for live online indicator */
@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

.animate-pulse-dot {
  animation: pulse-dot 2s infinite ease-in-out;
}

/* Alert pulse glow for critical modal */
@keyframes alert-pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.alert-pulse-box {
  animation: alert-pulse-glow 2s infinite;
}

/* Smooth transitions */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for data tables and dialogs */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(75, 85, 99, 0.6);
}

/* Modal dialog backdrop styling in accordance with modern web standards */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

dialog[open] {
  animation: modal-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Gauge progress stroke transition */
.gauge-circle {
  transition: stroke-dashoffset 0.5s ease-in-out, stroke 0.3s ease;
}
