@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800;900;400&display=swap');

*{
    margin: 0;
}   

body{
    background-color: rgb(240,217,228);
}

#titulo {
    margin: 5vh 0vh;
    text-align: center;
    color: rgb(22,19,31);
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
}

#calculadora{
    width: 30%;
    min-width: 300px;
    background-color: rgb(250, 237,245);
    box-shadow: 1px 2px 15px rgba(0, 0, 0, 0.182);
    margin: 0 auto;
    border-radius: 20px;
    padding: 3rem 1.5rem;
}

#pantalla{
    height: 10vh;  
    font-size: 1.9rem;
    font-family: 'Orbitron', sans-serif;
    color: rgb(240,217,228);
    background-color: rgb(22,19,31);
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.474);
    padding: 0 0.7rem;
    margin-bottom: 2rem;
    border-radius: 10px;

    overflow-x: scroll; /*genera y reserva el espacio donde va situado el scroll, así, no hay saltos al aparecer con 'auto'*/
    overflow-y: hidden; 
    text-align: right;
    display: flex; /*debe ser flex, para que las propiedades flex del hijo "subpantalla" surjan efecto*/
    
}

::-webkit-scrollbar{ 
    height: 10px;
}

::-webkit-scrollbar-track{
    background-color: transparent;
}

::-webkit-scrollbar-thumb{
    background-color:   rgb(128, 108, 121);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:active{
    background-color: rgba(128, 108, 121, 0.758);
}

#subpantalla{
    display: flex;
    flex-direction: column; 
    flex-grow: 1; /*ocupa todo el alto disponible, para que solucion-container pueda ocupar el mismo, cuando operacion-container tenga display.none*/
}

#operacion-container{
    width: fit-content;
    font-size: 1rem;
    padding-top: 0.3rem;
    color: rgba(240, 217, 228, 0.62);
    white-space: nowrap;
    min-width: 100%;
}

#solucion-container{
    width: fit-content;
    padding-bottom: 0.6rem;
    letter-spacing: 2px; /*añade espaciado entre las letras*/
    min-width: 100%;
}

#operacion-container, #solucion-container{
    display:flex;
    flex: 1;
    justify-content: flex-end; /*se coloca al final horizontalmente (derecha)*/
    align-items: flex-end; /*se coloca en la parte inferior verticalmente (abajo)*/
    min-width: 100%; /*para que los span puedan colocarse en la parte inferior derecha de la pantalla*/
    
}

.cursor{
    width: 0.6em; /*span más estrecho que el cursor*/
    overflow: hidden; /*lo que sobresale se oculta, resultado: barra más corta*/
    animation: blink 1s infinite;
}

@keyframes blink{ /*parpadeo del cursor */
    0%, 50%{
        opacity: 1;
    }

    51%, 100%{
        opacity: 0;
    }
}

#teclado{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr; /*4 columnas con mismo ancho, 1 fracción/botón*/
    gap: 0.4rem; /*espacio entre botones*/
}

#teclado button{
    box-shadow: 4px  3px 4px rgba(0, 0, 0, 0.55),
                inset 1px 1px 5px rgba(255, 255, 255, 0.273);
    font-size: 27px;
    cursor: pointer;
    border-radius: 50px;
    border: 0px;
    padding: 1rem 0;
    transition-duration: 0.2s;
}

#teclado button:active{
    box-shadow: 1px 1px 1px rgb(0, 0, 0);   
}

.boton-primario{
    background-color:  rgb(223, 190, 202);
    color: rgb(22,19,31);
    font-family: 'Orbitron', sans-serif;
}

.boton-secundario{
    background-color: rgb(168, 148, 161);
    color: rgb(240,217,228);
}

button#botonIgual{
    grid-column: span 2; /*grid-column-start:3; grid-column-end: 5*/
    background-color: rgb(128, 108, 121);
    color: rgb(240,217,228);
}