/* ============================================
   Malayalam virtual keyboard panel
   Used on the "Register as Prasudenthi" modal
   (en/prasudenthimar.php, ml/prasudenthimar.php)
   ============================================ */

/* Floating overlay -- anchored to whichever field's .ml-input-wrap it's
   currently moved into (see js/ml-virtual-keyboard.js open()), so it never
   takes up layout space or pushes the rest of the form. */
.ml-keyboard-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 25;
    margin: 2px 0 0.75rem;
    border: 1px solid #d5e2f5;
    border-radius: 10px;
    background: #f7f9fd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.ml-keyboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: #eef3fb;
    border-bottom: 1px solid #d5e2f5;
}

.ml-keyboard-title {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sj-blue, #2b5a9e);
}

.ml-keyboard-close {
    padding: 0 0.25rem;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
}

.ml-keyboard-close:hover {
    color: var(--sj-blue, #2b5a9e);
}

.ml-keyboard-body {
    max-height: 240px;
    padding: 0.5rem 0.6rem 0.6rem;
    overflow-y: auto;
}

.ml-keyboard-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.ml-keyboard-row:last-child {
    margin-bottom: 0;
}

.ml-keyboard-row-label {
    flex: 0 0 62px;
    padding-top: 0.35rem;
    font-size: 0.62rem;
    font-weight: 600;
    color: #8592a6;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ml-keyboard-keys {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.ml-keyboard-key {
    min-width: 30px;
    height: 30px;
    padding: 0 0.35rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1;
    color: #24314f;
    background: #fff;
    border: 1px solid #d5e2f5;
    border-radius: 6px;
    cursor: pointer;
}

.ml-keyboard-key:hover,
.ml-keyboard-key:active {
    color: #fff;
    background: var(--sj-blue, #2b5a9e);
    border-color: var(--sj-blue, #2b5a9e);
}

.ml-keyboard-actions {
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.ml-keyboard-key-wide {
    min-width: 84px;
    font-size: 0.72rem;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .ml-keyboard-row {
        flex-direction: column;
        gap: 0.2rem;
    }

    .ml-keyboard-row-label {
        flex: none;
        padding-top: 0;
    }

    .ml-keyboard-key {
        min-width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .ml-keyboard-key-wide {
        flex: 1;
        min-width: 30%;
    }

    .ml-keyboard-body {
        max-height: 260px;
    }
}
