:root {
    --touch-keyboard-bg: rgba(18, 18, 18, 0.96);
    --touch-keyboard-border: rgba(255, 255, 255, 0.08);
    --touch-keyboard-key-bg: rgba(39, 39, 39, 0.92);
    --touch-keyboard-key-bg-active: rgba(0, 122, 204, 0.7);
    --touch-keyboard-key-color: #f1f1f1;
    --touch-keyboard-key-secondary: rgba(255, 255, 255, 0.7);
}

.touch-keyboard-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 180ms ease-in-out;
    z-index: 6000;
    background: var(--touch-keyboard-bg);
    border-top: 1px solid var(--touch-keyboard-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    color: var(--touch-keyboard-key-color);
/*    font-family: "Oxanium", "Segoe UI", sans-serif;*/
    padding: 1.15rem 1.1rem 1.6rem;
    user-select: none;
}

.touch-keyboard-overlay.visible {
    transform: translateY(0);
}

.touch-keyboard {
    display: grid;
    gap: 0.35rem;
    width: 100%;
}

.touch-keyboard-row {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 0.35rem;
}

.touch-keyboard-key {
    appearance: none;
    border: none;
    border-radius: 0.6rem;
    background: var(--touch-keyboard-key-bg);
    color: var(--touch-keyboard-key-color);
    font-size: 1.35rem;
    padding: 0.85rem 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    text-transform: none;
    transition: background 120ms ease, transform 120ms ease, color 120ms ease;
    touch-action: manipulation;
    min-width: 2.5rem;
}

.touch-keyboard-key:active,
.touch-keyboard-key[data-active="true"] {
    background: var(--touch-keyboard-key-bg-active);
    transform: translateY(1px);
}

.touch-keyboard-key--wide {
    grid-column: span 2;
}

.touch-keyboard-key--space {
    grid-column: span 5;
}

.touch-keyboard-key--icon {
    font-size: 1.1rem;
}

.touch-keyboard-key--caps[data-state="on"],
.touch-keyboard-key--shift[data-state="on"] {
    background: rgba(0, 122, 204, 0.5);
}

.touch-keyboard-key--secondary {
    color: var(--touch-keyboard-key-secondary);
    font-size: 1.05rem;
}

.touch-keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    color: var(--touch-keyboard-key-secondary);
    font-size: 0.9rem;
}

.touch-keyboard-target-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70vw;
}

body.touch-keyboard-open .main-panel {
    padding-bottom: 19.5rem;
    transition: padding-bottom 180ms ease-in-out;
}





/* === MEDIA === */

/* WVGA / WVGA-Narrow (720x480, 800x480) */

@media (min-width: 700px) and (max-width: 880px) {
}

/* WSVGA / XGA (1024x600, 1024x768) */

@media (min-width: 881px) and (max-width: 1150px) {
}

/* WXGA / HD720 / SXGA (1280x720/800/1024) */

@media (min-width: 1151px) and (max-width: 1600px) {
}

/* HD / WUXGA (1920x1080, 1920x1200) */

@media (min-width: 1601px) and (max-width: 2879px) {
}

/* 4K (3840x2160) */

@media (min-width: 2880px) {

    .touch-keyboard-header span {
        font-size: 2.5rem;
    }

    .touch-keyboard-key {
        font-size: 2.5rem;
    }    
}
