/*
 * xLight VNC — glassy compact theme (2026-11-30)
 *
 * Loaded LAST in vnc.html, after base.css / input.css / audio.css,
 * so these rules win without rewriting the upstream stylesheets.
 * Visual / sizing overrides only: no element IDs, classes used by
 * JS, setting keys, labels or behaviour are changed here.
 *
 * Palette: amber accent #FFB020, navy #0F2A44, near-black base.
 */

:root {
    --xlight-amber: #FFB020;
    --xlight-amber-light: #FFC53D;
    --xlight-amber-deep: #FF8A00;
    --xlight-navy: #0F2A44;
    --xlight-glass: rgba(13, 22, 38, 0.62);
    --xlight-glass-strong: rgba(13, 22, 38, 0.78);
    --xlight-border: rgba(255, 255, 255, 0.10);
    --xlight-border-strong: rgba(255, 255, 255, 0.14);
    --xlight-text: #E8EDF3;
    --xlight-muted: #9FB0C3;
}

/* ----------------------------------------
 * Background: near-black + subtle dot grid
 * ----------------------------------------
 */

body {
    background-color: #05080D;
    /* Fine dot grid over a near-black base, with soft navy glows
       top-left / bottom-right. Dots are 6% white so text stays
       readable everywhere. */
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.3px),
        radial-gradient(ellipse 90% 60% at 15% 0%, rgba(15, 42, 68, 0.55), transparent 70%),
        radial-gradient(ellipse 70% 55% at 100% 100%, rgba(15, 42, 68, 0.35), transparent 70%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
    background-position: 0 0, 0 0, 0 0;
    color: var(--xlight-text);
    line-height: 1.45;
}

/* The remote canvas sits in here; let the dotted background show
   through wherever the canvas does not cover, and drop the big
   curved corner radius from the stock theme. */
#noVNC_container {
    background-color: transparent;
    border-bottom-right-radius: 0;
}

/* ----------------------------------------
 * Left sidebar: narrower, glassy, compact
 * ----------------------------------------
 */

/* Sidebar sits flush against the left edge: no left gap, no left
   border, square left corners (only the right side is rounded). */
#noVNC_control_bar_anchor {
    left: 0;
}
#noVNC_control_bar {
    background: var(--xlight-glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    backdrop-filter: blur(18px) saturate(1.35);
    border: 1px solid var(--xlight-border);
    margin-left: 0;
    border-left: none;
    border-radius: 0 18px 18px 0;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
}
#noVNC_control_bar.noVNC_open {
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
}
#noVNC_control_bar::before {
    box-shadow: none;
}
#noVNC_control_bar.noVNC_open::before {
    box-shadow: none;
}

#noVNC_control_bar > .noVNC_scroll {
    padding: 7px 5px;
    gap: 5px 0;
}
:is(.noVNC_top, .noVNC_bottom) > #noVNC_control_bar > .noVNC_scroll {
    padding: 6px 8px;
    gap: 0 6px;
}

#noVNC_control_bar_handle {
    background: rgba(15, 42, 68, 0.75);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--xlight-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* Sidebar logo: smaller, with a soft amber glow */
#noVNC_control_bar .noVNC_logo {
    max-width: 28px;
    max-height: 28px;
    filter: drop-shadow(0 2px 8px rgba(255, 176, 32, 0.35));
}

.noVNC_logo + hr {
    width: 30px;
    border-top-color: rgba(255, 255, 255, 0.14);
}

/* Sidebar icon buttons: glassy, compact, amber active state */
#noVNC_control_bar .noVNC_button {
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    padding: 4px;
    border: 1px solid var(--xlight-border);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    transition: background-color 0.15s ease, border-color 0.15s ease,
        box-shadow 0.15s ease;
}
#noVNC_control_bar .noVNC_button:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 176, 32, 0.55);
}
#noVNC_control_bar .noVNC_button.noVNC_selected {
    border-color: var(--xlight-amber);
    background-color: rgba(255, 176, 32, 0.22);
    box-shadow: 0 0 0 1px rgba(255, 176, 32, 0.35),
        0 0 14px rgba(255, 176, 32, 0.28);
}

/* ----------------------------------------
 * Sidebar arrow strip (ONE control, both ways)
 * A tall glassy vertical strip on the bar's right edge, in the
 * same place the old << hide button was. It sticks out 22px past
 * the bar, so when the bar slides away the strip stays visible
 * at the left edge: "<<" while open (click to close),
 * ">>" while hidden (click, or hover 200ms, to open).
 * Left-edge layout only — for right/top/bottom bar positions
 * the stock handle still works and this strip is hidden.
 * ----------------------------------------
 */

#xlight_sidebar_arrow {
    position: absolute;
    top: 50%;
    right: -22px;
    transform: translateY(-50%);
    width: 22px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 176, 32, 0.45);
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: rgba(13, 22, 38, 0.72);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
    color: var(--xlight-amber);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.45),
        0 0 16px rgba(255, 176, 32, 0.14);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    z-index: 5;
}
#xlight_sidebar_arrow:hover {
    background: rgba(15, 42, 68, 0.88);
    box-shadow: 4px 0 22px rgba(0, 0, 0, 0.5),
        0 0 28px rgba(255, 176, 32, 0.38);
}
#xlight_sidebar_arrow span {
    display: block;
    /* Double chevrons read better stacked in a tall strip */
    transform: translateX(-1px);
}
/* While hidden the strip is the only thing visible: brighter edge */
html.xlight-sidebar-hidden #xlight_sidebar_arrow {
    border-color: rgba(255, 176, 32, 0.7);
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(255, 176, 32, 0.3);
}
#noVNC_control_bar_anchor:is(.noVNC_right, .noVNC_top, .noVNC_bottom)
    #xlight_sidebar_arrow {
    display: none;
}

/* ----------------------------------------
 * Panels (Settings / Clipboard / Power):
 * frosted glass, compact rows
 * ----------------------------------------
 */

.noVNC_panel {
    background: var(--xlight-glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
    backdrop-filter: blur(20px) saturate(1.35);
    border: 1px solid var(--xlight-border-strong);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    color: var(--xlight-text);
    padding: 10px 12px;
    font-size: 13.5px;
}
.noVNC_panel > * {
    margin: 6px auto;
}
.noVNC_panel hr {
    border-top-color: rgba(255, 255, 255, 0.12);
}
.noVNC_panel label {
    margin: 3px 4px;
    font-size: 13px;
}
.noVNC_panel li {
    margin: 2px 0;
}

.noVNC_panel .noVNC_heading {
    background: rgba(255, 176, 32, 0.14);
    border: 1px solid rgba(255, 176, 32, 0.28);
    border-radius: 10px;
    padding: 4px 8px;
    color: var(--xlight-amber);
    font-size: 15px;
}
.noVNC_panel .noVNC_heading img {
    filter: none;
}

.noVNC_panel form {
    gap: 8px;
}
.noVNC_panel .button_row {
    margin-top: 8px;
    gap: 8px;
}

.noVNC_subheading {
    color: var(--xlight-muted);
    font-size: 12px;
}

/* Expander sub-sections: faint glass inset */
.noVNC_expander ~ * {
    margin: 4px;
    margin-left: 8px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* ----------------------------------------
 * Settings panel: tighter still
 * ----------------------------------------
 */

#noVNC_settings {
    font-size: 13px;
}
#noVNC_settings ul {
    margin: 0;
}
#noVNC_settings button,
#noVNC_settings select,
#noVNC_settings textarea,
#noVNC_settings input:not([type=checkbox]):not([type=radio]) {
    margin-left: 4px;
}

/* Glassy dark form controls inside panels */
.noVNC_panel input:not([type=checkbox]):not([type=radio]):not([type=image]):not([type=range]),
.noVNC_panel select,
.noVNC_panel textarea {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: var(--xlight-text);
    padding: 3px 8px;
    font-size: 13px;
}
.noVNC_panel select option {
    background: #0F1B2E;
    color: var(--xlight-text);
}
.noVNC_panel input[type=range] {
    accent-color: var(--xlight-amber);
}

/* Clipboard textarea: smaller than stock, glassy */
#noVNC_clipboard_text {
    width: 300px;
    height: 120px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: var(--xlight-text);
}

/* Modifier keys fly-out: glassy, tighter */
#noVNC_modifiers {
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--xlight-border);
    border-radius: 14px;
    padding: 6px;
    gap: 6px 0;
}

/* ----------------------------------------
 * Toggles: glassy track, amber when on
 * ----------------------------------------
 */

input[type=checkbox].toggle {
    width: 34px;
    height: 20px;
    --checkradio-height: 20px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.14);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
input[type=checkbox].toggle:checked {
    background-color: var(--xlight-amber);
    background-image: linear-gradient(135deg, var(--xlight-amber-light), var(--xlight-amber-deep));
    background-blend-mode: normal;
    border-color: transparent;
    box-shadow: 0 0 12px rgba(255, 176, 32, 0.45);
}
input[type=checkbox].toggle::before {
    --circle-diameter: 14px;
    --circle-offset: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Plain checkboxes: glassy box, amber tick state */
input[type=checkbox]:not(.toggle) {
    background-color: rgba(255, 255, 255, 0.1);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
input[type=checkbox]:not(.toggle):checked {
    background-color: var(--xlight-amber);
    background-image: none;
}

/* ----------------------------------------
 * Buttons: glassy pills, amber focus
 * ----------------------------------------
 */

input[type=button],
input[type=submit],
button {
    border-radius: 999px;
}
.noVNC_panel input[type=button],
.noVNC_panel input[type=submit],
.noVNC_panel button {
    min-width: unset;
    padding: 5px 14px;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.09);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--xlight-text);
}
.noVNC_panel input[type=button]:hover,
.noVNC_panel input[type=submit]:hover,
.noVNC_panel button:hover {
    border-color: rgba(255, 176, 32, 0.55);
    background-color: rgba(255, 176, 32, 0.14);
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--xlight-amber);
    outline-offset: 1px;
}

/* ----------------------------------------
 * Connect dialog: smaller glass card,
 * logo mark + amber gradient pill button
 * ----------------------------------------
 */

#noVNC_connect_dlg .noVNC_logo {
    font-size: 46px;
    padding: 4px;
    margin-bottom: 4px;
    text-shadow: 0 2px 18px rgba(255, 176, 32, 0.35), 0.06em 0.06em 0 rgba(0, 0, 0, 0.6);
}
.xlight-connect-logo {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 2px;
    filter: drop-shadow(0 6px 20px rgba(255, 176, 32, 0.35));
}
#noVNC_connect_dlg div {
    padding: 14px 18px;
    background: var(--xlight-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
    backdrop-filter: blur(20px) saturate(1.35);
    border: 1px solid var(--xlight-border-strong);
    border-radius: 20px;
    font-size: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
#noVNC_connect_button {
    padding: 10px 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: var(--xlight-amber);
    background-image: linear-gradient(135deg, var(--xlight-amber-light) 0%, var(--xlight-amber) 45%, var(--xlight-amber-deep) 100%);
    color: #1A1200;
    font-size: 17px;
    box-shadow: 0 6px 24px rgba(255, 176, 32, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#noVNC_connect_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 34px rgba(255, 176, 32, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
#noVNC_connect_button:active {
    transform: translateY(0);
}
#noVNC_connect_button img {
    height: 1.2em;
}

/* Verify / credentials dialogs inherit the glass panel treatment */
#noVNC_verify_server_dlg,
#noVNC_credentials_dlg {
    border-radius: 18px;
}

/* ----------------------------------------
 * Status bar + transition: glassy
 * ----------------------------------------
 */

#noVNC_status {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    padding: 4px 5px;
    font-size: 13.5px;
}
#noVNC_transition {
    background: rgba(5, 8, 13, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
#noVNC_transition_text {
    font-size: 1.25em;
}

/* ----------------------------------------
 * Audio controls: amber slider, tighter
 * ----------------------------------------
 */

#xlight_volume {
    width: 72px;
    accent-color: var(--xlight-amber);
}
#xlight_audio_status {
    color: var(--xlight-muted);
    max-width: 84px;
}

/* ----------------------------------------
 * Narrow screens: keep it usable
 * ----------------------------------------
 */

@media (max-width: 640px) {
    #noVNC_connect_dlg .noVNC_logo {
        font-size: 34px;
    }
    .xlight-connect-logo {
        width: 56px;
        height: 56px;
    }
    #noVNC_connect_dlg div {
        padding: 12px 14px;
        font-size: 15px;
    }
}

@media (max-width: 540px) {
    #noVNC_control_bar > .noVNC_scroll {
        padding: 6px 4px;
    }
    #noVNC_control_bar .noVNC_button {
        width: 30px;
        height: 30px;
        padding: 4px;
    }
    .noVNC_panel {
        padding: 8px 10px;
    }
    #noVNC_clipboard_text {
        width: 260px;
        height: 100px;
    }
    #xlight_sidebar_arrow {
        height: 140px;
        width: 20px;
        right: -20px;
    }
}
