/* Terminal Modal Styles */
.terminal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.terminal-modal.is-active {
  display: flex;
}

.terminal-modal-content {
  background-color: #1a1a2e;
  border-radius: 8px;
  width: 90%;
  max-width: 1000px;
  height: 80%;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #16213e;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-modal-title {
  color: #e0e0e0;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-modal-title .icon {
  color: #4ade80;
}

.terminal-status {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.terminal-status.connecting {
  background-color: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

.terminal-status.connected {
  background-color: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.terminal-status.disconnected {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.terminal-status.session-closed {
  background-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.terminal-status.error {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.terminal-modal-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.terminal-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.terminal-modal-body {
  flex: 1;
  padding: 8px;
  overflow: hidden;
}

#terminal-container {
  width: 100%;
  height: 100%;
}

/* xterm.js custom styling */
.xterm {
  padding: 8px;
}

.xterm-viewport {
  overflow-y: auto !important;
}

/* Dark mode specific adjustments */
[data-theme='dark'] .terminal-modal-content {
  background-color: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme='dark'] .terminal-modal-header {
  background-color: #111111;
  border-color: rgba(255, 255, 255, 0.06);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .terminal-modal-content {
    width: 95%;
    height: 90%;
    max-height: none;
  }
}