main {
    flex: 1;
    width: 0;
}

.left {
    height: 100vh;
    width: 50%; 
}

.right {
    flex: 1;
    background-color: #ffffff;
    height: 100vh;
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 5.2rem; 
}

.right-top {
    background-color: #ffffff;
    height: 60vh;      
    min-height: 17vh; 
    max-height: 100vh; 
    overflow: hidden;
}

.right-bottom {
    flex: 1;
    background-color: #e0e0e0;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    min-height: 20vh;
}
.canvas{
    width: 44vw;
    height: 91vh; 
    overflow: hidden; 
    border: 1px solid gray;
}

@media (max-width: 640.98px){
.left {
    width: 100%; 
    height: 45%;
}

.right {
    flex: 1;
    width: 100%; 
    height: 100vh;
    padding-bottom: 0;
}

.right-top{
    height: 100vh;
}
.right-bottom {
    min-height: 0vh;
}
.canvas{
    width: 100%; 
    height: 42vh; 
    overflow: hidden; 
    border: 1px solid gray;
}
}
.no-select {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE 10+ */
    user-select: none;         /* Standard */
}

/*
 * Separador:
 */
.splitter {
    height: 2.5rem;
    cursor: ns-resize;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-left: 1px solid #6e6d6d;
    border-right: 1px solid #6e6d6d;
    touch-action: none;
    user-select: none;
    justify-content: flex-end;
    align-items: flex-start;
}

/* Estilos de tema para el separador */
.right.monaco-light-theme .splitter {
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.right.monaco-dark-theme .splitter {
    background-color: #333;
    border-top: 1px solid #444;
    border-bottom: 1px solid #222;
}

.right.monaco-high-contrast-black-theme .splitter {
    background-color: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #0a0a0a;
}

/* Contenedor de la pantalla dividida :
 */
#split-screen {
    display: flex;
    flex-direction: row;
    height: 100vh;
}
@media (max-width: 640.98px) {
    #split-screen {
        display: flex;
        flex-direction: column;
        height: 100vh;
        width: 87vw;
    }
}

.content {
    padding-top: 1.1rem;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    height: 100vh;
}

/*
 * Fila superior:
 */
.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row ::deep a,
.top-row ::deep .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.top-row ::deep a:hover,
.top-row ::deep .btn-link:hover {
    text-decoration: underline;
}

.top-row ::deep a:first-child {
    text-overflow: ellipsis;
}

/*
 * Media Query para móviles pequeños :
 */
@media (max-width: 640.98px) {
    .top-row:not(.auth) {
        display: none;
    }

    .top-row.auth {
        justify-content: space-between;
    }

    .top-row ::deep a,
    .top-row ::deep .btn-link {
        margin-left: 0;
    }
}

/*
 * Media Query para escritorio:
 */
@media (min-width: 641px) {
    .sidebar {
        width: 250px;     
        height: 100vh;     
        position: sticky;  
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth ::deep a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row,
    article {
        padding-left: 2rem !important; 
        padding-right: 1.5rem !important; 
    }
}


/* Diálogo flotante para guardar : */
.save-dialogue {
    position: absolute;
    top: 60%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 1000; 
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 300px;
    display: none;
}

.save-dialogue.visible {
    display: block; 
}

.save-dialogue::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(204, 204, 204, 0.5);
    z-index: -1;
}

.dialogue-buttons {
    display: flex;
    gap: 1rem;    
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.btn-primary.cancel {
    background-color: #dc3545; 
    border-color: #dc3545;
}

.btn-primary.accept {
    background-color: #28a745; 
    border-color: #28a745;
}

.btn.cancel:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn.accept:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.button-container {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    float: right;
    justify-content: flex-end;
}

/*
 * Íconos de Font Awesome (`.btn .fas`):
 * El `font-size` se cambió a `rem` (`1.25rem` que es 20px). Esto es esencial
 * para que los íconos escalen junto con el texto cuando el usuario hace zoom.
 */
.btn .fas {
    font-size: 1.25rem; /* Escala con el zoom y el tamaño de la fuente */
}