/**
 * Agent Terminal Viewer Styles
 * Displays in the stage area of ODE Meet
 */

/* Terminal container in stage */
.stage-terminal {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0d1117;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.5rem;
}

.stage-terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.stage-terminal-header .agent-name {
    font-weight: 600;
    color: #58a6ff;
}

.stage-terminal-header .session-name {
    font-size: 0.85rem;
    color: #8b949e;
    font-family: monospace;
}

.stage-terminal-header .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3fb950;
    margin-left: auto;
}

.stage-terminal-header .status-indicator.disconnected {
    background: #f85149;
}

.stage-terminal-body {
    flex: 1;
    overflow: hidden;
}

.stage-terminal-body .xterm {
    height: 100%;
    padding: 0.5rem;
}

/* Terminal tabs when multiple agents share */
.stage-terminal-tabs {
    display: flex;
    gap: 2px;
    background: #0d1117;
    padding: 0.25rem 0.5rem;
    overflow-x: auto;
}

.stage-terminal-tab {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stage-terminal-tab:hover {
    background: #21262d;
    color: #c9d1d9;
}

.stage-terminal-tab.active {
    background: #161b22;
    color: #f0f6fc;
}

.stage-terminal-tab .agent-icon {
    font-size: 1rem;
}

.stage-terminal-tab .close-btn {
    font-size: 0.75rem;
    opacity: 0.6;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.stage-terminal-tab .close-btn:hover {
    opacity: 1;
    background: #f8514933;
}

/* Split view - terminal + desktop */
.stage-split {
    display: flex;
    flex: 1;
    gap: 2px;
}

.stage-split > * {
    flex: 1;
    min-width: 0;
}

/* Desktop/GUI view via VNC */
.stage-desktop {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.5rem;
}

.stage-desktop-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #252542;
    border-bottom: 1px solid #3a3a5c;
}

.stage-desktop-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a14;
}

.stage-desktop-body canvas,
.stage-desktop-body iframe {
    max-width: 100%;
    max-height: 100%;
}

/* Stage mode selector */
.stage-mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.stage-mode-btn {
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border-color, #30363d);
    color: var(--text-secondary, #8b949e);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.stage-mode-btn:hover {
    background: var(--bg-hover, #21262d);
}

.stage-mode-btn.active {
    background: var(--accent, #6366f1);
    border-color: var(--accent, #6366f1);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .stage-split {
        flex-direction: column;
    }
}
