.terminal-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100%;
  max-height: 100%;
}

.terminal-modal[open] {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Backdrop via ::backdrop pseudo-element (native dialog) */
.terminal-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.terminal-box {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  width: min(96vw, 900px);
  height: min(80vh, 600px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

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

.terminal-box-title {
  font-size: 12px;
  color: #888;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.05em;
}

.terminal-close-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.terminal-close-btn:hover {
  color: #ccc;
  background: #222;
}

#terminal-container {
  flex: 1;
  overflow: hidden;
  padding: 6px;
}

/* Ensure xterm fills the container */
#terminal-container .xterm {
  height: 100%;
}

#terminal-container .xterm-viewport {
  overflow-y: auto;
}
