/*
 * 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}.rdpgw-ms {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 30;
    max-width: calc(100vw - 24px);
    font: 13px/1.4 "Segoe UI", Arial, sans-serif;
    color: #1f2328;
}

/* Couleurs reprises de la charte graphique (--rdpgw-primary) si elle est définie. */
.rdpgw-ms-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--rdpgw-primary, #d0d7de);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.rdpgw-ms-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8c959f;
    flex: none;
}

.rdpgw-ms-ok .rdpgw-ms-dot { background: #1a7f37; }
.rdpgw-ms-warning .rdpgw-ms-dot { background: #bf8700; }
.rdpgw-ms-critical .rdpgw-ms-dot { background: #cf222e; }

.rdpgw-ms-panel {
    width: 380px;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid #d0d7de;
    border-top: 4px solid var(--rdpgw-primary, #d0d7de);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.rdpgw-ms-panel[hidden] { display: none; }

.rdpgw-ms-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.rdpgw-ms-close {
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #57606a;
}

.rdpgw-ms-machine + .rdpgw-ms-machine {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eaeef2;
}

.rdpgw-ms-title { font-weight: 600; }
.rdpgw-ms-sub { color: #57606a; margin-bottom: 6px; }

.rdpgw-ms-alert {
    margin: 6px 0;
    padding: 6px 8px;
    border-left: 4px solid #8c959f;
    border-radius: 4px;
    background: #f6f8fa;
}

.rdpgw-ms-alert-warning { border-color: #bf8700; background: #fff8c5; }
.rdpgw-ms-alert-critical { border-color: #cf222e; background: #ffebe9; }

.rdpgw-ms-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.rdpgw-ms-row span:first-child { color: #57606a; }

.rdpgw-ms-bar {
    height: 6px;
    margin: 2px 0 6px;
    border-radius: 3px;
    background: #eaeef2;
    overflow: hidden;
}

.rdpgw-ms-bar > div { height: 100%; background: var(--rdpgw-primary, #1a7f37); }

.rdpgw-ms-support {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #eaeef2;
    color: #57606a;
}
.rdpgw-ms-bar.rdpgw-ms-warning > div { background: #bf8700; }
.rdpgw-ms-bar.rdpgw-ms-critical > div { background: #cf222e; }

/* Bouton « Mon espace » (tableau de bord), hors session à distance. */
.rdpgw-espace-link {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--rdpgw-primary, #0b5fff);
    color: var(--rdpgw-on-primary, #fff) !important;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.rdpgw-espace-link:hover { filter: brightness(1.1); }
/* Généré au démarrage à partir de la charte graphique. */
:root {
    --rdpgw-primary: #061896;
    --rdpgw-on-primary: #ffffff;
}
.login-ui .login-dialog .version::after { content: "Accédez à votre ordinateur, où que vous soyez"; }
.login-ui .login-dialog-middle::after { content: "Besoin d'aide ? info@sogesti.ch"; }
/* Page de connexion conforme au site : carte blanche arrondie sur fond
   clair, police système, bouton pleine largeur. */
div.login-ui {
    --rdpgw-bg: #f5f7fb; --rdpgw-card: #ffffff; --rdpgw-text: #12203a; --rdpgw-muted: #5b6b85; --rdpgw-border: #dde3ee;
    background: var(--rdpgw-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
    div.login-ui { --rdpgw-bg: #0d1424; --rdpgw-card: #151e33; --rdpgw-text: #e8eefb; --rdpgw-muted: #9aa9c6; --rdpgw-border: #26324d; }
}
.login-ui .login-dialog-middle { display: table-cell; vertical-align: middle; padding: 24px 16px; }
.login-ui .login-dialog-middle::after {
    display: block; text-align: center; color: var(--rdpgw-muted); font-size: 14px; margin-top: 18px;
}
.login-ui .login-dialog {
    background: var(--rdpgw-card); color: var(--rdpgw-text);
    max-width: 400px; width: 100%; box-sizing: border-box; margin: 0 auto;
    padding: 32px 28px 26px; border: 1px solid var(--rdpgw-border); border-top: 4px solid var(--rdpgw-primary);
    border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}
.login-ui .login-dialog .logo { margin: 0 auto 14px; }
.login-ui .login-dialog .version { text-align: center; padding: 0; margin: 0 0 22px; }
.login-ui .login-dialog .version .app-name {
    font-size: 22px; font-weight: 800; letter-spacing: .2px; text-transform: none; color: var(--rdpgw-text); line-height: 1.25;
}
.login-ui .login-dialog .version .version-number { display: none; }
.login-ui .login-dialog .version::after {
    display: block; color: var(--rdpgw-muted); font-size: 15px; margin-top: 6px; line-height: 1.45;
}
.login-ui .login-fields .labeled-field { margin: 0 0 12px; background: var(--rdpgw-bg); border-radius: 10px; }
.login-ui .login-fields .labeled-field .field-header {
    margin: 13px 15px; font-size: 16px; color: var(--rdpgw-muted); opacity: 1;
}
.login-ui .login-fields .form-field,
.login-ui .login-fields .text-field,
.login-ui .login-fields .password-field { display: block; width: 100%; }
.login-ui .login-fields input[type="text"],
.login-ui .login-fields input[type="password"],
.login-ui .login-fields input[type="number"],
.login-ui .login-fields input[type="email"] {
    width: 100%; max-width: none; box-sizing: border-box; font: inherit; font-size: 16px; padding: 12px 14px;
    background: var(--rdpgw-bg); color: var(--rdpgw-text);
    border: 1px solid var(--rdpgw-border); border-radius: 10px;
}
.login-ui .login-fields .labeled-field input[name]:focus {
    background: var(--rdpgw-card); outline: 2px solid var(--rdpgw-primary); outline-offset: 1px;
}
.login-ui .login-dialog .buttons { margin: 18px 0 0; }
.login-ui .buttons input[type="submit"] {
    width: 100%; margin: 0; padding: 13px 20px; font: inherit; font-size: 16px; font-weight: 700;
    border: 0; border-radius: 10px; cursor: pointer;
}
.login-ui p.login-error, .login-ui .login-error {
    background: #fdecea; color: #a12a22; border-radius: 8px; padding: 10px 12px; font-size: 14px; text-align: left;
}
input[type="submit"], button, a.button {
    background-color: var(--rdpgw-primary);
    color: var(--rdpgw-on-primary);
}
input[type="submit"]:hover, button:hover, a.button:hover {
    background-color: var(--rdpgw-primary);
    filter: brightness(1.12);
}
input[type="submit"]:active, button:active, a.button:active {
    background-color: var(--rdpgw-primary);
    filter: brightness(0.9);
}
button.danger, a.button.danger { background-color: #A43; filter: none; }
.header { border-bottom: 3px solid var(--rdpgw-primary); }
.login-ui .login-dialog .logo {
    width: 100%;
    max-width: 3in;
    height: 4em;
    background-image: url("app/ext/rdpgw-branding/images/logo.png");
    background-size: contain;
    -moz-background-size: contain;
    -webkit-background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
