/* Editores principales (Blockly + CodeMirror) ================================================ */
:root {
    --code-divider-width: 6px;
}

#code-view,
#code-view>section,
#editors-section,
.editors-root,
.pane,
#editor-container {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

#code-view>section,
#editors-section,
.editors-root {
    flex: 1 1 auto;
}

#code-view>section {
    width: auto;
}

.editors-root {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
}

.pane {
    flex: 0 0 auto;
    width: calc((100% - var(--code-divider-width)) / 2);
    height: 100%;
}

.divider {
    flex: 0 0 var(--code-divider-width);
    cursor: col-resize;
    background: var(--color-grey);
    transition: all 200ms;
}

.divider:hover,
.divider:active {
    background: var(--color-orange);
}

#blocklyDiv {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#editor-container textarea,
#editor-container .CodeMirror {
    width: 100%;
    height: 100%;
}

#editor-container .CodeMirror {
    overflow: hidden;
}

#editor-container .CodeMirror-scroll {
    width: 100%;
    height: 100%;
    overscroll-behavior: contain;
}

/* Keep syntax token spans tied to CodeMirror font-size (global span styles set a fixed size). */
#editor-container .CodeMirror-code span {
    font-size: inherit;
}

#editor-container {
    position: relative;
    background: var(--color-black);
}

.editor-tools-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    bottom: 10px;
    right: 15px;
    gap: calc(var(--general-gap) * 1);
}

.editor-tools-container button img {
    width: calc(var(--icon-md) + 5px);
    height: calc(var(--icon-md) + 5px);
}

/* Estilos globales de las views */
.view-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    gap: 1.5rem;
    overflow: auto;
}

.view-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

}

@media screen and (max-width: 1200px) {
    .view-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media screen and (max-width: 576px) {

}