


/* Custom QWERTY Keyboard Styles */

.keyboard-container {
    width: 100%;
    background-color: #d1d5db;
    padding: 2px 0; /* Vertical padding 2px, Horizontal 0 for edge-to-edge */
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 0 1px; /* Minimal padding to ensure outer borders show */
}

/* Increased specificity to override generic modal button styles */
.keyboard-container .key-btn {
    flex: 1;
    height: 48px; /* Slightly taller for easier tapping */
    background-color: #ffffff;
    border: 1px solid #888;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0.2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    padding: 0; /* Maximize space for text */
    min-width: 0; /* Allow shrinking if needed */
}

.keyboard-container .key-btn:active, 
.keyboard-container .key-btn.active {
    background-color: #3b82f6; /* Blue for active modifier */
    color: white;
    transform: translateY(1px);
}

/* Specific styling for function keys */
.keyboard-container .key-function {
    background-color: #e5e7eb;
    font-size: 16px;
    flex: 1.5; /* Wider than normal keys */
}

/* Override: Shift key moved to main grid, so it should be same width as letters */
.keyboard-container button[data-action="shift"] {
    flex: 1;
}

/* Override: Symbol key fills the space left by Shift */
.keyboard-container button[data-action="symbol"] {
    flex: 3;
}

.keyboard-container .key-space {
    flex: 4.5; /* Takes up remaining space in the middle to align with top rows */
}

.keyboard-container .key-backspace {
    background-color: #eab308; /* Yellow/Orange */
    color: black;
    font-size: 20px;
    flex: 1.25; /* Match width of clear key */
}
.keyboard-container .key-backspace:active {
    background-color: #ca8a04;
}

.keyboard-container .key-clear {
    background-color: #dc3545; /* Red */
    color: white;
    font-size: 20px;
    flex: 1.25;
}
.keyboard-container .key-clear:active {
    background-color: #c82333;
}

/* Specific styling for the prompt dialog layout */
#prompt-keyboard-container, #search-keyboard-container {
    width: 100%;
}

/* Ensure the keyboard is pinned to the bottom in flex layouts */
.fullscreen-dialog {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #f3f4f6;
}

.dialog-header {
    padding: 15px;
    background-color: #fff;
    flex-shrink: 0;
}

.dialog-actions {
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    justify-content: space-around;
    background-color: #f3f4f6;
    margin-top: auto; /* Push to bottom just above keyboard */
    flex-shrink: 0;
}

.dialog-actions button {
    flex: 1;
    padding: 12px;
}