/* Admin/Debug Status Bar */
.admin-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.95));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(52, 211, 153, 0.3);
  color: #e5e7eb;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.status-bar-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Compact View */
.status-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  gap: 16px;
  height: 24px;
}

.status-services {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.status-resources {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-label {
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.status-value {
  color: #34d399;
  font-weight: 700;
  font-size: 11px;
  min-width: 35px;
  text-align: right;
}

.status-value.warning {
  color: #fbbf24;
}

.status-value.critical {
  color: #ef4444;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Service Indicators */
.service-indicator {
  font-size: 14px;
  line-height: 1;
  cursor: help;
  transition: all 0.2s;
}

.service-indicator.healthy {
  color: #34d399;
}

.service-indicator.degraded {
  color: #fbbf24;
}

.service-indicator.down {
  color: #ef4444;
  animation: blink 1s ease-in-out infinite;
}

.service-indicator:hover {
  transform: scale(1.3);
}

/* Action Buttons */
.status-actions,
.status-actions-expanded {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-btn {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  width: 20px;
}

.status-btn:hover {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateY(-1px);
}

.status-btn:active {
  transform: translateY(0);
}

.status-btn.active {
  background: rgba(52, 211, 153, 0.3);
  border-color: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.status-btn.spinning {
  animation: spin 0.5s linear;
}

/* Expanded View */
.status-expanded {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  border-top: 1px solid rgba(52, 211, 153, 0.2);
}

.status-section {
  flex: 1;
}

.status-section h4 {
  margin: 0 0 8px 0;
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.detail-label {
  color: #9ca3af;
  font-size: 10px;
}

.detail-value {
  color: #e5e7eb;
  font-weight: 600;
  font-size: 10px;
}

/* Services Detailed View */
#services-detailed {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
  border-left: 2px solid transparent;
  position: relative;
}

.service-row.healthy {
  border-left-color: #34d399;
}

.service-row.degraded {
  border-left-color: #fbbf24;
}

.service-row.down {
  border-left-color: #ef4444;
}

.service-icon {
  font-weight: 700;
  font-size: 12px;
}

.service-row.healthy .service-icon {
  color: #34d399;
}

.service-row.degraded .service-icon {
  color: #fbbf24;
}

.service-row.down .service-icon {
  color: #ef4444;
}

.service-name {
  flex: 1;
  font-weight: 600;
  font-size: 10px;
  color: #e5e7eb;
}

.service-status {
  font-size: 9px;
  color: #9ca3af;
  text-transform: uppercase;
}

.service-port {
  font-size: 9px;
  color: #6b7280;
  font-family: monospace;
}

.service-restart-btn {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  transition: all 0.2s;
  margin-left: auto;
}

.service-restart-btn:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  transform: scale(1.1);
}

.service-restart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.service-restart-btn.spinning {
  animation: spin 1s linear infinite;
}

.status-actions-expanded {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
}

/* Debug Mode Indicator */
.debug-indicator {
  position: fixed;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  z-index: 10000;
  animation: pulse 2s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .status-compact {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 12px;
  }

  .status-expanded {
    flex-direction: column;
    gap: 16px;
  }

  .status-label {
    font-size: 9px;
  }

  .status-value {
    font-size: 10px;
  }
}

/* Ensure status bar doesn't overlap with content */
body {
  padding-bottom: 24px; /* Height of compact status bar */
}

body.status-bar-expanded {
  padding-bottom: 140px; /* Approximate height of expanded status bar */
}

/* Debug Mode Styles */
body.debug-mode {
  position: relative;
}

body.debug-mode::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border: 3px dashed rgba(239, 68, 68, 0.3);
  z-index: 9998;
}

body.debug-mode * {
  outline: 1px solid rgba(52, 211, 153, 0.1);
}

body.debug-mode *:hover {
  outline: 2px solid rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.05);
}

.debug-overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  color: #34d399;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 10px;
  z-index: 10001;
  border: 1px solid rgba(52, 211, 153, 0.5);
  pointer-events: none;
}
