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

}
/* ===== SFONDO - sovrascrive background: white dell'originale ===== */
div.login-ui {
    background: linear-gradient(160deg, #b8e0f7 0%, #4a90c4 50%, #1a4f8a 100%) !important;
}

/* ===== PANNELLO LOGIN ===== */
.login-ui .login-dialog {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(10, 30, 80, 0.5) !important;
    padding: 2em 2.5em !important;
    max-width: 5in !important;
}

/* ===== LOGO AZIENDALE - sovrascrive quello di Guacamole ===== */
.login-ui .login-dialog .logo {
    width: 160px !important;
    height: 70px !important;
    background-image: url('/guacamole/app/ext/custom-branding/logo-azienda.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin: 0 auto 0.5em !important;
}

/* ===== NOME AZIENDA ===== */
.login-ui .login-dialog .version .app-name {
    color: #ffffff !important;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    text-align: center !important;
}

/* ===== NUMERO VERSIONE - nascosto ===== */
.login-ui .login-dialog .version .version-number {
    display: none !important;
}

/* ===== LABEL CAMPI ===== */
.login-ui .login-fields .labeled-field .field-header {
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: 'Segoe UI', sans-serif !important;
    opacity: 1 !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
}

/* ===== INPUT - sfondo trasparente quando vuoto ===== */
.login-ui .login-fields .labeled-field.empty input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    padding: 0.6em 0.8em !important;
}

/* ===== INPUT - sfondo bianco quando attivo/compilato ===== */
.login-ui .login-fields .labeled-field input:focus,
.login-ui .login-fields .labeled-field:not(.empty) input {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px !important;
    color: #1a3a5c !important;
    padding: 0.6em 0.8em !important;
    outline: none !important;
}

/* ===== BOTTONE ENTRA ===== */
.login-ui .login-dialog .buttons input[type="submit"].login {
    background: linear-gradient(90deg, #1a6bbf 0%, #0d3f7a 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    padding: 0.6em 1.5em !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(10, 30, 80, 0.4) !important;
    transition: opacity 0.2s !important;
}
.login-ui .login-dialog .buttons input[type="submit"].login:hover {
    opacity: 0.85 !important;
}

/* ===== MESSAGGIO DI ERRORE ===== */
.login-ui.error p.login-error {
    background: rgba(180, 50, 50, 0.85) !important;
    border: 1px solid rgba(255, 100, 100, 0.5) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}
.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}