/* Custom styles for Dev Automation Hub */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

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

/* Log container auto-scroll indicator */
#log-container.auto-scroll::after {
  content: '↓ Auto-scrolling...';
  position: sticky;
  bottom: 0;
  display: block;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(transparent, #0f172a);
  color: #6b7280;
  font-size: 0.75rem;
}

/* Task status icons */
.task-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.task-status-queued {
  background: #374151;
  color: #9ca3af;
}

.task-status-running {
  background: #1e40af;
  color: #60a5fa;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.task-status-completed {
  background: #166534;
  color: #4ade80;
}

.task-status-failed {
  background: #991b1b;
  color: #f87171;
}

.task-status-cancelled {
  background: #713f12;
  color: #fbbf24;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Log levels */
.log-level-info {
  color: #60a5fa;
}

.log-level-warn {
  color: #fbbf24;
}

.log-level-error {
  color: #f87171;
}

.log-level-success {
  color: #4ade80;
}

/* Syntax highlighting overrides for dark mode */
.hljs {
  background: #0f172a !important;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
}

.diff-addition {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid #22c55e;
  padding: 0.25rem 0.5rem;
}

.diff-deletion {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  padding: 0.25rem 0.5rem;
}

.diff-unchanged {
  color: #6b7280;
}

/* Task tree expandable */
.task-expandable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s;
}

.task-expandable:hover {
  background-color: rgba(55, 65, 81, 0.3);
}

.task-children {
  margin-left: 1.5rem;
  border-left: 2px solid #374151;
  padding-left: 1rem;
}

/* Notification permission button states */
#notif-toggle.granted {
  color: #4ade80;
}

#notif-toggle.denied {
  color: #f87171;
}

/* Mobile responsive tweaks */
@media (max-width: 640px) {
  #log-container {
    font-size: 0.75rem;
    padding: 1rem;
  }
  
  .task-children {
    margin-left: 0.75rem;
    padding-left: 0.5rem;
  }
}
