/* Terminal page styling */

/* Only apply these global styles to the dedicated terminal page */
body.terminal-page {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #1e1e2e;
  font-family: 'Courier New', Courier, monospace;
}

body.terminal-page html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#terminal {
  height: 100vh;
  width: 100%;
  padding: 20px;
}

/* Override jquery.terminal default colors - Catppuccin Mocha */
.terminal {
  --background: #1e1e2e;
  --color: #cdd6f4;
  --link-color: #89b4fa;
  background: var(--background) !important;
  color: var(--color) !important;
  font-size: 14px;
  line-height: 1.4;
}

.terminal .terminal-output div {
  word-wrap: break-word;
  white-space: pre-wrap;
}

.terminal .cmd {
  color: #cdd6f4;
}

.terminal .terminal-output a {
  color: var(--link-color);
  text-decoration: underline;
}

.terminal .terminal-output a:hover {
  color: #b4befe;
}

/* Cursor styling */
.terminal .cmd .cursor {
  background: #cdd6f4;
  color: #1e1e2e;
}

.terminal .cmd .cursor.blink {
  animation: terminal-blink 1s steps(2, start) infinite;
}

@keyframes terminal-blink {
  to {
    visibility: hidden;
  }
}

/* Scrollbar styling */
.terminal::-webkit-scrollbar {
  width: 8px;
}

.terminal::-webkit-scrollbar-track {
  background: #1e1e2e;
}

.terminal::-webkit-scrollbar-thumb {
  background: #45475a;
  border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb:hover {
  background: #585b70;
}

/* Mobile Quick Commands Panel */

.quick-commands-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e1e2e; /* Catppuccin Mocha base */
  border-top: 2px solid #45475a; /* Catppuccin Mocha surface2 */
  z-index: 1000;
}

.quick-commands-header {
  padding: 10px 15px;
  background: #181825; /* Catppuccin Mocha mantle */
  color: #a6e3a1; /* Catppuccin Mocha green */
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-btn {
  font-size: 18px;
  font-weight: bold;
}

.quick-commands-buttons {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-cmd-btn {
  background: #181825; /* Catppuccin Mocha mantle */
  color: #a6e3a1; /* Catppuccin Mocha green */
  border: 1px solid #45475a; /* Catppuccin Mocha surface2 */
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  cursor: pointer;
  min-width: 70px;
  transition: all 0.2s ease;
}

.quick-cmd-btn:active {
  background: #313244; /* Catppuccin Mocha surface0 */
  transform: scale(0.95);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .quick-commands-panel {
    display: block;
  }

  #terminal {
    padding: 10px;
    padding-bottom: 150px; /* Make room for panel */
  }

  .terminal {
    font-size: 16px; /* Prevent iOS zoom */
  }
}

@media (max-width: 480px) {
  .terminal {
    font-size: 14px;
  }

  .quick-cmd-btn {
    font-size: 11px;
    padding: 6px 10px;
    min-width: 60px;
  }
}
