/* ==========================================================================
   BIKRANT DAHAL - INTERACTIVE SOC TERMINAL
   Terminal Window, CRT Effects, Command Outputs & Quick Chips
   ========================================================================== */

.terminal-section {
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.terminal-wrapper {
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.12);
  border: 1px solid var(--border-highlight);
  background: #090d16;
  overflow: hidden;
  position: relative;
  font-family: var(--font-mono);
}

[data-theme="light"] .terminal-wrapper {
  background: #0b1120; /* Keep terminal dark even in light mode for authentic feel */
  border-color: #1e293b;
}

/* Terminal Header / Titlebar */
.terminal-header {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.terminal-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
}

.btn-close { background: #ef4444; }
.btn-minimize { background: #f59e0b; }
.btn-maximize { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-title-host {
  color: #38bdf8;
  font-weight: 600;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-action-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.terminal-action-btn:hover {
  color: #38bdf8;
}

/* Terminal Body & Screen */
.terminal-body {
  padding: 20px;
  min-height: 380px;
  max-height: 520px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #334155 #090d16;
}

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

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

/* Welcome Banner */
.terminal-banner {
  color: #00f0ff;
  font-size: 0.76rem;
  line-height: 1.35;
  margin-bottom: 16px;
  white-space: pre;
  overflow-x: auto;
}

.terminal-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Command Entry Line */
.terminal-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-prompt-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.prompt-user {
  color: #10b981;
  font-weight: 700;
}

.prompt-at {
  color: #64748b;
}

.prompt-host {
  color: #00f0ff;
  font-weight: 600;
}

.prompt-path {
  color: #3b82f6;
}

.prompt-symbol {
  color: #f1f5f9;
}

/* Active Input Form */
.terminal-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #00ff9d;
  caret-color: #00ff9d;
}

/* Output Formatting */
.terminal-output {
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.55;
}

.output-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 0.82rem;
}

.output-table th {
  text-align: left;
  color: #00f0ff;
  border-bottom: 1px solid #1e293b;
  padding: 4px 8px;
}

.output-table td {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.out-success { color: #10b981; }
.out-info { color: #38bdf8; }
.out-warning { color: #f59e0b; }
.out-danger { color: #ef4444; }
.out-highlight { color: #a855f7; }

/* Quick Action Command Chips */
.terminal-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chip-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-right: 4px;
}

.cmd-chip {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: #38bdf8;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cmd-chip:hover {
  background: #00f0ff;
  color: #090d16;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Maximized Mode */
.terminal-wrapper.maximized {
  position: fixed;
  inset: 20px;
  max-width: none;
  height: calc(100vh - 40px);
  z-index: 1000;
}

.terminal-wrapper.maximized .terminal-body {
  max-height: none;
  flex: 1;
}

@media (max-width: 768px) {
  .terminal-banner {
    display: none;
  }
  .terminal-body {
    min-height: 280px;
    font-size: 0.8rem;
  }
}
