﻿body {
}


/* - Common ------------------------------------------------- */
h3 {
    margin-bottom: 0px;
}

.btn-mini {
    padding: 4px 4px 0px 4px;
    font-size: 90%;
}

.btn-icono {
    width: 30px;
    height: 28px;
}

    .btn-icono:focus {
        box-shadow: none;
    }



/* - Layout -------------------------------------------------- */
.app-Main {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

header {
    height: 52px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

main {
    flex: 1;
    overflow-y: hidden;
    min-height: 0;
    margin: 0px;
    padding: 8px;
}

footer {
    /*height: 64px;*/
    flex-shrink: 0;
    border-top: 1px solid gray;
}


/* - Menú ---------------------------------------------------- */
.app-header {
    background: #fff;
    padding: 14px 18px 0px;
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    border-bottom: 1px solid gray;
}

.app-title {
    flex: 1;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    width: 250px;
}


.app-menu {
    width: Calc(100% - 250px);
}

    .app-menu button {
        margin: 0 4px -1px 0;
        border: 1px solid black;
        border-radius: 5px 5px 0px 0px;
        position: relative;
        top: 0px;
        z-index: 9001;
    }

        .app-menu button:focus {
            box-shadow: none;
        }


.app-menu-selected {
    border-bottom: 1px solid white !important;
}


/* - Loader ------------------------------------------------- */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    width: 100vw;
    height: Calc(100dvh - 64px);
    justify-content: center;
    align-items: center;
}

.loading-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffffaa;
}

.loader .box {
    background-color: rgb(84, 84, 84);
    width: 220px;
    height: 220px;
    padding: 20px;
    border-radius: 20px;
    border: 5px solid gray;
    position: relative;
    overflow: hidden;
    box-shadow: 3px 4px 5px rgb(193, 193, 193);
}

    .loader .box .screen {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: black;
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        border-radius: 10px;
        padding: 10px;
        overflow: hidden;
    }

.screen .lightray-limit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    overflow: hidden;
    border-radius: 10px;
    background-color: #060;
}

.screen .lightray {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    width: 250%;
    height: 250%;
    background-image: radial-gradient(#ffffffa1, transparent, transparent);
    border-radius: 10px 10px 0 0;
}

.screen .loader-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    padding: 5px;
    border: 5px solid #0e0;
}

    .screen .loader-box .progress {
        width: 0;
        height: 5px;
        background-color: #0f0;
        animation: progress 5s infinite;
    }

.screen .loader-text {
    position: absolute;
    left: Calc(50% + 24px);
    top: Calc(50% + 30px);
    transform: translate(-50%, -50%);
    width: 70%;
    padding: 5px;
    color: #0f0;
}

.top-side {
    position: absolute;
    width: 100%;
    height: 100%;
    top: -55px;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 10px 10px 10px #1f1f1f8a;
    background-color: #1f1f1f8a;
}

.bottom-side {
    position: absolute;
    width: 100%;
    height: 100%;
    top: calc(100% + 60px);
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: -10px -10px 10px #a5a5a5;
    background-color: #a5a5a5;
}

@keyframes progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}


/* - Pantalla ------------------------------------------------------ */
.pantalla-main {
    display: flex;
    flex-direction: row;
    height: Calc(100vh - 40px);
    margin-top: -8px;
}

.pantalla-editor {
    flex: 1;
    overflow: scroll;
}

.pantalla-herramientas {
    flex-shrink: 0;
    overflow-y: scroll;
    border-left: 1px solid gray;
    padding: 8px;
    width: 300px;
}


.pantalla-explorador {
    border: 1px solid black;
    width: 100%;
    height: Calc(100% - 320px);
}


/* - ImageUploader --------------------------------------------------- */
.iu-drop-zone {
    width: 100%;
    padding: 32px;
    height: 130px;
}


/* - Visor SVG ---------------------------------------------------------- */
.svg-main {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.svg-herramientas {
    flex: 1;
    width: 100px;
}

    .svg-herramientas button {
        font-size: 80%;
        margin: 2px;
        padding: 2px 4px;
    }

.svg-container {
    flex-shrink: 0;
    margin: 4px;
    width: Calc(100% - 100px);
    height: Calc(100% - 40px);
    position: relative;
    text-align: center;
    overflow: auto;
}

.svg-capa {
    position: absolute;
    inset: 0;
}

.svg-capa-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.svg-capa-svg {
    display: block;
    width: 100%;
    height: 100%;
}


/* - Emulador ---------------------------------------------------------- */
.emu-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: Calc(100vh - 60px);
    overflow-y: scroll;
}

.emu-herramientas {
    height: 32px;
    padding: 4px;
}

    .emu-herramientas button {
        width: 27px;
        height: 27px;
        padding: 2px;
    }

        .emu-herramientas button:focus {
            box-shadow: none;
        }

.svg-herramientas button {
    font-size: 80%;
    margin: 2px;
    padding: 2px 4px;
}

.emu-container {
    flex: 0 0 auto;
    padding: 10px;
    position: relative;
    text-align: center;
}

.emu-stack {
    position: relative;
    width: 100%;
}

    .emu-stack img {
        width: 100%;
    }

    .emu-stack > .emu-capa:first-child {
        position: relative;
    }

    .emu-stack > .emu-capa:not(:first-child) {
        position: absolute;
        inset: 0;
    }

.emu-capa svg {
    display: block;
    width: 100%;
    height: auto;
}

.emu-debug{
    min-height: 80px;
}

.emu-controls {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 150px;
    width: 100%;
    text-align: center;
}


/* - Editor visual de código -------------------------------- */
.editor-main {
    width: 100%;
    height: 100%;
    padding: 4px 0px 4px 4px;
}

.subrutina-node {
    width: 200px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0px 4px 2px 4px;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    border: 1px solid black;
}

    .subrutina-node .titulo {
        flex: 1;
        font-weight: bold;
        overflow: hidden;
    }

        .subrutina-node .titulo i {
            position: relative;
            top: 5px;
            margin-right: 2px;
        }

    .subrutina-node .descripcion {
        white-space: normal;
        overflow: hidden;
    }

    .subrutina-node .pie {
        margin-top: 10px;
        font-size: 12px;
        color: #666;
    }


/* - Editor de código --------------------------------------- */
.code-main {
    height: Calc(100% - 50px);
    overflow-y: scroll;
    margin: 4px;
}

.code-tabla {
    width: 100%;
}

.code-icon {
    width: 22px;
    height: 22px;
    margin: 0px;
    padding: 0px;
}

.code-rem {
    color: green;
}

.code-modal {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    z-index: 100;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.code-modal-sentencia {
    flex: 1;
}

.code-modal-explicacion {
    flex: 0;
    min-height: 60px;
    border-top: 1px dashed gray;
}

.code-modal-tabla {
    width: 100%;
}

    .code-modal-tabla td {
        padding: 8px;
        vertical-align: top;
    }

.code-btn {
    display: block;
    width: 100px;
    margin: 2px;
    padding: 2px 4px;
}

.code-filtro-parametro {
    height: 46px;
}

.code-parametro button {
    position: relative;
    top: 10px;
    height: 38px;
    padding: 8px;
}

.code-btn-filtro {
    width: 60px;
    font-size: 80%;
    padding: 2px 4px;
}

.code-btn-sentencia {
    width: 120px;
    margin: 2px;
    padding: 2px 4px;
}

    .code-btn-sentencia i {
        position: relative;
        top: 4px;
    }

.code-patch-dropdown .rz-dropdown-label {
    visibility: visible !important;
    min-height: 22px;
}

.code-error {
    color: red;
}

.code-ok {
    color: green;
}

.code-comando {
    color: blue;
}

.code-comentario {
    color: green;
}

.code-condicional {
    color: magenta;
}

.code-asignacion {
    color: darkorange;
}

.code-currentPC {
    background-color: yellow;
}


/* - Controles -------------------------------------------------- */
.controles-tabla {
    width: 260px;
    margin: auto;
    margin-top: 8px;
    text-align: center;
}

    .controles-tabla td {
        min-width: 22px;
    }

.controles-cruceta {
    border: 1px solid black;
    width: 22px;
    height: 22px;
    text-align: center;
    cursor: pointer;
}

.controles-disparo {
    border: 1px solid black;
    width: 22px;
    height: 22px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
}

.controles-boton {
    border: 1px solid black;
    width: 90px;
    height: 22px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
}

    .controles-boton span {
        font-size: 50%;
    }

.controles-selected {
    background-color: black;
    color: white;
}


/* - Explorador de variables ----------------------------- */
.variables-tabla {
    width: 100%;
}

    .variables-tabla tbody tr:nth-child(odd) {
        background-color: #f8f9fa;
    }

    .variables-tabla tbody tr:nth-child(even) {
        background-color: #ffffff;
    }

.btn-variables-tipo {
    font-size: 80%;
    width: 100%;
    padding: 0px 2px;
}
