/*
 * 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}/*
 * 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.
 */

.login-ui .sso-providers {

    padding: 0.25em 0.5em;
    position: absolute;
    bottom: 0;
    left: 0;

}

.sso-providers ul {
    list-style: none;
}

.sso-providers ul, .sso-providers li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.sso-providers li::before {
    content: ' / ';
}

.sso-providers li:first-child::before {
    display: none;
}
/*
 * =============================================================================
 * it2grow-branding.css — Guacamole UI overrides for it2grow Workspace
 * =============================================================================
 * Injected by the branding extension at page load.
 * Selectors are based on Guacamole 1.6.0 default markup.
 *
 * Brand colours extracted from the it2grow | Part of SAFEHOUSE logo:
 *   Green  (tree/circuit icon):  #5DAF2B
 *   Dark   (it2grow text):       #404040
 *   Orange (SAFEHOUSE shield):   #E87722
 *
 * Logo dimensions (native asset):
 *   1000 × 144 px, RGBA PNG, ratio ~6.94:1
 *   Displayed in the dialog at 388 × 56 px via background-size: contain.
 *
 * If any selector stops working after a Guacamole upgrade:
 *   1. Open the login page in a browser.
 *   2. Use developer tools to inspect the element.
 *   3. Update the selector here.
 *   4. Rebuild the JAR and the container image.
 *
 * Resource URL pattern for extension assets:
 *   /guacamole/app/ext/it2grow-branding/<path>
 * =============================================================================
 */

/* ── Login dialog ──────────────────────────────────────────────────────────── */
/*
 * Widened to 480 px to give the it2grow|SAFEHOUSE wide-format logo enough
 * horizontal space to render at a legible size without letterboxing.
 */
.login-ui .login-dialog {
    min-width: 460px;
    max-width: 500px;
    padding:   30px 36px 24px;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
/*
 * The it2grow | Part of SAFEHOUSE logo is wide-landscape (~6:1 ratio).
 * Displayed as a CSS background-image; the element's inline text is hidden.
 *
 * File:      images/logo.png
 * Native:    1000 × 144 px, RGBA PNG
 * Displayed: 388 × 56 px (background-size: contain preserves the ratio)
 */
.login-ui .login-dialog .logo,
.login-ui .logo {
    display:             block;
    background-image:    url("app/ext/it2grow-branding/images/logo.png");
    background-repeat:   no-repeat;
    background-position: center center;
    background-size:     contain;
    /* 388 × 56 px — exact ratio of the 1000 × 144 native asset */
    width:               388px;
    height:              56px;
    margin:              0 auto 20px;

    /* Hide any default Guacamole text rendered inside this element */
    text-indent: -9999px;
    overflow:    hidden;
}

/* ── Hide the default "Apache Guacamole" title text ─────────────────────────── */
/*
 * The translation override in en.json sets APP.NAME to "it2grow Workspace".
 * This rule hides the title element as a belt-and-suspenders measure in case
 * the translation key differs in 1.6.0.
 * Remove if the title element is needed and the translation key is confirmed.
 */
.login-ui .login-dialog .title {
    display: none;
}

/* ── Input fields ──────────────────────────────────────────────────────────── */
.login-ui .login-dialog input[type="text"],
.login-ui .login-dialog input[type="password"] {
    width:         100%;
    box-sizing:    border-box;
    padding:       8px 10px;
    border:        1px solid #cccccc;
    border-radius: 2px;
    font-size:     14px;
}

.login-ui .login-dialog input[type="text"]:focus,
.login-ui .login-dialog input[type="password"]:focus {
    border-color: #5DAF2B;   /* it2grow green focus ring */
    outline:      none;
    box-shadow:   0 0 0 2px rgba(93, 175, 43, 0.25);
}

/* ── Sign-in button ────────────────────────────────────────────────────────── */
/*
 * Uses it2grow green (#5DAF2B) as the primary action colour.
 * Hover darkens to #4A9422.
 */
.login-ui .login-dialog input[type="submit"],
.login-ui .login-dialog button[type="submit"] {
    background-color: #5DAF2B;
    border:           1px solid #4A9422;
    color:            #ffffff;
    width:            100%;
    box-sizing:       border-box;
    padding:          9px 0;
    font-size:        14px;
    font-weight:      600;
    border-radius:    2px;
    cursor:           pointer;
    margin-top:       6px;
    letter-spacing:   0.02em;
}

.login-ui .login-dialog input[type="submit"]:hover,
.login-ui .login-dialog button[type="submit"]:hover {
    background-color: #4A9422;
    border-color:     #3D7B1C;
}

/* ── SSO / Entra ID section ─────────────────────────────────────────────────── */
/*
 * The OpenID extension injects .sso-providers as a sibling AFTER
 * .login-dialog-middle inside .login-ui — that puts it outside the dialog box.
 *
 * Fix: hide the outside section entirely. The branding extension injects its
 * own Entra ID button INSIDE .login-form via html/entra-login.html, so it
 * appears naturally within the dialog box.
 */

/* Hide the outside-dialog SSO section injected by the OpenID extension */
.login-ui .sso-providers {
    display: none !important;
}

/* ── Entra ID section inside the login form ────────────────────────────────── */

/* Divider between local credentials and Entra ID button */
.login-ui .login-dialog .it2grow-entra-section {
    margin-top: 14px;
}

.login-ui .login-dialog .it2grow-divider {
    text-align:   center;
    font-size:    11px;
    color:        #999999;
    margin-bottom: 8px;
    overflow:     hidden;
    white-space:  nowrap;
}

.login-ui .login-dialog .it2grow-divider::before,
.login-ui .login-dialog .it2grow-divider::after {
    content:          "";
    display:          inline-block;
    width:            28%;
    height:           1px;
    background:       #dddddd;
    vertical-align:   middle;
    margin:           0 6px;
}

/* Entra ID button — Microsoft blue */
.login-ui .login-dialog .it2grow-entra-btn {
    display:          block;
    padding:          9px 16px;
    background-color: #0078D4;
    border:           1px solid #006CBE;
    color:            #ffffff;
    text-align:       center;
    text-decoration:  none;
    border-radius:    2px;
    font-size:        14px;
    font-weight:      600;
    width:            100%;
    box-sizing:       border-box;
}

.login-ui .login-dialog .it2grow-entra-btn:hover {
    background-color: #006CBE;
    border-color:     #005A9E;
}

