/**
 * Console App Styles
 */

.console-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ============ Tab Bar ============ */

.console-tabs {
  display: flex;
  background: #252526;
  border-bottom: 1px solid #3e3e3e;
  padding: 0;
  overflow-x: auto;
  flex-shrink: 0;
  height: 32px;
}

.console-tab {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #2d2d2d;
  border-right: 1px solid #3e3e3e;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.console-tab.hover {
  background: #37373d;
}

.console-tab.active {
  background: #1e1e1e;
  border-bottom: 2px solid #4ec9b0;
}

.console-tab-title {
  margin-right: 8px;
  font-size: 13px;
}

.console-tab-close {
  background: none;
  border: none;
  color: #858585;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.console-tab-close.hover {
  color: #e74856;
}

.console-tab-new {
  background: none;
  border: none;
  color: #858585;
  font-size: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.console-tab-new.hover {
  color: #d4d4d4;
  background: #37373d;
}

/* ============ Content Area ============ */

.console-content {
  flex: 1;
  overflow: hidden;
  background: #1e1e1e;
  position: relative;
}

/* ============ Terminal Grid ============ */

.terminal-grid {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.2;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 8px;
  overflow: hidden;
  position: relative;
  user-select: text;
  white-space: pre;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  outline: none;
}

.terminal-grid:focus {
  outline: none;
}

.terminal-row {
  display: block;
  white-space: pre;
}

.terminal-cell {
  display: inline;
}

/* Terminal cursor */
.terminal-cursor {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Terminal scrollbar */
.terminal-grid::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.terminal-grid::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.terminal-grid::-webkit-scrollbar-thumb {
  background: #424242;
  border-radius: 5px;
}

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

/* ============ Empty State ============ */

.console-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  color: #858585;
}

.console-empty button {
  padding: 10px 20px;
  background: #4ec9b0;
  border: none;
  border-radius: 4px;
  color: #1e1e1e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.console-empty button.hover {
  background: #5fd4bf;
}

/* ============ Status Bar ============ */

.console-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: #252526;
  border-top: 1px solid #3e3e3e;
  font-size: 12px;
  color: #858585;
  flex-shrink: 0;
  height: 30px;
  box-sizing: border-box;
}

.console-status span {
  margin-right: 20px;
}

.console-status span:last-child {
  margin-right: 0;
}

/* ============ Loading State ============ */

.console-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 15px;
  color: #858585;
}

.console-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #3e3e3e;
  border-top-color: #4ec9b0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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