/* SilverTests HTML Editor — upgrade pack v1 */

/* ---------- Консоль под превью ---------- */
.st-console {
    border-top: 1px solid #444;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.st-console-header {
    background: #252525;
    color: #888;
    font-size: 12px;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.st-console-actions button {
    background: none;
    border: 1px solid #555;
    color: #aaa;
    font-size: 11px;
    border-radius: 3px;
    padding: 2px 8px;
    margin-left: 6px;
    cursor: pointer;
}

.st-console-actions button:hover {
    background: #333;
}

.st-console-body {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-variant-ligatures: none;
    font-size: 12px;
    padding: 4px 10px;
    height: 130px;
    overflow-y: auto;
}

.st-console.st-collapsed .st-console-body {
    display: none;
}

.st-console-line {
    padding: 1px 0;
    white-space: pre-wrap;
    word-break: break-word;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.st-log   { color: #ddd; }
.st-info  { color: #90caf9; }
.st-warn  { color: #ffd93d; }
.st-error { color: #ff6b6b; }

/* ---------- Тосты ---------- */
.st-toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.st-toast {
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #555;
    border-left: 3px solid #4a7ba6; /* ink-акцент платформы */
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s, transform .25s;
    max-width: 360px;
}

.st-toast.st-show {
    opacity: 1;
    transform: translateY(0);
}

.st-toast a {
    color: #90caf9;
}

.st-toast button {
    background: #2f5578;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    margin-left: 6px;
    cursor: pointer;
    font-size: 12px;
}

/* ---------- Сплиттер редактор/превью ---------- */
.st-split {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    z-index: 50;
    background: transparent;
    transition: background .15s;
}

.st-split:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Мелочи тулбара ---------- */
select.st-templates {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='6'><path d='M0 0h8L4 6z' fill='%23aaa'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.toolbar-btn.st-on {
    background: #2f5578;
    border-color: #2f5578;
    color: #fff;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
    section {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .sidebar-ad {
        display: none;
    }

    .main-content {
        grid-template-columns: 1fr !important;
    }

    .st-split {
        display: none;
    }

    .CodeMirror {
        height: 45vh !important;
    }

    #preview.desktop {
        height: 40vh !important;
    }

    #preview.tablet,
    #preview.mobile {
        max-width: 100%;
    }

    .st-console-body {
        height: 90px;
    }

    .preview-toolbar,
    .editor-toolbar {
        flex-wrap: wrap;
    }
}
