/* Inline Terminal Styling - Catppuccin Mocha Theme */

.inline-terminal-container {
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1e1e2e;
  border: 2px solid #45475a;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.inline-terminal-container:hover {
  border-color: #89b4fa;
  box-shadow: 0 4px 12px rgba(137, 180, 250, 0.2);
}

/* Terminal Header */
.terminal-header {
  background: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid #45475a;
  transition: all 0.2s ease;
  user-select: none;
}

.terminal-header:hover {
  background: linear-gradient(135deg, #262637 0%, #1e1e2e 100%);
}

.terminal-header:active {
  transform: scale(0.995);
}

.terminal-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.terminal-icon {
  color: #a6e3a1;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  display: inline-block;
  min-width: 1.2rem;
}

.terminal-header.expanded .terminal-icon {
  transform: rotate(90deg);
}

.terminal-title {
  color: #cdd6f4;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: monospace;
}

.terminal-subtitle {
  color: #6c7086;
  font-size: 0.9rem;
  font-family: monospace;
  margin-left: auto;
}

/* Terminal Wrapper */
.terminal-wrapper {
  height: 0;
  overflow: hidden;
  transition: height 0.4s ease;
  display: block !important;
}

.terminal-wrapper.expanded {
  height: 450px;
}

#homepage-terminal {
  height: 100%;
  min-height: 450px;
  background: #1e1e2e;
}

/* Override jquery.terminal styles for inline version */
#homepage-terminal.terminal {
  height: 450px !important;
  max-height: 450px !important;
  background: #1e1e2e !important;
  border: none !important;
  padding: 1rem !important;
  overflow: auto !important;
  position: relative !important;
}

/* Force content to be visible at top of container */
#homepage-terminal .terminal-wrapper {
  position: relative !important;
  min-height: 100% !important;
}

#homepage-terminal .terminal-scroller {
  position: relative !important;
  min-height: 100% !important;
}

#homepage-terminal .terminal-output {
  position: relative !important;
  top: 0 !important;
}

#homepage-terminal .cmd {
  position: relative !important;
  background: #1e1e2e !important;
}

/* Prevent CSS transitions that cause visual jank */
#homepage-terminal * {
  transition: none !important;
}

/* Make cursor visible */
#homepage-terminal .cmd-cursor {
  background-color: #cdd6f4 !important;
  color: #1e1e2e !important;
}

#homepage-terminal .cmd-cursor.cmd-blink {
  background-color: #cdd6f4 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .terminal-header {
    padding: 1rem;
  }

  .terminal-header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .terminal-subtitle {
    margin-left: 0;
    font-size: 0.85rem;
  }

  .terminal-wrapper.expanded {
    height: 400px;
  }
}

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

  .terminal-wrapper.expanded {
    height: 350px;
  }
}
