/*
 * Project: VNC TouchScreenTest WordPress
 * Version: 1.0.0
 * Changelog: Fully updated 261124.
 */

.vnc-tst,
.vnc-tst *,
.vnc-tst *::before,
.vnc-tst *::after {
    box-sizing: border-box;
}

.vnc-tst {
    --vnc-tst-bg: #121212;
    --vnc-tst-border: #444;
    --vnc-tst-cell: #2c2c2c;
    font-family: Verdana, Geneva, sans-serif;
    line-height: 1.45;
    color: #202939;
    width: 100%;
    margin: 1rem 0 1.5rem;
    isolation: isolate;
    position: relative;
}

.vnc-tst .vnc-tst-heading {
    margin: 0 0 0.75rem;
}

.vnc-tst .vnc-tst-description {
    margin: 0;
    font-size: 0.95rem;
    color: inherit;
}

.vnc-tst .vnc-tst-stage {
    --vnc-tst-safe-top: env(safe-area-inset-top, 0px);
    --vnc-tst-safe-right: env(safe-area-inset-right, 0px);
    --vnc-tst-safe-bottom: env(safe-area-inset-bottom, 0px);
    --vnc-tst-safe-left: env(safe-area-inset-left, 0px);
    position: relative;
    overflow: hidden;
    width: 100%;
    height: clamp(420px, 70svh, 720px);
    min-height: 420px;
    border: 1px solid #293244;
    border-radius: 10px;
    background: var(--vnc-tst-bg);
    color: #fff;
    contain: layout paint;
}

.vnc-tst .vnc-tst-grid {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100%;
    background: var(--vnc-tst-bg);
    touch-action: none;
    overscroll-behavior: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.vnc-tst .vnc-tst-cell {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--vnc-tst-border);
    border-bottom: 1px solid var(--vnc-tst-border);
    background: var(--vnc-tst-cell);
    color: #fff;
    font: 12px/1 Verdana, Geneva, sans-serif;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.vnc-tst .vnc-tst-cell.vnc-tst-cell--mouse {
    outline: 1px dashed #f9a826;
    outline-offset: -2px;
}

.vnc-tst .vnc-tst-brand,
.vnc-tst .vnc-tst-control {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    cursor: move;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.25);
    font-family: Verdana, Geneva, sans-serif;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    line-height: 1.2;
}

.vnc-tst .vnc-tst-brand {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 100px;
    width: min(350px, 65%);
    height: min(80px, 18vw);
    min-height: 48px;
    padding: 0 8px;
    background: #e00000;
    color: #ffff00;
    font-size: clamp(14px, 3.8vw, 34px);
    white-space: nowrap;
}

.vnc-tst .vnc-tst-control {
    right: 16px;
    width: 100px;
    min-width: 80px;
    height: 50px;
    min-height: 44px;
    padding: 4px 8px;
    border: 0;
    background: #e91e63;
    color: #fff;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    text-transform: none;
    opacity: 1;
}

.vnc-tst .vnc-tst-reset {
    top: 16px;
}

.vnc-tst .vnc-tst-full {
    top: 76px;
}

.vnc-tst .vnc-tst-control:hover,
.vnc-tst .vnc-tst-control:focus-visible {
    background: #c2185b;
    color: #fff;
}

.vnc-tst .vnc-tst-control:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.vnc-tst .vnc-tst-brand.vnc-tst--dragging,
.vnc-tst .vnc-tst-control.vnc-tst--dragging {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.vnc-tst .vnc-tst-toast {
    position: absolute;
    z-index: 3;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font: 13px/1.45 Verdana, Geneva, sans-serif;
    text-align: center;
    pointer-events: none;
}

.vnc-tst .vnc-tst-toast[hidden] {
    display: none;
}

.vnc-tst .vnc-tst-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    justify-content: space-between;
    margin: 10px 0 5px;
    padding: 9px 12px;
    border: 1px solid #dce1e8;
    border-radius: 7px;
    background: #f7f9fb;
    color: #202939;
    font-size: 13px;
}

.vnc-tst .vnc-tst-notice,
.vnc-tst .vnc-tst-hint {
    margin: 6px 0 0;
    color: #384457;
    font-size: 13px;
}

.vnc-tst:fullscreen {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--vnc-tst-bg);
}

.vnc-tst.vnc-tst--expanded {
    position: fixed !important;
    top: var(--vnc-tst-visible-top, 0px);
    left: var(--vnc-tst-visible-left, 0px);
    right: auto;
    bottom: auto;
    width: var(--vnc-tst-visible-width, 100vw);
    height: var(--vnc-tst-visible-height, 100dvh);
    z-index: 2147483646;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--vnc-tst-bg);
}

.vnc-tst:fullscreen .vnc-tst-heading,
.vnc-tst:fullscreen .vnc-tst-stats,
.vnc-tst:fullscreen .vnc-tst-notice,
.vnc-tst:fullscreen .vnc-tst-hint,
.vnc-tst.vnc-tst--expanded .vnc-tst-heading,
.vnc-tst.vnc-tst--expanded .vnc-tst-stats,
.vnc-tst.vnc-tst--expanded .vnc-tst-notice,
.vnc-tst.vnc-tst--expanded .vnc-tst-hint {
    display: none;
}

.vnc-tst:fullscreen .vnc-tst-stage,
.vnc-tst.vnc-tst--expanded .vnc-tst-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
}

@media (max-width: 600px) {
    .vnc-tst .vnc-tst-stage {
        min-height: 360px;
        height: 66svh;
    }

    .vnc-tst .vnc-tst-brand {
        width: min(230px, 62%);
        height: 54px;
        font-size: clamp(12px, 4.3vw, 20px);
    }

    .vnc-tst .vnc-tst-control {
        right: 8px;
        width: 80px;
        height: 44px;
        font-size: 14px;
    }

    .vnc-tst .vnc-tst-reset {
        top: calc(12px + env(safe-area-inset-top, 0px));
        bottom: auto;
    }

    .vnc-tst .vnc-tst-full {
        top: calc(64px + env(safe-area-inset-top, 0px));
        bottom: auto;
    }
}

@media (pointer: coarse) and (orientation: landscape) {
    .vnc-tst .vnc-tst-reset {
        top: calc(12px + env(safe-area-inset-top, 0px));
        bottom: auto;
    }

    .vnc-tst .vnc-tst-full {
        top: calc(64px + env(safe-area-inset-top, 0px));
        bottom: auto;
    }
}
