/* SSH Console styles — covers both standalone /ssh-console page and ViewItem embed */

/* ── Shared connect panel ────────────────────────────────────────────────── */
.ssh-connect-panel {
    max-width: 480px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px 28px;
    color: #d4d4d4;
    margin: 16px 0;
}

.ssh-field-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.ssh-field-row label {
    width: 80px;
    font-size: 13px;
    color: #9cdcfe;
    flex-shrink: 0;
}

.ssh-field-row input,
.ssh-field-row select {
    flex: 1;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    color: #d4d4d4;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
}

.ssh-field-row input:focus,
.ssh-field-row select:focus {
    outline: none;
    border-color: #569cd6;
}

.ssh-error {
    background: #3a1a1a;
    border: 1px solid #f44747;
    border-radius: 4px;
    color: #f44747;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.ssh-btn-connect {
    background: #0e639c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
}
.ssh-btn-connect:hover    { background: #1177bb; }
.ssh-btn-connect:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Toolbar + disconnect button ─────────────────────────────────────────── */
.ssh-terminal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #252526;
    border: 1px solid #333;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 6px 14px;
    flex-shrink: 0;
}

.ssh-terminal-title {
    color: #4ec9b0;
    font-family: monospace;
    font-size: 13px;
}

.ssh-btn-disconnect {
    background: #5a1e1e;
    color: #f44747;
    border: 1px solid #7a2e2e;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}
.ssh-btn-disconnect:hover { background: #7a2e2e; }

/* ── ViewItem embed (fills XAF detail view) ──────────────────────────────── */
.ssh-terminal-viewitem {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    padding: 8px 16px;
}

.ssh-terminal-embed {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ssh-xterm-div {
    flex: 1;
    border: 1px solid #333;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: #1e1e1e;
    min-height: 0;
}

/* ── Standalone /ssh-console page ────────────────────────────────────────── */
.ssh-console-page {
    padding: 24px;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

#ssh-terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#ssh-terminal {
    flex: 1;
    border: 1px solid #333;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: #1e1e1e;
}

/* ── xterm overrides ─────────────────────────────────────────────────────── */
.ssh-xterm-div .xterm,
#ssh-terminal .xterm          { height: 100% !important; }
.ssh-xterm-div .xterm-viewport,
#ssh-terminal .xterm-viewport { overflow-y: auto !important; }

