/**
 * SKYGRID Device Status Styles
 * Prominent device connection indicator with glowing online state
 */

#device-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition: all 0.3s ease;
  cursor: default;
}

#device-status.device-status-online {
  background-color: rgba(34, 197, 94, 0.15);
  border: 1.5px solid rgba(34, 197, 94, 0.5);
  color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), inset 0 0 8px rgba(34, 197, 94, 0.1);
}

#device-status.device-status-offline {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.device-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background-color: currentColor;
  animation: glow-pulse 1.5s ease-in-out infinite;
}

#device-status.device-status-online .device-status-indicator {
  box-shadow: 0 0 4px currentColor, 0 0 8px rgba(34, 197, 94, 0.6);
}

#device-status.device-status-offline .device-status-indicator {
  animation: none;
  opacity: 0.5;
  box-shadow: none;
}

.device-status-text {
  font-weight: 700;
  margin-right: 12px;
  letter-spacing: 0.3px;
}

.device-status-details {
  display: flex;
  gap: 12px;
  font-size: 11px;
  opacity: 0.8;
}

.device-status-class::before {
  content: '📱 ';
}

.device-status-time::before {
  content: '🕐 ';
}

@media (max-width: 640px) {
  #device-status {
    font-size: 11px;
    padding: 6px 10px;
  }

  .device-status-text {
    margin-right: 8px;
  }

  .device-status-details {
    gap: 8px;
    font-size: 10px;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 4px currentColor, 0 0 8px rgba(34, 197, 94, 0.6);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.1);
    box-shadow: 0 0 6px currentColor, 0 0 12px rgba(34, 197, 94, 0.8);
  }
}

/* Fallback text for JS disabled */
.device-status-noscript {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: rgba(100, 100, 100, 0.2);
  color: #888;
  font-size: 11px;
  font-family: system-ui, sans-serif;
}
