.teclado-virtual {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: #002867;
    padding: 1em 1.2em 1.4em;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
    transition: transform 0.25s ease;
}

.teclado-virtual.oculto {
    transform: translateY(100%);
    pointer-events: none;
}

.teclado-virtual .fila-teclado {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.teclado-virtual .fila-teclado:last-child {
    margin-bottom: 0;
}

.teclado-virtual .tecla {
    flex: 1;
    max-width: 4.2em;
    min-width: 2.4em;
    height: 3em;
    border: none;
    border-radius: 0.7em;
    background: #fff;
    color: #002867;
    font-size: 1.5em;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.teclado-virtual .tecla:active {
    background: #dbe3f0;
    transform: translateY(2px);
    box-shadow: none;
}

.teclado-virtual .tecla-especial {
    background: #16376e;
    color: #fff;
    flex: 1.4;
}

.teclado-virtual .tecla-borrar,
.teclado-virtual .tecla-mayus,
.teclado-virtual .tecla-espacio {
    background: #ccc;
    color: #002867;
}

.teclado-virtual .tecla-mayus .icono-mayus,
.teclado-virtual .tecla-borrar .icono-borrar {
    font-size: 1.6em;
    font-weight: bold;
}

.teclado-virtual .tecla-mayus.activa {
    background: #dc7d02;
    color: #fff;
}

.teclado-virtual .tecla-cerrar {
    flex: 1;
    max-width: none;
    background: #dc7d02;
    color: #fff;
    font-size: 1.4em;
    font-weight: bold;
    text-transform: uppercase;
}

.teclado-virtual[data-tipo="qwerty"] .tecla-cerrar,
.teclado-virtual[data-tipo="qwerty"] .tecla-espacio {
    flex: 0 0 auto;
    max-width: none;
    width: calc(4.2em * 2 + 0.5em);
}

.teclado-virtual[data-tipo="qwerty"].con-espacio .tecla-cerrar,
.teclado-virtual[data-tipo="qwerty"] .tecla-espacio {
    width: calc(4.2em * 3 + 1em);
}

.teclado-virtual[data-tipo="numerico"] .fila-teclado {
    max-width: 18em;
    margin-inline: auto;
}

.teclado-virtual[data-tipo="numerico"] .tecla {
    max-width: none;
    font-size: 1.8em;
}

.teclado-virtual[data-tipo="numerico"] .tecla-especial {
    flex: 1;
}
