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

}
.totp-enroll p,.totp-details{font-size:.8em}.totp-qr-code{text-align:center}.totp-qr-code img{margin:1em;border:1px solid rgba(0,0,0,0.25);box-shadow:1px 1px 2px rgba(0,0,0,0.25);cursor:pointer}h3.totp-details-header{font-size:.8em}h3.totp-details-header::before{content:'▸ '}.totp-details-visible h3.totp-details-header::before{content:'▾ '}.totp-details,.totp-hide-details{display:none}.totp-details-visible .totp-details{display:table}.totp-details-visible .totp-hide-details{display:inline}.totp-details-visible .totp-show-details{display:none}.totp-hide-details,.totp-show-details{color:blue;text-decoration:underline;cursor:pointer;margin:0 .25em;font-weight:normal}.totp-details{margin:0 auto}.totp-details th{padding-right:.25em;text-align:left}.totp-details td{font-family:monospace}.totp-detail{display:inline-block;margin:0 .25em}/*
 * HEX9 STEP 1
 * Minimal dark background and login panel only
 */

/* Page background */
html,
body,
#content,
.login-ui,
.login-ui .login-dialog-middle,
.login-ui .login-dialog-container {
    background:
        radial-gradient(circle at 20% 15%, rgba(50, 120, 220, 0.10), transparent 32rem),
        radial-gradient(circle at 80% 85%, rgba(80, 110, 200, 0.08), transparent 36rem),
        linear-gradient(135deg, #08111f 0%, #0c1627 52%, #060a12 100%) !important;
}

/* Login panel only */
.login-ui .login-dialog {
    background: #1c2638 !important;
    border: 1px solid rgba(140, 190, 245, 0.22) !important;
    border-radius: 18px !important;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 10px 30px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Inputs, subtle only */
.login-ui input[type="text"],
.login-ui input[type="password"],
.login-ui input[type="email"],
.login-ui input[type="number"],
.login-ui input[type="tel"] {
    background: #263246 !important;
    color: #f2f7ff !important;
    border: 1px solid rgba(170, 205, 245, 0.24) !important;
    border-radius: 10px !important;
}

/* Button, subtle blue */
.login-ui input[type="submit"],
.login-ui button,
.login-ui .button {
    background: linear-gradient(135deg, #238cff 0%, #4f63ff 100%) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
}

/*
 * HEX9 STEP 2
 * Replace default Guacamole logo with HEX9 text logo
 */

.login-ui .login-dialog .logo {
    display: block !important;

    width: 100% !important;
    height: auto !important;
    min-height: 78px !important;

    margin: 0 0 30px 0 !important;
    padding: 0 !important;

    background: none !important;
    background-image: none !important;

    border: 0 !important;
    box-shadow: none !important;

    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-indent: 0 !important;

    text-align: center !important;
    overflow: visible !important;
}

.login-ui .login-dialog .logo::before {
    content: "HEX9";
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 2.65rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.24em !important;

    color: #f2f7ff !important;
    text-indent: 0 !important;
    text-align: center !important;

    text-shadow:
        0 0 14px rgba(80, 180, 255, 0.55),
        0 0 30px rgba(80, 120, 255, 0.24) !important;
}

.login-ui .login-dialog .logo::after {
    content: "REMOTE ACCESS";
    display: block !important;

    margin: 16px 0 0 0 !important;
    padding: 0 !important;

    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    letter-spacing: 0.30em !important;
    text-transform: uppercase !important;

    color: rgba(220, 232, 255, 0.64) !important;
    text-indent: 0 !important;
    text-align: center !important;
}

/*
 * HEX9 STEP 3
 * Hide remaining original Guacamole logo text/content
 */

.login-ui .login-dialog .logo > *,
.login-ui .login-dialog .logo img,
.login-ui .login-dialog .logo svg,
.login-ui .login-dialog .logo span,
.login-ui .login-dialog .logo div {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* Keep our pseudo logo visible */
.login-ui .login-dialog .logo::before,
.login-ui .login-dialog .logo::after {
    display: block !important;
    visibility: visible !important;
}

/*
 * HEX9 STEP 4
 * Hard override original Guacamole logo/background
 */

html body .login-ui .login-dialog .logo,
html body .login-ui .login-dialog div.logo,
html body .login-ui .login-dialog form .logo,
html body .login-ui .login-dialog form div.logo {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    background-size: 0 0 !important;
    background-position: -9999px -9999px !important;
    background-repeat: no-repeat !important;

    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-shadow: none !important;

    border: 0 !important;
    box-shadow: none !important;
}

/* Keep HEX9 pseudo logo visible with higher specificity */
html body .login-ui .login-dialog .logo::before,
html body .login-ui .login-dialog div.logo::before,
html body .login-ui .login-dialog form .logo::before,
html body .login-ui .login-dialog form div.logo::before {
    content: "HEX9" !important;
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 2.65rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0.24em !important;

    color: #f2f7ff !important;
    text-indent: 0 !important;
    text-align: center !important;

    text-shadow:
        0 0 14px rgba(80, 180, 255, 0.55),
        0 0 30px rgba(80, 120, 255, 0.24) !important;
}

html body .login-ui .login-dialog .logo::after,
html body .login-ui .login-dialog div.logo::after,
html body .login-ui .login-dialog form .logo::after,
html body .login-ui .login-dialog form div.logo::after {
    content: "REMOTE ACCESS" !important;
    display: block !important;

    margin: 16px 0 0 0 !important;
    padding: 0 !important;

    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    letter-spacing: 0.30em !important;
    text-transform: uppercase !important;

    color: rgba(220, 232, 255, 0.64) !important;
    text-indent: 0 !important;
    text-align: center !important;
}

/*
 * HEX9 STEP 5
 * Hide any extra direct login-dialog children except logo, form and version
 */

.login-ui .login-dialog > :not(.logo):not(form):not(.version) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

/* Keep required elements visible */
.login-ui .login-dialog > .logo,
.login-ui .login-dialog > form,
.login-ui .login-dialog > .version {
    display: block !important;
    visibility: visible !important;
}

/*
 * HEX9 STEP 6
 * Hide original "Apache Guacamole" app-name element
 */

html body .login-ui .login-dialog .app-name,
html body .login-ui .login-dialog div.app-name,
html body .login-ui .login-dialog form .app-name,
html body .login-ui .login-dialog form div.app-name,
html body .login-ui .login-dialog .app-name.ng-binding,
html body .login-ui .login-dialog form .app-name.ng-binding {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;

    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;

    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-shadow: none !important;

    overflow: hidden !important;
    pointer-events: none !important;
}

/*
 * HEX9 STEP 7
 * Improve text contrast in main Guacamole UI
 */

/* General application text */
body,
#content,
.home-view,
.home-view *,
.section,
.section *,
.header,
.header *,
.connection-group,
.connection-group *,
.recent-connections,
.recent-connections *,
.all-connections,
.all-connections * {
    color: rgba(235, 242, 255, 0.86) !important;
}

/* Main headings */
h1,
h2,
h3,
.section-header,
.header-3,
.home-view h2,
.home-view h3 {
    color: rgba(245, 249, 255, 0.94) !important;
    text-shadow: 0 0 10px rgba(100, 170, 255, 0.12) !important;
}

/* Secondary / muted text */
.placeholder,
.empty,
.caption,
.notice,
p,
label,
span {
    color: rgba(225, 235, 255, 0.74) !important;
}

/* Connection list labels */
.connection,
.connection *,
.connection-group,
.connection-group *,
.recent-connections,
.all-connections {
    color: rgba(235, 242, 255, 0.88) !important;
}

/* Links and clickable labels */
a,
.link,
.filter,
.breadcrumb,
.menu-contents li {
    color: rgba(145, 205, 255, 0.92) !important;
}

a:hover,
.link:hover,
.filter:hover,
.menu-contents li:hover {
    color: rgba(195, 230, 255, 1) !important;
}

/* Inputs and placeholders inside main UI */
input,
select,
textarea {
    color: rgba(245, 249, 255, 0.92) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(220, 230, 245, 0.50) !important;
}

/*
 * HEX9 STEP 8
 * Clean main UI background and improve main typography
 */

/* Nur body/html sollen den großen Hintergrund tragen */
html,
body {
    background:
        radial-gradient(circle at 20% 18%, rgba(40, 110, 210, 0.08), transparent 34rem),
        radial-gradient(circle at 80% 82%, rgba(55, 85, 170, 0.06), transparent 38rem),
        linear-gradient(135deg, #08111f 0%, #0b1525 52%, #060a12 100%) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

/* Alle Hauptcontainer darüber transparent machen, damit nichts "gekachelt" wirkt */
#content,
.home-view,
.home-view .home,
.home-view .section,
.recent-connections,
.all-connections,
.connection-group,
.connection-group-contents,
.group-list,
.group-list-filter,
.user-menu,
.manage,
.settings {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Hauptüberschriften klarer */
.home-view h1,
.home-view h2,
.home-view h3,
.home-view .section-header,
.home-view .header-3,
.section-header {
    color: rgba(245, 249, 255, 0.96) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

/* Normaler UI-Text */
.home-view,
.home-view p,
.home-view span,
.home-view div,
.home-view li,
.home-view label,
.home-view a,
.settings,
.settings p,
.settings span,
.settings div,
.manage,
.manage p,
.manage span,
.manage div {
    color: rgba(230, 238, 255, 0.84) !important;
}

/* Etwas dunklere / schwächere Metatexte */
.home-view .caption,
.home-view .placeholder,
.home-view .filter,
.home-view .breadcrumb,
.home-view .username,
.home-view .section .header,
.settings .caption,
.manage .caption {
    color: rgba(215, 226, 245, 0.68) !important;
}

/* Links und klickbare Texte */
.home-view a,
.home-view .filter,
.home-view .menu-contents li,
.settings a,
.manage a {
    color: rgba(165, 215, 255, 0.92) !important;
}

.home-view a:hover,
.home-view .filter:hover,
.home-view .menu-contents li:hover,
.settings a:hover,
.manage a:hover {
    color: rgba(215, 238, 255, 1) !important;
}

/* Top-right Benutzerbereich lesbarer */
.menu,
.menu *,
.user-menu,
.user-menu *,
.username,
.current-user,
.current-user * {
    color: rgba(238, 244, 255, 0.90) !important;
}

/* Sektionstitel links oben */
.recent-connections > .header,
.all-connections > .header,
.section-header {
    color: rgba(245, 249, 255, 0.94) !important;
}

/* Such-/Filterfeld lesbarer */
.group-list-filter input,
.group-list-filter input::placeholder,
input[type="search"] {
    color: rgba(240, 246, 255, 0.92) !important;
}

.group-list-filter input::placeholder,
input[type="search"]::placeholder {
    color: rgba(210, 222, 240, 0.52) !important;
}

/*
 * HEX9 STEP 9
 * Improve text readability in the main UI
 */

/* Allgemeiner Haupttext */
body,
#content,
.home-view,
.home-view * {
    color: rgba(232, 240, 255, 0.86) !important;
}

/* Überschriften */
.home-view h1,
.home-view h2,
.home-view h3,
.home-view .section-header,
.home-view .header,
.home-view .header-3 {
    color: rgba(245, 249, 255, 0.96) !important;
    text-shadow: none !important;
}

/* Etwas schwächerer Sekundärtext */
.home-view .caption,
.home-view .placeholder,
.home-view .instructions,
.home-view .username,
.home-view .filter,
.home-view .breadcrumb {
    color: rgba(210, 222, 242, 0.72) !important;
}

/* Links und klickbare Texte */
.home-view a,
.home-view .link,
.home-view .menu-contents li,
.home-view .filter {
    color: rgba(165, 215, 255, 0.92) !important;
}

.home-view a:hover,
.home-view .link:hover,
.home-view .menu-contents li:hover,
.home-view .filter:hover {
    color: rgba(220, 240, 255, 1) !important;
}

/* Benutzerbereich oben rechts */
.menu,
.menu *,
.user-menu,
.user-menu *,
.current-user,
.current-user *,
.username {
    color: rgba(240, 246, 255, 0.90) !important;
}

/*
 * HEX9 STEP 11
 * Darken input fields and top-right user menu
 */

/* Login input fields */
.login-ui input[type="text"],
.login-ui input[type="password"],
.login-ui input[type="email"],
.login-ui input[type="number"],
.login-ui input[type="tel"] {
    background: #111a29 !important;
    color: rgba(232, 240, 255, 0.88) !important;

    border: 1px solid rgba(130, 175, 230, 0.28) !important;

    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.55),
        0 0 0 rgba(0, 0, 0, 0) !important;
}

/* Login placeholders */
.login-ui input[type="text"]::placeholder,
.login-ui input[type="password"]::placeholder,
.login-ui input[type="email"]::placeholder,
.login-ui input[type="number"]::placeholder,
.login-ui input[type="tel"]::placeholder {
    color: rgba(180, 198, 225, 0.42) !important;
}

/* Main UI input/search/filter fields */
.home-view input,
.home-view select,
.home-view textarea,
.settings input,
.settings select,
.settings textarea,
.manage input,
.manage select,
.manage textarea,
.group-list-filter input,
input[type="search"] {
    background: #111a29 !important;
    color: rgba(232, 240, 255, 0.86) !important;

    border: 1px solid rgba(130, 175, 230, 0.24) !important;
    border-radius: 8px !important;

    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.50) !important;
}

/* Main UI placeholders */
.home-view input::placeholder,
.home-view textarea::placeholder,
.settings input::placeholder,
.settings textarea::placeholder,
.manage input::placeholder,
.manage textarea::placeholder,
.group-list-filter input::placeholder,
input[type="search"]::placeholder {
    color: rgba(180, 198, 225, 0.42) !important;
}

/* Focus state */
.login-ui input:focus,
.home-view input:focus,
.settings input:focus,
.manage input:focus,
.group-list-filter input:focus,
input[type="search"]:focus {
    background: #142033 !important;
    border-color: rgba(90, 185, 255, 0.62) !important;

    box-shadow:
        0 0 0 3px rgba(0, 160, 255, 0.10),
        inset 0 1px 3px rgba(0, 0, 0, 0.50) !important;
}

/* Top-right user menu button/container */
.menu,
.user-menu,
.current-user,
.header .menu,
.header .user-menu,
.header .current-user {
    background: #111a29 !important;
    color: rgba(238, 244, 255, 0.90) !important;

    border: 1px solid rgba(130, 175, 230, 0.22) !important;
    border-radius: 10px !important;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

/* Top-right user menu text/icons */
.menu *,
.user-menu *,
.current-user *,
.header .menu *,
.header .user-menu *,
.header .current-user * {
    color: rgba(238, 244, 255, 0.90) !important;
}

/* Dropdown menu */
.menu-dropdown {
    background: #111a29 !important;

    border: 1px solid rgba(130, 175, 230, 0.24) !important;
    border-radius: 10px !important;

    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

/* Dropdown entries */
.menu-dropdown .menu-contents,
.menu-dropdown .menu-contents li {
    background: transparent !important;
    color: rgba(232, 240, 255, 0.88) !important;
}

/* Dropdown hover */
.menu-dropdown .menu-contents li:hover {
    background: rgba(45, 120, 220, 0.18) !important;
    color: rgba(245, 249, 255, 0.96) !important;
}
