/* src/components/CommandTerminal.css */
.command-terminal {
  display: flex;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  flex-direction: column;
  height: 400px;
  margin-top: 20px;
  font-family: Monaco, Menlo, Ubuntu Mono, monospace;
  font-size: 13px;
}

.terminal-header {
  display: flex;
  background: #2a2a2a;
  border-bottom: 1px solid #333;
  justify-content: space-between;
  align-items:  center;
  padding: 8px 12px;
}

.terminal-title {
  color: #e0e0e0;
  font-weight: 500;
}

.terminal-status {
  display: flex;
  align-items:  center;
  gap: 12px;
  font-size: 12px;
}

.status-connected {
  color: #10b981;
}

.status-connecting {
  color: #f59e0b;
  animation: pulse 1.5s infinite;
}

.status-disconnected {
  color: #6b7280;
}

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

  50% {
    opacity: .5;
  }
}

.exit-code {
  border-radius: 3px;
  padding: 2px 8px;
  font-weight: 500;
}

.exit-code.success {
  color: #10b981;
  background: #10b9811a;
  border: 1px solid #10b9814d;
}

.exit-code.error {
  color: #ef4444;
  background: #ef44441a;
  border: 1px solid #ef44444d;
}

.terminal-error {
  color: #ef4444;
  background: #ef44441a;
  border-bottom: 1px solid #ef44444d;
  padding: 8px 12px;
  font-size: 12px;
}

.terminal-body {
  overflow-y: auto;
  overflow-x: auto;
  background: #0a0a0a;
  flex: 1;
  padding: 12px;
}

.terminal-empty {
  color: #6b7280;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.log-line {
  display: flex;
  white-space: pre-wrap;
  word-break: break-all;
  gap: 12px;
  margin-bottom: 2px;
  padding: 2px 0;
}

.log-line:hover {
  background: #ffffff0d;
}

.log-timestamp {
  color: #6b7280;
  opacity: .7;
  flex-shrink: 0;
  font-size: 11px;
}

.log-message {
  flex: 1;
}

.log-output .log-message {
  color: #e0e0e0;
}

.log-error .log-message {
  color: #ef4444;
}

.log-system .log-message {
  color: #3b82f6;
  font-style: italic;
}

.terminal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.terminal-body ::selection {
  background: #3b82f64d;
}

.terminal-body ::-moz-selection {
  background: #3b82f64d;
}
