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

}
:root {
    color-scheme: dark;
    --gateway-surface: rgba(18, 22, 28, 0.82);
    --gateway-line: rgba(255, 255, 255, 0.10);
    --gateway-text: #f4f6f8;
    --gateway-muted: #8d96a3;
    --gateway-accent: #89f0c4;
}

div.login-ui {
    position: fixed !important;
    inset: 0 !important;
    z-index: 20;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh;
    overflow: auto;
    color: var(--gateway-text);
    background:
        radial-gradient(circle at 50% 24%, rgba(84, 211, 164, 0.10), transparent 34rem),
        #090c10 !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

.login-ui::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.login-ui .login-dialog-middle {
    padding: 1.5rem;
}

.login-ui .login-dialog {
    width: min(22rem, calc(100vw - 3rem));
    max-width: none;
    padding: 2.35rem 2.15rem 2.15rem;
    border: 1px solid var(--gateway-line);
    border-radius: 18px;
    color: var(--gateway-text);
    background: var(--gateway-surface);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(20px);
}

.login-ui .login-dialog .logo {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.6rem;
    background: center / contain no-repeat
        url("app/ext/minimal-rdp-theme/resources/mark.svg");
}

.login-ui .login-dialog .version {
    display: none;
}

.login-ui .login-dialog p {
    color: var(--gateway-muted);
    font-size: 0.82rem;
}

.login-ui .login-fields .labeled-field {
    margin: 0 0 0.85rem;
}

.login-ui .login-fields label {
    display: block;
    margin: 0 0 0.42rem;
    color: var(--gateway-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-ui .login-fields input {
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    padding: 0 0.9rem;
    border: 1px solid var(--gateway-line);
    border-radius: 10px;
    outline: none;
    color: var(--gateway-text);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    transition: border-color 140ms ease, background 140ms ease;
}

.login-ui .login-fields input:focus {
    border-color: rgba(137, 240, 196, 0.7);
    background: rgba(255, 255, 255, 0.075);
}

.login-ui .buttons {
    margin-top: 1.15rem;
}

.login-ui input[type="submit"] {
    width: 100%;
    min-height: 3rem;
    border: 0;
    border-radius: 10px;
    color: #07110d;
    background: var(--gateway-accent);
    box-shadow: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: filter 140ms ease, transform 140ms ease;
}

.login-ui input[type="submit"]:hover {
    filter: brightness(1.06);
}

.login-ui input[type="submit"]:active {
    transform: translateY(1px);
}

.login-ui .login-error {
    border: 0;
    color: #ffb5b5;
    background: transparent;
}

@media (max-width: 480px) {
    .login-ui .login-dialog {
        padding: 1.8rem 1.35rem 1.45rem;
        border-radius: 15px;
    }
}
