/* Terminal Styles for Agent Section */

.terminal {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
}

.terminal-header {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #1a1a1a;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
}

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27ca40; }

.terminal-title {
    color: #999;
    font-size: 13px;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    color: #c9c9c9;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

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

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

.terminal-line {
    margin-bottom: 10px;
    word-wrap: break-word;
}

.terminal-line.command {
    color: #f5f5f5;
    font-weight: 600;
    margin-top: 22px;
}

.terminal-line.response {
    color: #b8b8b8;
    white-space: pre-wrap;
}

.terminal-line.system {
    color: #6e6e6e;
    white-space: pre-wrap;
}

.terminal-line.error {
    color: #ff5f56;
}

.terminal-line.references {
    font-size: 12px;
    color: #8a8a8a;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.terminal-line.references::before {
    content: '\21B3';
    color: #555;
}

.terminal-line.references a {
    color: #8a8a8a;
}

.terminal-line a {
    color: #c9c9c9;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.terminal-line a:hover {
    color: #FFD700;
    text-decoration-style: solid;
}

.prompt {
    color: #FFD700;
    margin-right: 8px;
}

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

.terminal-input {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #f5f5f5;
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none !important;
    box-shadow: none !important;
    caret-color: #FFD700;
    padding: 0;
    margin: 0;
}

.terminal-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.terminal-input::placeholder {
    color: #555;
}

/* Send button. Small gold circle with a send glyph. */
.terminal-send {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #FFD700;
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.terminal-send svg {
    width: 13px;
    height: 13px;
    display: block;
    margin-left: 1px;
}

.terminal-send:hover,
.terminal-send:focus-visible {
    background: #ffe44d;
    outline: none;
}

.terminal-send:active {
    transform: scale(0.92);
}

.loading::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Suggested commands */
.suggestions {
    margin-top: 20px;
}

.suggestions h4 {
    color: #888;
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestions li {
    background: #1a1a1a;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #aaa;
    cursor: pointer;
    border: 1px solid #333;
    transition: all 0.2s;
    animation: chip-in 0.25s ease;
}

.suggestions li:hover {
    background: #252525;
    border-color: #FFD700;
    color: #FFD700;
}

/* New chips fade in when a clicked suggestion is replaced */
@keyframes chip-in {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: none; }
}

/* Make the terminal fill the article on the landing page,
   and match that height on the Chirpy agent page. */
#about .terminal-body,
.agent-page .terminal-body {
    min-height: 400px;
}
