/* --- VIRTUAL KEYBOARD OVERLAY --- */
#virtual-keyboard-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000; /* Sopra a tutto, anche ai dialog */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

#virtual-keyboard-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.vk-container {
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    width: 900px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Display Input */
.vk-display {
    background: #111;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
}

#vk-input-display {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    outline: none;
    letter-spacing: 1px;
}

/* Griglia Tasti */
.vk-keys {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vk-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.vk-key {
    background: #333;
    color: #eee;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    flex-grow: 1;
    max-width: 80px; /* Larghezza standard per lettere */
}

/* Tasti Speciali */
.vk-key.wide { max-width: 120px; flex-grow: 1.5; font-size: 1rem; }
.vk-key.space { max-width: 400px; flex-grow: 4; }
.vk-key.action {
    background: #2196F3;
    color: white;
}

.vk-key.danger { background: #d32f2f; color: white; }

/* Stati Focus/Active */
.vk-key:focus, .vk-key:hover {
    outline: none;
    background: #eee;
    color: #111;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
    z-index: 1;
}

.vk-key.action:focus, .vk-key.action:hover {
    background: #64b5f6;
    color: white;
}

.vk-key.danger:focus, .vk-key.danger:hover {
    background: #ef5350;
    color: white;
}
