/* ============================================================
   RSI — Righi Sistemi Integrati — Guacamole 1.6.0 Theme
   Selettori verificati su DOM reale desktop.righisistemi.it
   ============================================================ */

/* === SFONDO PAGINA === */
body {
    background-color: #1A1A2E !important;
    color: #FFFFFF !important;
}

/* === LOGIN PAGE — sfondo full-screen === */
.login-ui {
    background: #1A1A2E !important;
    color: #FFFFFF !important;
}

/* === LOGIN DIALOG BOX === */
.login-ui .login-dialog {
    background-color: #13132A !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6) !important;
}

/* === LOGO ===
     Guacamole base: width/height 3em — lo portiamo a 7em
     namespace "rsi-namespace" deve corrispondere a guac-manifest.json */
.login-ui .login-dialog .logo {
    background-image: url('app/ext/rsi-namespace/images/logo.png') !important;
    width: 7em !important;
    height: 7em !important;
    background-size: 7em 7em !important;
    -webkit-background-size: 7em 7em !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    display: block !important;
    margin: .5em auto 1em auto !important;
}

/* === TITOLO APP (div.app-name) ===
     Era quasi invisibile: testo scuro su sfondo scuro */
.login-ui .login-dialog .version .app-name {
    color: #FFFFFF !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    font-size: 1em !important;
    letter-spacing: 0.06em !important;
    opacity: 0.7 !important;
    margin-bottom: 0.25em !important;
}

/* === NUMERO VERSIONE === */
.login-ui .login-dialog .version .version-number {
    color: rgba(255,255,255,0.3) !important;
    text-align: center !important;
    font-size: 0.75em !important;
}

/* === INPUT FIELDS === */
.login-ui .login-dialog .login-fields input,
input[type=text],
input[type=email],
input[type=number],
input[type=password] {
    background-color: #22223A !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
}

/* === LABELED FIELD WRAPPER === */
.login-ui .login-fields .labeled-field {
    background-color: #22223A !important;
    border-radius: 10px !important;
    color: #FFFFFF !important;
}

/* === FIELD HEADER (label flottante — "Username", "Password") ===
     Guacamole base imposta z-index:-1 — la label finisce sotto l'input e sparisce.
     Portiamo z-index sopra il campo e aggiungiamo padding-top all'input
     per non sovrapporre testo e label. */
.login-ui .login-fields .labeled-field .field-header {
    color: #9A9DB8 !important;
    font-size: .8em !important;
    opacity: 1 !important;
    z-index: 2 !important;
    top: .4em !important;
    left: .75em !important;
    margin: 0 !important;
    pointer-events: none !important;
}

/* Sposta il testo dell'input in basso per fare spazio alla label */
.login-ui .login-dialog .login-fields input[type=text],
.login-ui .login-dialog .login-fields input[type=password],
.login-ui .login-dialog .login-fields input[type=email],
.login-ui .login-dialog .login-fields input[type=number] {
    padding-top: 1.6em !important;
    padding-bottom: .4em !important;
    padding-left: .75em !important;
}

/* Placeholder nativo degli input */
.login-ui .login-dialog .login-fields input::placeholder {
    color: #9A9DB8 !important;
    opacity: 1 !important;
}
.login-ui .login-dialog .login-fields input::-webkit-input-placeholder {
    color: #9A9DB8 !important;
    opacity: 1 !important;
}
.login-ui .login-dialog .login-fields input::-moz-placeholder {
    color: #9A9DB8 !important;
    opacity: 1 !important;
}

/* === INPUT FOCUS === */
.login-ui .login-fields .labeled-field input:focus {
    background-color: #2D2D44 !important;
    color: #FFFFFF !important;
    border-color: rgba(255,255,255,0.30) !important;
    outline: none !important;
}

/* === BOTTONE LOGIN ===
     Guacamole base: background #3c3c3c — sovrascriviamo con stile RSI */
.login-ui .login-dialog .buttons input[type=submit].login,
input[type=submit].login {
    background-color: #FFFFFF !important;
    color: #1A1A2E !important;
    border: none !important;
    border-radius: 100px !important;
    font-weight: 700 !important;
    font-size: 1em !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: .6em 1em !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.login-ui .login-dialog .buttons input[type=submit].login:hover {
    background-color: #E8E8F0 !important;
}

/* === TESTO MFA / CONTINUATION ("Please enter your authentication code...") ===
     Durante il 2FA il dialog entra in stato .continuation — il testo descrittivo
     è un <p> o .instructions dentro .login-dialog */
.login-ui .login-dialog p,
.login-ui .login-dialog .instructions,
.login-ui.continuation .login-dialog p,
.login-ui.continuation .login-dialog .instructions,
.login-ui .login-dialog .login-fields > p,
.login-ui .login-dialog form > p {
    color: #9A9DB8 !important;
}

/* bottone Continua nel 2FA (input[type=submit].continue-login) */
.login-ui .login-dialog .buttons input[type=submit].continue-login {
    background-color: #FFFFFF !important;
    color: #1A1A2E !important;
    border: none !important;
    border-radius: 100px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    padding: .6em 1em !important;
    cursor: pointer !important;
}
.login-ui .login-dialog .buttons input[type=submit].continue-login:hover {
    background-color: #E8E8F0 !important;
}

/* === ERRORE LOGIN === */
.login-ui .login-error {
    color: #ff6b6b !important;
    background-color: rgba(255,107,107,0.10) !important;
    border-radius: 8px !important;
    padding: .5em 1em !important;
}

/* === LINK === */
a[href], a[href]:visited {
    color: #9A9DB8 !important;
}
a[href]:hover {
    color: #FFFFFF !important;
}

/* === MENU A TENDINA UTENTE (in alto a destra — Home, Opzioni, Esci) === */
.user-menu .menu-dropdown,
.user-menu .menu-dropdown li,
.menu-dropdown,
.dropdown,
[class*="user-menu"] [class*="dropdown"],
[class*="dropdown"] {
    background-color: #13132A !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    color: #FFFFFF !important;
}

.user-menu .menu-dropdown a,
.user-menu .menu-dropdown li a,
.menu-dropdown a,
.menu-dropdown li {
    color: #FFFFFF !important;
    background-color: transparent !important;
}

.user-menu .menu-dropdown a:hover,
.user-menu .menu-dropdown li:hover,
.menu-dropdown a:hover,
.menu-dropdown li:hover {
    background-color: #2D2D44 !important;
    color: #FFFFFF !important;
}

/* === HOME CONNESSIONI — nomi client, gruppi, stato ===
     Guacamole base imposta color:#000 hardcoded su questi selettori — override con !important */

/* Link nomi connessione e gruppo (regola base: .connection a, .connection-group a { color:#000 }) */
.connection-group a,
.connection-group a:hover,
.connection-group a:visited,
.connection a,
.connection a:hover,
.connection a:visited,
.user-group a,
.user a {
    color: #FFFFFF !important;
}

/* .list-item .name (regola base: color:#000) */
.list-item .name {
    color: #FFFFFF !important;
    font-weight: 400 !important;
}

/* Nomi connessione e gruppo in generale */
.connection .name,
.connection-group .name {
    color: #FFFFFF !important;
}

/* Testo "Ora utilizzato da N user." e info secondarie */
.connection .caption span,
.connection .active-connections,
.connection small {
    color: #9A9DB8 !important;
}

/* Testo generico post-login */
#content { color: #FFFFFF !important; }
div.all-connections,
div.recent-connections {
    color: #FFFFFF !important;
}

/* === RESTO UI (post-login) === */
pre {
    background-color: #13132A !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
}

.settings table.session-list tr.session:hover {
    background-color: #2D2D44 !important;
}

.location-chooser .dropdown {
    background-color: #13132A !important;
}

#guac-menu #zoom-out:hover,
#guac-menu #zoom-in:hover {
    background-color: #2D2D44 !important;
}
/*
 * 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}