/*
 * 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}/* ==========================================================================
   Intelibs Remote Access - Guacamole theme
   Brand colours sampled directly from the company logo:
     blue  #0066B3
     green #A0D040

   NOTE 1: this file is bundled into /app.css, which is served from the
           application root. Any url() must therefore use the extension
           resource path (app/ext/intelibs/...), NOT a path relative to
           this file.
   NOTE 2: Guacamole's own stylesheet is specific and loads alongside this
           one, so background/colour overrides need !important to win.
   ========================================================================== */

:root {
    --intelibs-blue:       #0066B3;
    --intelibs-blue-dark:  #004E8A;
    --intelibs-green:      #A0D040;
    --intelibs-green-dark: #86B32F;
    --intelibs-ink:        #1C2B36;
}

/* --------------------------------------------------------------------------
   LOGIN PAGE
   -------------------------------------------------------------------------- */

.login-ui {
    background: linear-gradient(160deg, #063E6B 0%, #0066B3 55%, #1B7FD1 100%) !important;
}

/* Hide Guacamole's own logo and version string */
.login-ui .login-dialog .logo,
.login-ui .login-dialog .version,
.login-ui .login-dialog .version * {
    display: none !important;
}

.login-ui .login-dialog {
    background: #FFFFFF !important;
    border: none !important;
    border-top: 5px solid var(--intelibs-green) !important;
    border-radius: 10px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35) !important;
    padding: 2.2em 2.4em 2em 2.4em !important;
    max-width: 23em;
    color: var(--intelibs-ink) !important;
}

/* Logo + product name in a single pseudo-element so the caption always sits
   directly beneath the mark, above the form fields. */
.login-ui .login-dialog::before {
    content: 'Remote Access Portal';
    display: block;
    padding-top: 165px;
    margin-bottom: 1.5em;
    background-image: url('app/ext/intelibs/images/intelibs-logo.png');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: auto 150px;
    text-align: center;
    font-size: 0.9em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--intelibs-blue);
}

.login-ui .login-dialog label,
.login-ui .login-dialog .caption,
.login-ui .login-dialog p {
    color: var(--intelibs-ink) !important;
}

.login-ui .login-dialog input[type="text"],
.login-ui .login-dialog input[type="password"],
.login-ui .login-dialog input[type="email"],
.login-ui .login-dialog input[type="number"] {
    border: 1px solid #C7D3DC !important;
    border-radius: 6px !important;
    padding: 0.7em 0.8em !important;
    background: #FBFCFD !important;
    color: var(--intelibs-ink) !important;
    width: 100%;
    box-sizing: border-box;
}

.login-ui .login-dialog input::placeholder {
    color: #8496A4 !important;
}

.login-ui .login-dialog input[type="text"]:focus,
.login-ui .login-dialog input[type="password"]:focus,
.login-ui .login-dialog input[type="email"]:focus,
.login-ui .login-dialog input[type="number"]:focus {
    border-color: var(--intelibs-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.16) !important;
    outline: none !important;
}

.login-ui .login-dialog .buttons input[type="submit"],
.login-ui .login-dialog .buttons button,
.login-ui .login-dialog input[type="submit"] {
    background: var(--intelibs-blue) !important;
    border: none !important;
    border-radius: 6px !important;
    color: #FFFFFF !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.75em 1.4em !important;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}

.login-ui .login-dialog .buttons input[type="submit"]:hover,
.login-ui .login-dialog .buttons button:hover,
.login-ui .login-dialog input[type="submit"]:hover {
    background: var(--intelibs-blue-dark) !important;
}

/* Login error / validation messages */
.login-ui .login-dialog .error,
.login-ui .login-dialog .status {
    color: #B3261E !important;
    text-align: center;
}

/* --------------------------------------------------------------------------
   INSIDE THE APP - home / connection list
   -------------------------------------------------------------------------- */

.home-view,
.home-view.view,
.settings.view,
body.view {
    background: #F2F5F8 !important;
}

/* Section header bars ("Recent sessions" / "Available workstations") */
.connection-list-ui .header,
.home-view .header,
.settings .header {
    background: #FFFFFF !important;
    color: var(--intelibs-ink) !important;
    border: none !important;
    border-bottom: 2px solid var(--intelibs-green) !important;
    box-shadow: 0 1px 4px rgba(16, 40, 64, 0.06);
    padding: 0.85em 1.2em !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.connection-list-ui .header h2,
.home-view .header h2,
.settings .header h2 {
    color: var(--intelibs-blue) !important;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}

/* Intelibs mark in the first header bar */
.connection-list-ui .header:first-of-type h2::before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    width: 30px;
    height: 30px;
    margin-right: 0.6em;
    background-image: url('app/ext/intelibs/images/favicon-144.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Connection tiles */
.all-connections,
.recent-connections {
    padding: 1.1em !important;
}

.connection,
.connection-group {
    background: #FFFFFF !important;
    border: 1px solid #DCE5EC !important;
    border-left: 4px solid var(--intelibs-blue) !important;
    border-radius: 8px !important;
    margin: 0 0 0.7em 0 !important;
    padding: 0.85em 1em !important;
    box-shadow: 0 1px 3px rgba(16, 40, 64, 0.07);
    transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}

.connection:hover,
.connection-group:hover {
    background: #FFFFFF !important;
    border-left-color: var(--intelibs-green) !important;
    box-shadow: 0 6px 16px rgba(16, 40, 64, 0.14);
    transform: translateY(-1px);
}

.connection .caption .name,
.connection-group .caption .name {
    color: var(--intelibs-ink) !important;
    font-weight: 600;
}

/* Search / filter box */
.filter input[type="text"],
.filter input {
    border: 1px solid #C7D3DC !important;
    border-radius: 6px !important;
    padding: 0.55em 0.75em !important;
    background: #FFFFFF !important;
    color: var(--intelibs-ink) !important;
}

.filter input:focus {
    border-color: var(--intelibs-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.15) !important;
    outline: none !important;
}

/* User menu (top-right) */
.user-menu .menu-title,
.user-menu button {
    color: var(--intelibs-blue) !important;
    font-weight: 600;
}

/* Buttons throughout the app */
button.primary,
input[type="submit"].primary,
.settings button.primary {
    background: var(--intelibs-blue) !important;
    border-color: var(--intelibs-blue-dark) !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
}

button.primary:hover,
input[type="submit"].primary:hover {
    background: var(--intelibs-blue-dark) !important;
}

/* Dialogs and notifications keep the brand frame */
.notification,
.dialog {
    border-top: 4px solid var(--intelibs-green) !important;
    border-radius: 8px !important;
}
