/* src/styles/windows/terminal-window.css */

#terminal {
  position: relative;
  flex: 1;
  padding: 10px 20px;
  line-height: 1.4;
  font-size: 17px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #000000;
  font-family: "Ubuntu Mono", "Monaco", "Consolas", monospace;
  color: #ffffff;
}

#terminal::-webkit-scrollbar {
  width: 8px;
}
#terminal::-webkit-scrollbar-track {
  background: #1a1a1a;
}
#terminal::-webkit-scrollbar-thumb {
  background: #444444;
  border-radius: 4px;
}
#terminal::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: var(--z-window-panel);
  background: transparent;
}

#overlay canvas {
  z-index: 10 !important;
  background: transparent !important;
}

.terminal-window .window-content {
  padding: 0;
}

.terminal-window {
  background: #2d2d2d;
  z-index: var(--z-window-terminal);
}

.terminal-window:has(.shake-soft),
.terminal-window:has(.screen-shake),
.terminal-window:has(.warp-tunnel) {
  overflow: hidden !important;
}

.terminal-window .window-content:has(.shake-soft),
.terminal-window .window-content:has(.screen-shake),
.terminal-window .window-content:has(.warp-tunnel) {
  overflow: hidden !important;
}

.terminal-window .window-content {
  background: #000000;
  color: #ffffff;
  font-family: "Ubuntu Mono", monospace;
  font-size: 14px;
}

.terminal-content {
  height: calc(100% - 32px);
  margin: 0;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #000000 !important;
  color: #ffffff;
  font-family: "Ubuntu Mono", monospace;
  font-size: 14px;
  border: none;
  border-radius: 0 0 8px 8px;
  position: relative;
  z-index: inherit;
  scroll-behavior: smooth;
  min-height: 100%;
  box-sizing: border-box;
}

.terminal-content #overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: var(--z-window-overlay) !important;
  pointer-events: none !important;
  background: transparent !important;
}

.ubuntu-command {
  margin: 2px 0;
  font-family: "Ubuntu Mono", monospace;
  white-space: pre-wrap;
  font-size: 17px;
}

.command-text {
  color: #ffffff;
  font-weight: normal;
  text-shadow: 0 0 3px #000000;
}

.line .prompt {
  color: #00ff00;
  font-weight: bold;
  margin-right: 8px;
  user-select: none;
}

.ubuntu-response {
  margin: 1px 0 1px 0;
  color: #cccccc;
  text-shadow: 0 0 3px #000000;
  line-height: 1.3;
  font-family: "Ubuntu Mono", monospace;
  font-size: 17px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ubuntu-response.system {
  color: #ffd56b;
}

.ubuntu-response.error {
  color: #ff6b6b;
  font-weight: normal;
}

.ubuntu-response.success {
  color: #2fd2a4;
}

.ubuntu-response.info {
  color: #888888;
}

.mobile-terminal {
  width: 100%;
  height: 100%;
  padding: 15px;
  background: #000000;
  color: #ffffff;
  font-family: "Ubuntu Mono", monospace;
  font-size: 16px;
  overflow: auto;
  margin: 0;
  border: none;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .mobile-mode #terminal {
    width: 100%;
    height: 100%;
    height: 100dvh;
    height: calc(100dvh - env(safe-area-inset-bottom));
    padding: 5px 15px;
    padding-bottom: max(env(safe-area-inset-bottom), 20px);
    background: #000000;
    color: #ffffff;
    font-family: "Ubuntu Mono", monospace;
    font-size: 16px;
    overflow: auto;
    margin: 0;
    border: none;
    box-sizing: border-box;
  }

  .mobile-mode .terminal-window {
    display: none;
  }

  .mobile-mode #overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
  }

  .ubuntu-command {
    font-size: 15px;
  }

  .ubuntu-response {
    font-size: 15px;
  }
}
