/* =====================================================
   MODALS CSS
   ===================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  display: none;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2001;
  min-width: 400px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  display: none;
  animation: slideUp 0.25s ease;
  overflow: hidden;
}
.modal-container.active { display: flex; flex-direction: column; }

.modal {
  background: white;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  width: 100%;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f3f2f1;
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  background: #f9f9f8;
  flex-shrink: 0;
}

/* Wizard steps */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wizard-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #f3f2f1;
  color: var(--text-muted);
  border: 2px solid var(--card-border);
  transition: var(--transition);
}
.wizard-step.active .wizard-step-num {
  background: var(--azure-blue);
  color: white;
  border-color: var(--azure-blue);
}
.wizard-step.done .wizard-step-num {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.wizard-step.active .wizard-step-label { color: var(--azure-blue); }
.wizard-step.done .wizard-step-label { color: var(--success); }
.wizard-connector {
  width: 30px; height: 2px;
  background: var(--card-border);
  margin: 0 4px;
  flex-shrink: 0;
}
.wizard-connector.done { background: var(--success); }

/* ARM template viewer */
.json-viewer {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 16px;
  border-radius: var(--border-radius);
  overflow: auto;
  max-height: 300px;
}
.json-key { color: #9cdcfe; }
.json-string { color: #ce9178; }
.json-number { color: #b5cea8; }
.json-bool { color: #569cd6; }

/* =====================================================
   TERMINAL CSS
   ===================================================== */

.terminal-panel {
  position: fixed;
  bottom: -420px;
  left: 0; right: 0;
  height: 400px;
  background: #0c0c0c;
  z-index: 1500;
  transition: bottom 0.3s ease;
  display: flex;
  flex-direction: column;
  border-top: 2px solid #0078D4;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.terminal-panel.open { bottom: 0; }

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e1e;
  padding: 0 12px;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  height: 38px;
}
.terminal-tabs { display: flex; gap: 0; }
.terminal-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.terminal-tab.active { color: white; border-bottom-color: var(--azure-blue); }
.terminal-tab:hover { color: #ccc; }
.terminal-controls {
  display: flex; align-items: center; gap: 12px;
}
.terminal-info { font-size: 11px; color: #555; }
.terminal-controls button {
  background: none; border: none; color: #666; cursor: pointer;
  font-size: 14px; transition: color var(--transition);
}
.terminal-controls button:hover { color: white; }

.terminal-body {
  flex: 1;
  padding: 10px 14px;
  overflow-y: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: #d4d4d4;
  display: flex;
  flex-direction: column;
}

#terminalOutput {
  flex: 1;
}

.terminal-line {
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.terminal-line.cmd { color: #9cdcfe; }
.terminal-line.out { color: #d4d4d4; }
.terminal-line.err { color: #f48771; }
.terminal-line.success { color: #4ec9b0; }
.terminal-line.info { color: #569cd6; }
.terminal-line.json { color: #ce9178; }
.terminal-line.comment { color: #6a9955; }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-shrink: 0;
}
.terminal-prompt { color: #4ec9b0; white-space: nowrap; font-size: 13px; }
.terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #d4d4d4;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  caret-color: white;
}
