﻿.webtty-page {
    height: 85dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* главное: не даём странице скроллиться из-за терминала */
}

.webtty-toolbar {
    height: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px; /* было больше — делаем компактнее */
    border-radius: 12px;
}

.webtty-toolbar .btn,
.webtty-toolbar button {
    font-size: 11px;
    padding: 8px 14px; /* компактнее */
    border-radius: 12px;
    min-height: 34px;
}

.webtty-status {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.9;
}

.webtty-host {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: #000;
}
/* xterm itself renders inside, but we ensure the container can be focused by click */
.webtty-host:focus {
    outline: 2px solid rgba(255,255,255,0.15);
    outline-offset: 2px;
}

.webtty-muted {
    opacity: 0.75;
    font-size: 12px;
}

.webtty-settings-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 10px 16px;
    align-items: center;
}

.webtty-settings-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .webtty-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* 1) ВВОД ДОЛЖЕН ЖИТЬ: helper textarea НЕ скрываем visibility */
.webtty-host .xterm .xterm-helper-textarea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    visibility: visible !important; /* КЛЮЧЕВО */
    pointer-events: auto !important; /* пусть живёт */
    z-index: -1 !important;
}

/* 2) Остальное можно прятать, как ты хотел */
.webtty-host .xterm .xterm-char-measure-element,
.webtty-host .xterm .xterm-accessibility,
.webtty-host .xterm .xterm-accessibility-tree {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}