/*
 * 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;

}
/* ---- Range Dark Theme for Guacamole 1.6 ---------------------------------------------
   Colours only. The remote desktop itself (.client-view / .display) is never touched. */
:root {
  --rd-bg:      #1b2330;
  --rd-panel:   #222c3a;
  --rd-panel2:  #161d28;
  --rd-border:  #33415a;
  --rd-text:    #c9d4e0;
  --rd-muted:   #8a9bb0;
  --rd-accent:  #4dabf7;
  --rd-accent2: #339af0;
  --rd-btn:     #12304f;
}

/* page backgrounds and text */
html, body, .home, .settings, .manage, .view, .connection-history,
.page-tabs, .header, .user-menu, .list, .connection-group, .breadcrumbs {
  background-color: var(--rd-bg) !important;
  color: var(--rd-text) !important;
}
h1, h2, h3, .header h2, .header, .caption, .name, label, th, td, p, span, div.notification .body {
  color: var(--rd-text);
}
a, a:visited { color: var(--rd-accent) !important; }
a:hover      { color: #a5d8ff !important; }

/* login screen */
.login-ui { background-color: var(--rd-bg) !important; }
.login-ui .login-dialog {
  background: var(--rd-panel) !important;
  border: 1px solid var(--rd-accent2) !important;
  box-shadow: 0 0 24px rgba(51,154,240,.25) !important;
  color: var(--rd-text) !important;
}
.login-ui .login-dialog .version, .login-ui .login-dialog .version-number { color: var(--rd-muted) !important; }

/* header bar and user menu */
.header { border-bottom: 2px solid var(--rd-accent) !important; }
.menu-dropdown, .menu-dropdown .menu-contents, .menu-contents, .menu-contents li, .menu-contents ul {
  background-color: var(--rd-panel2) !important;
  color: var(--rd-text) !important;
  border-color: var(--rd-border) !important;
}
.menu-dropdown .menu-contents li a:hover, .menu-contents li:hover { background-color: var(--rd-btn) !important; }

/* connection lists, recent connections, tree */
.list-item, .recent-connections .connection, .connection, .connection-group .caption,
.home-connections, .all-connections, .group-list-page {
  background-color: var(--rd-bg) !important;
  color: var(--rd-text) !important;
}
.list-item:hover, .list-item.selected, .recent-connections .connection:hover {
  background-color: var(--rd-panel) !important;
}
.recent-connections .connection .thumbnail { border: 1px solid var(--rd-border) !important; }

/* settings tabs */
.page-tabs .page-list li a { background-color: var(--rd-panel2) !important; color: var(--rd-muted) !important; }
.page-tabs .page-list li a.current, .page-tabs .page-list li a:hover {
  background-color: var(--rd-panel) !important; color: var(--rd-accent) !important;
  border-bottom: 2px solid var(--rd-accent) !important;
}

/* tables */
table, table.sorted, .settings table, .properties, .fields {
  background-color: var(--rd-bg) !important; color: var(--rd-text) !important;
  border-color: var(--rd-border) !important;
}
table th, table.sorted th { background-color: var(--rd-panel2) !important; color: var(--rd-accent) !important; }
table tr:nth-child(even) td { background-color: var(--rd-panel) !important; }
table td, table th { border-color: var(--rd-border) !important; }

/* form fields */
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=search], input[type=date], input[type=time], select, textarea, .filter input {
  background-color: var(--rd-btn) !important;
  color: #a5d8ff !important;
  border: 1px solid var(--rd-accent2) !important;
}
input::placeholder, textarea::placeholder { color: var(--rd-muted) !important; }

/* buttons */
button, input[type=submit], input[type=button], a.button, .button {
  background-color: var(--rd-btn) !important;
  color: var(--rd-accent) !important;
  border: 1px solid var(--rd-accent2) !important;
  border-radius: 20px !important;
}
button:hover, input[type=submit]:hover, a.button:hover, .button:hover {
  background-color: #1a4470 !important; color: #a5d8ff !important;
}
button.danger, .button.danger, button.delete { border-color: #e03131 !important; color: #ff8787 !important; }

/* notifications / dialogs */
.notification, .notification .body, .notification .parameters, .notification .buttons {
  background-color: var(--rd-panel) !important; color: var(--rd-text) !important;
  border-color: var(--rd-accent2) !important;
}
.notification .title-bar { background-color: var(--rd-btn) !important; color: var(--rd-accent) !important; }

/* in-session Guacamole menu (Ctrl+Alt+Shift) — the sidebar only, not the desktop */
.menu, .menu .menu-content, .menu .menu-section, .menu h3, .menu .header {
  background-color: var(--rd-panel2) !important; color: var(--rd-text) !important;
}

/* keep the remote display exactly as the remote machine draws it */
.client-view, .client-view *, .display, .display * { filter: none !important; }
/* Cyber Ops Lab branding for Apache Guacamole login page */

/* Full-screen storage background */
.login-ui {
    background: #05090c url('app/ext/cyberops-branding/images/background.jpg') center center / cover no-repeat !important;
}

/* Frosted-glass login card */
.login-ui .login-dialog {
    background: rgba(8, 18, 24, 0.72) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 220, 205, 0.35) !important;
    border-radius: 14px !important;
    box-shadow: 0 0 40px rgba(40, 220, 205, 0.18), 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    color: #d8eef0 !important;
    padding: 1.5em 1.75em !important;
}

/* Custom logo */
.login-ui .login-dialog .logo {
    background-image: url('app/ext/cyberops-branding/images/logo.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 96px !important;
    height: 96px !important;
    margin: 0 auto 0.5em auto !important;
}

/* App name / version line */
.login-ui .login-dialog .version,
.login-ui .login-dialog .version .app-name {
    color: #e6f7f7 !important;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.login-ui .login-dialog .version .version-number {
    color: rgba(160, 200, 205, 0.6) !important;
}

/* Input fields */
.login-ui .login-fields input[type="text"],
.login-ui .login-fields input[type="password"] {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(120, 170, 180, 0.35) !important;
    border-radius: 8px !important;
    color: #eaf6f7 !important;
    padding: 0.6em 0.8em !important;
}
.login-ui .login-fields input:focus {
    border-color: rgba(40, 220, 205, 0.9) !important;
    box-shadow: 0 0 0 3px rgba(40, 220, 205, 0.2) !important;
    outline: none !important;
}
.login-ui .login-fields input::placeholder {
    color: rgba(190, 215, 220, 0.55) !important;
}

/* Login button */
.login-ui .buttons input[type="submit"],
.login-ui .login-dialog .buttons .login {
    background: linear-gradient(135deg, #1fb9ad, #2a8fd6) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    padding: 0.6em 1.4em !important;
    box-shadow: 0 4px 14px rgba(31, 185, 173, 0.35) !important;
    cursor: pointer;
}
.login-ui .buttons input[type="submit"]:hover,
.login-ui .login-dialog .buttons .login:hover {
    filter: brightness(1.1);
}

/* Error message on failed login */
.login-ui .login-error {
    color: #ffb547 !important;
}

/* Hide the "Username"/"Password" labels once the field has text (or is being typed in).
   Guacamole shows these labels behind the input and relies on an opaque input
   background to cover them; our see-through inputs need them hidden explicitly. */
.login-ui .login-fields .labeled-field:not(.empty) .field-header,
.login-ui .login-fields .labeled-field:focus-within:not(.empty) .field-header {
    visibility: hidden !important;
    opacity: 0 !important;
}
.login-ui .login-fields .labeled-field .field-header {
    transition: opacity 0.15s ease;
    color: rgba(190, 215, 220, 0.6) !important;
}
