.h-full, .h-100 {
    height: 100% !important;
}

.w-full, .w-100 {
    width: 100% !important;
}

/* Scan / keyboard input field: highlight the active (focused) field */
.scan-input:focus-within {
    border-radius: 4px;
    outline: 2px solid var(--mud-palette-primary, #594AE2);
    outline-offset: 2px;
    background-color: rgba(89, 74, 226, 0.06);
}

/* Shared containment for the page-local manual-entry keyboards. */
.adjustment-text-keyboard,
.move-text-keyboard,
.st-text-keyboard,
.st-prompt-text-keyboard,
.adjustment-text-keyboard-row,
.move-text-keyboard-row,
.st-text-keyboard-row,
.st-prompt-text-keyboard-row {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

.adjustment-text-keyboard,
.move-text-keyboard,
.st-text-keyboard,
.st-prompt-text-keyboard {
    overflow-x: clip;
    width: 100%;
}

.adjustment-text-keyboard-key,
.move-text-keyboard-key,
.st-text-keyboard-key,
.st-prompt-key {
    min-width: 0 !important;
    max-width: 100%;
    width: 100%;
}

/* Ten fixed columns become too small to use in narrow mobile containers. */
@media (max-width: 480px) {
    .adjustment-text-keyboard-row:not(.adjustment-text-keyboard-actions),
    .move-text-keyboard-row:not(.move-text-keyboard-actions),
    .st-text-keyboard-row:not(.st-text-keyboard-actions),
    .st-prompt-text-keyboard-row:not(.st-prompt-text-keyboard-actions) {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .move-text-keyboard-actions,
    .st-text-keyboard-actions,
    .st-prompt-text-keyboard-actions {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.5rem), 1fr)) !important;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .adjustment-text-keyboard-key,
    .move-text-keyboard-key,
    .st-text-keyboard-key,
    .st-prompt-key {
        min-height: 2.25rem !important;
    }
}

.keyboard-dialog {
    box-sizing: border-box;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem);
    max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 2rem);
}

.keyboard-dialog .mud-dialog-content {
    min-width: 0;
    overflow-x: clip;
    overflow-y: auto;
}

.mud-main-content {
    height: 100vh !important;
}