/* ===================================
   Terminal Modal
   =================================== */

.terminal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.terminal-overlay.visible {
    display: flex;
}

.terminal-modal {
    width: 100%;
    max-width: 820px;
    max-height: 80vh;
    background: #0a0b0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-close {
    background: #ff5f56;
    cursor: pointer;
    transition: opacity var(--t-fast);
}
.dot-close:hover { opacity: 0.8; }
.dot-min { background: #ffbd2e; }
.dot-max { background: #27c93f; }

.terminal-title-bar {
    font-family: var(--font-mono);
    font-size: 12px;
}
.tt-user { color: var(--green); }
.tt-at { color: var(--text-muted); }
.tt-host { color: var(--blue); }
.tt-sep, .tt-path { color: var(--text-secondary); }
.tt-dollar { color: var(--text-muted); }

.terminal-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    min-height: 300px;
    max-height: calc(80vh - 48px);
}

.terminal-output {
    margin-bottom: 12px;
}

.terminal-welcome {
    margin-bottom: 16px;
}

.terminal-ascii {
    color: var(--green);
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.terminal-welcome p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.term-highlight {
    color: var(--green);
    font-weight: 600;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-prompt {
    color: var(--green);
    white-space: nowrap;
    flex-shrink: 0;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
    caret-color: var(--green);
}

/* Terminal output blocks */
.term-block {
    margin: 8px 0;
}

.term-cmd-line {
    color: var(--green);
    margin-bottom: 4px;
}

.term-cmd-text {
    color: var(--orange);
}

.term-output {
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.term-output a {
    color: var(--green);
}
.term-output a:hover {
    text-decoration: underline;
}

.term-error {
    color: var(--red);
}

.term-success {
    color: var(--green);
}

.term-info {
    color: var(--blue);
}

.term-muted {
    color: var(--text-muted);
}

.term-bold {
    color: var(--text-primary);
    font-weight: 600;
}
