/* Custom CSS per replicare pixel-perfect lo stile dark di UptimeRobot */

:root {
  --bg-main: #0b0f19;
  --bg-sidebar: #0d131f;
  --bg-card: #131b2e;
  --bg-card-hover: #162036;
  --border-subtle: #1e293b;
  --color-up: #10b981;
  --color-down: #ef4444;
  --color-pause: #64748b;
}

body {
  background-color: var(--bg-main);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* Scrollbar personalizzata dark */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Blocchetti di Uptime Grafici (Stile UptimeRobot) */
.uptime-bar-container {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 24px;
}

.uptime-bar-segment {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  position: relative;
}

.uptime-bar-segment:hover {
  transform: scaleY(1.3);
  z-index: 10;
}

.uptime-bar-segment.up {
  background-color: #10b981;
}

.uptime-bar-segment.down {
  background-color: #ef4444;
}

.uptime-bar-segment.paused {
  background-color: #64748b;
}

.uptime-bar-segment.nodata {
  background-color: #1e293b;
}

/* Badge di stato UptimeRobot */
.status-badge-cause {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pulse animation per monitor down */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.status-dot-down {
  animation: pulse-ring 2s infinite;
}

/* Tooltip personalizzato */
.tooltip-custom {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: #fff;
  text-align: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid #334155;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  z-index: 50;
  pointer-events: none;
}

.uptime-bar-segment:hover .tooltip-custom {
  visibility: visible;
}
