/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Label/tag denoting the user that shared a connection */
.jdbc-share-tag {

    background: #0095ff;
    padding: 0.25em;

    -moz-border-radius:    0.25em;
    -webkit-border-radius: 0.25em;
    -khtml-border-radius:  0.25em;
    border-radius:         0.25em;

    color: white;
    font-size: 0.75em;
    font-weight: bold;

}
guac-client-statistics{font-size:13px;color:white;background:#111}guac-client-statistics dl.client-statistics{display:table;margin:0;padding:.25em}guac-client-statistics dl.client-statistics dt,guac-client-statistics dl.client-statistics dd{display:table-cell;padding:.25em}guac-client-statistics dl.client-statistics dt{padding-right:.5em;padding-left:1em}guac-client-statistics dl.client-statistics dt:first-child{padding-left:.5em}guac-client-statistics dl.client-statistics dd{min-width:6em;border:1px solid rgba(255,255,255,0.125);border-radius:3px;background:black}guac-client-statistics dl.client-statistics dd.no-value::before{color:#888;content:'-'}/* Unagi login: one dark card, nothing that names the software or its version. */

/* "div." to outrank Guacamole's own div.login-ui { background: white }. */
div.login-ui {
    background: #0e1014;
}

.login-ui .login-dialog {
    background: #161920;
    color: #e7e9ee;
    border: 1px solid #262b36;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    width: calc(100vw - 2.5em);
    max-width: 22em;
    padding: 2em 1.5em 1.5em;
}

.login-ui .login-dialog .logo,
.login-ui .login-dialog .version .version-number {
    display: none;
}

.login-ui .login-dialog .version .app-name {
    text-transform: none;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.75em;
    color: #e7e9ee;
}

/*
 * Guacamole draws each field's name as a fake placeholder behind a
 * see-through input. Keep the input see-through (also on focus, where
 * Guacamole turns it white), paint the box on the field instead, line the
 * name up with the typed text, and hide the name once something is typed.
 */
div.login-ui .login-fields .labeled-field {
    background: #0e1014;
    border-radius: 10px;
    margin-bottom: 0.75em;
}

div.login-ui .login-fields .labeled-field input,
div.login-ui .login-fields .labeled-field input:focus,
div.login-ui .login-fields .labeled-field.empty input {
    background: transparent;
    color: #e7e9ee;
    border: 1px solid #2d3341;
    border-radius: 10px;
    padding: 0.8em 0.9em;
    margin: 0;
    /* 16px or larger stops iPhone Safari zooming into the field. */
    font-size: 16px;
    line-height: 1.25;
    box-sizing: border-box;
    width: 100%;
}

div.login-ui .login-fields .labeled-field input:focus {
    border-color: #4f8cff;
    outline: none;
}

div.login-ui .login-fields .labeled-field .field-header {
    top: 1px;
    left: 1px;
    margin: 0;
    padding: 0.8em 0.9em;
    font-size: 16px;
    line-height: 1.25;
    color: #8b93a5;
    opacity: 1;
    text-align: left;
}

div.login-ui .login-fields .labeled-field:not(.empty) .field-header {
    display: none;
}

.login-ui .buttons input[type="submit"] {
    width: 100%;
    background: #3b6fe0;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.8em;
    font-size: 16px;
    font-weight: 600;
    box-shadow: none;
}

.login-ui .buttons input[type="submit"]:hover {
    background: #4f80ef;
}

.login-ui p.login-error {
    background: #3a1d22;
    color: #ffb4bd;
    border-radius: 10px;
}
/* Unagi connection bar: a floating button (drag anywhere) that opens the toolbar. */

/*
 * The bar is a see-through layer over the whole screen: only the floating
 * button and the panels catch taps, everything else reaches the desktop.
 */
.unagi-bar {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

.unagi-fab {
    position: absolute;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(22, 25, 32, 0.72);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #e7e9ee;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    opacity: 0.75;
    touch-action: none;
    pointer-events: auto;
    transition: left 0.18s ease-out, top 0.18s ease-out, opacity 0.15s;
}

.unagi-fab.open,
.unagi-fab.dragging {
    opacity: 1;
}

.unagi-fab.dragging {
    transition: none;
}

.unagi-fab.open {
    border-color: #4f8cff;
    color: #9fc0ff;
}

.unagi-fab svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.unagi-panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: calc(100vw - 12px);
}

.unagi-display {
    pointer-events: auto;
    width: min(calc(100vw - 12px), 340px);
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(22, 25, 32, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #e7e9ee;
    font-size: 12px;
}

.unagi-display-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: #aeb6c6;
}

.unagi-display-head strong {
    color: #e7e9ee;
    font-size: 15px;
}

.unagi-display input[type="range"] {
    width: 100%;
    margin: 12px 0 6px;
    accent-color: #4f8cff;
}

.unagi-display-info {
    color: #aeb6c6;
    text-align: center;
    margin-bottom: 10px;
}

.unagi-bar .unagi-display button.unagi-apply {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: #3b6fe0;
    color: #fff;
    font-weight: 600;
}

.unagi-bar .unagi-display button.unagi-apply[disabled] {
    background: rgba(255, 255, 255, 0.08);
    color: #7d8597;
}

.unagi-row,
.unagi-keys {
    pointer-events: auto;
}

.unagi-bar button {
    /* Undo Guacamole's global button margin/min-width. */
    margin: 0;
    min-width: 0;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    font: inherit;
    cursor: pointer;
}




.unagi-row,
.unagi-keys {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: calc(100vw - 12px);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(22, 25, 32, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.unagi-row button {
    width: 48px;
    height: 48px;
    padding: 4px 0 2px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #e7e9ee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
}

.unagi-row svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.unagi-keys {
    gap: 4px;
    max-width: min(calc(100vw - 12px), 360px);
}

.unagi-bar .unagi-keys button {
    min-width: 44px;
    height: 38px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: #e7e9ee;
    font-size: 13px;
}

.unagi-keys button.wide {
    padding: 0 14px;
}

.unagi-row button:active,
.unagi-keys button:active {
    background: rgba(255, 255, 255, 0.14);
}

.unagi-row button.on,
.unagi-keys button.on {
    background: rgba(79, 140, 255, 0.28);
    color: #cfe0ff;
}

.unagi-bar .unagi-row button.unagi-danger {
    color: #ff9aa6;
}

.unagi-accessory {
    position: fixed;
    left: 0;
    right: 0;
    height: 44px;
    padding: 4px 6px;
    box-sizing: border-box;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    pointer-events: auto;
    background: rgba(28, 31, 39, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.unagi-accessory::-webkit-scrollbar {
    display: none;
}

.unagi-bar .unagi-accessory button {
    flex: 0 0 auto;
    min-width: 42px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: #e7e9ee;
    font-size: 14px;
}

.unagi-bar .unagi-accessory button.on {
    background: rgba(79, 140, 255, 0.32);
    color: #cfe0ff;
}

.unagi-bar .unagi-accessory button.done {
    position: sticky;
    right: 0;
    background: rgba(40, 44, 54, 1);
}

.unagi-accessory svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/*
 * Keyboard: our button drives Guacamole's text-input mode; its own bar is
 * hidden (our rows replace it) but its textarea must stay focusable so the
 * phone keyboard can open: see-through, not display:none (iOS won't focus
 * that). It also needs a real on-screen size: Guacamole.InputSink takes the
 * focus away on every key press from any focused field whose box is empty
 * or off-screen (InputSink.js refocusSink), which closed the keyboard.
 */
.client-bottom .text-input-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 160px;
    height: 40px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.client-bottom .text-input-container .text-input-buttons {
    display: none;
}
