/* Virtual Keyboard Styles */
.virtual-keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 20px;
    border-top: 2px solid #007bff;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.virtual-keyboard.show {
    transform: translateY(0);
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: white;
}

.keyboard-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.keyboard-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.keyboard-close:active {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.keyboard-layout {
    max-width: 1000px;
    margin: 0 auto;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.keyboard-key {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #555;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.keyboard-key:hover {
    background: linear-gradient(145deg, #444, #333);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.keyboard-key:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, #222, #111);
}

/* Special key styles */
.keyboard-key.wide {
    min-width: 80px;
}

.keyboard-key.extra-wide {
    min-width: 120px;
}

.keyboard-key.spacebar {
    min-width: 300px;
}

.keyboard-key.shift {
    background: linear-gradient(145deg, #007bff, #0056b3);
}

.keyboard-key.shift.active {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

.keyboard-key.caps {
    background: linear-gradient(145deg, #6f42c1, #5a32a3);
}

.keyboard-key.caps.active {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

.keyboard-key.enter {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

.keyboard-key.backspace {
    background: linear-gradient(145deg, #dc3545, #bd2130);
}

.keyboard-key.tab {
    background: linear-gradient(145deg, #6c757d, #545b62);
}

/* Responsive design */
@media (max-width: 768px) {
    .virtual-keyboard {
        padding: 15px;
    }
    
    .keyboard-key {
        padding: 10px 12px;
        min-width: 40px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .keyboard-key.wide {
        min-width: 60px;
    }
    
    .keyboard-key.extra-wide {
        min-width: 80px;
    }
    
    .keyboard-key.spacebar {
        min-width: 200px;
    }
    
    .keyboard-row {
        gap: 6px;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .keyboard-key {
        padding: 8px 10px;
        min-width: 35px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .keyboard-key.wide {
        min-width: 50px;
    }
    
    .keyboard-key.extra-wide {
        min-width: 60px;
    }
    
    .keyboard-key.spacebar {
        min-width: 150px;
    }
    
    .keyboard-row {
        gap: 4px;
        margin-bottom: 4px;
    }
}

/* Virtual keyboard toggle button - subtle and translucent */
.virtual-keyboard-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: rgba(108, 117, 125, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.4s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    opacity: 0.3;
}

.virtual-keyboard-toggle:hover {
    background: rgba(0, 123, 255, 0.15);
    color: rgba(0, 123, 255, 0.7);
    border-color: rgba(0, 123, 255, 0.2);
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.virtual-keyboard-toggle:active {
    transform: scale(0.95);
    opacity: 1;
}

.virtual-keyboard-toggle.active {
    background: rgba(40, 167, 69, 0.2);
    color: rgba(40, 167, 69, 0.8);
    border-color: rgba(40, 167, 69, 0.3);
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
}

/* Hide toggle when keyboard is visible on small screens */
@media (max-width: 768px) {
    .virtual-keyboard.show ~ .virtual-keyboard-toggle {
        display: none;
    }
}

/* Input field focus indicator when virtual keyboard is active */
.virtual-keyboard-active {
    outline: 2px solid #007bff !important;
    outline-offset: 2px;
}
