/* ===========================================
   TERMINAL.CSS - Interactive terminal styles
   =========================================== */

/* Terminal Box - Match other sections (cyan) */
.terminal-box {
    background: rgba(10, 10, 16, 0.7);
    border: 1px solid var(--wired-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.1);
}

.terminal-box .box-header {
    background: rgba(0, 255, 255, 0.15);
    border-bottom: 1px solid var(--wired-cyan);
    color: var(--wired-cyan);
}

/* Terminal Body */
.terminal-body {
    padding: 15px 20px;
    background: rgba(10, 10, 16, 0.7);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

/* Terminal Output Area */
.terminal-output {
    font-family: var(--f-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Terminal Lines */
.terminal-line {
    margin-bottom: 4px;
    word-wrap: break-word;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

/* Terminal Prompt */
.terminal-prompt {
    color: var(--wired-cyan);
    font-weight: 600;
    user-select: none;
}

/* Command text */
.terminal-command {
    color: var(--fg);
}

/* Response text */
.terminal-response {
    color: var(--fg-dim);
    margin-left: 0;
    padding-left: 0;
}

/* Error messages */
.terminal-error {
    color: var(--wired-pink);
}

/* Success messages */
.terminal-success {
    color: var(--wired-cyan);
}

/* Info/warning messages */
.terminal-info {
    color: var(--wired-cyan);
}

/* Blinking cursor after input text */
.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--wired-cyan);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Input Line - looks like console line */
.terminal-input-line {
    font-family: var(--f-mono);
    font-size: 0.9rem;
    position: relative;
}

.terminal-input-line .terminal-prompt {
    display: inline;
}

/* Actual Input - invisible but functional, positioned over the display area */
.terminal-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: transparent;
    border: none;
    color: transparent;
    caret-color: transparent;
    cursor: text;
}

/* Visual representation of input with inline cursor */
.terminal-input-display {
    color: var(--fg);
    white-space: pre;
    display: inline;
}

.terminal-input-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--wired-cyan);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 0;
}

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

.terminal-body::-webkit-scrollbar-track {
    background: rgba(10, 10, 16, 0.7);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-muted);
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: var(--border-subtle);
}

/* neofetch-style ASCII art */
.terminal-ascii {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    line-height: 1.2;
    color: var(--wired-cyan);
    white-space: pre;
    margin: 10px 0;
}

/* Directory listing */
.terminal-ls-item {
    display: inline-block;
    margin-right: 20px;
    color: var(--wired-cyan);
}

.terminal-ls-item.dir {
    color: var(--wired-cyan);
    font-weight: 600;
}

.terminal-ls-item.file {
    color: var(--fg);
}

.terminal-ls-item.exe {
    color: var(--wired-cyan);
}

/* Make terminal more mobile-friendly */
@media (max-width: 768px) {
    .terminal-body {
        min-height: 150px;
        max-height: 300px;
        padding: 10px 15px;
    }
    
    .terminal-output,
    .terminal-input-line {
        font-size: 0.85rem;
    }
    
    .terminal-ascii {
        font-size: 0.6rem;
    }
}
