/* Styles for the on-screen Devanagari/Gujarati keyboard panel that devanagari-keyboard.js appends
   to <body>. Kept as a global stylesheet (loaded from App.razor) so the panel is styled on ANY
   page that opens it - the registration form, school onboarding, and the Attendance name-correction
   editor - not only the page whose component happens to be rendered. */

/* The ⌨ trigger button shown next to a translit-enabled input (used on registration, onboarding,
   attendance name-correction, and branch regional-name fields). */
.dev-kbd-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 4;
    width: 30px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--primary-color, #478CFE);
    background: var(--white, #fff);
    color: var(--primary-color, #478CFE);
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.dvk-panel {
    position: fixed;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 2000;
    background: #2c7fb8;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    width: min(96vw, 470px);
    max-height: 70vh;
    overflow-y: auto;
}

.dvk-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 700;
    padding: 2px 4px 6px;
    cursor: move;
    user-select: none;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    background: #2c7fb8;
}

.dvk-head small {
    font-weight: 400;
    opacity: 0.8;
}

.dvk-row {
    display: flex;
    gap: 3px;
    margin-bottom: 3px;
}

/* flex: 1 1 0 makes every key in a row share the row width equally, so each row fills the
   panel edge-to-edge (no empty side space) and never wraps. */
.dvk-key {
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
    padding: 0 2px;
    border: 1px solid #1b5f8c;
    background: #3aa0d8;
    color: #fff;
    border-radius: 5px;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
}

.dvk-key:hover {
    background: #52b3e6;
}

.dvk-wide {
    flex-grow: 3;
}

.dvk-done {
    flex-grow: 2;
    background: #1f8a4c;
    border-color: #166b3a;
}

.dvk-x {
    width: 26px;
    height: 24px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

/* Phones / narrow screens: shorter keys and tighter spacing so the panel stays compact */
@media (max-width: 520px) {
    .dvk-panel {
        width: 98vw;
        padding: 4px;
    }

    .dvk-row {
        gap: 2px;
        margin-bottom: 2px;
    }

    .dvk-key {
        height: 30px;
        font-size: 0.9rem;
        border-radius: 4px;
    }
}
