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

    display: none;

}

.login-ui .sso-providers:last-child {
    display: block;
}

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

}
/*
 * HiveSolutions branding for Apache Guacamole — v2 (friendlier, polished).
 * Gold #F5A623 / #FFD066 on navy #0F1A2E.  Display: Nunito.  Body: Inter.
 */

/* ----------------------------- Brand fonts (self-hosted) ----------------------------- */
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url('app/ext/hive-branding/fonts/nunito-700.woff2') format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url('app/ext/hive-branding/fonts/nunito-800.woff2') format('woff2');}
@font-face{font-family:'Nunito';font-style:normal;font-weight:900;font-display:swap;src:url('app/ext/hive-branding/fonts/nunito-900.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('app/ext/hive-branding/fonts/inter-400.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('app/ext/hive-branding/fonts/inter-500.woff2') format('woff2');}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('app/ext/hive-branding/fonts/inter-600.woff2') format('woff2');}

:root {
    --hive-gold:    #F5A623;
    --hive-gold-hi: #FFD066;
    --hive-gold-lo: #D4911E;
    --hive-navy:    #0F1A2E;
    --hive-navy-2:  #152E4A;
    --hive-navy-3:  #1E3A5F;
    --hive-ink:     #0A0B10;
    --hive-card:    #13151C;
    --hive-line:    #243049;
    --hive-text:    #E6EDF5;
    --hive-text-dim:#8CA0B8;
    --hive-font:    'Inter', system-ui, 'Segoe UI', sans-serif;
    --hive-display: 'Nunito', 'Inter', system-ui, sans-serif;
}

@keyframes hiveFloat   { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-7px); } }
@keyframes hiveGlow    { 0%,100% { filter: drop-shadow(0 6px 16px rgba(245,166,35,.35)); }
                         50%     { filter: drop-shadow(0 10px 26px rgba(245,166,35,.55)); } }
@keyframes hiveRise    { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

body, input, button, select, textarea { font-family: var(--hive-font) !important; }

/* ============================== LOGIN SCREEN ============================== */

.login-ui {
    background:
        radial-gradient(1100px 520px at 50% -8%, rgba(245,166,35,.16), transparent 60%),
        radial-gradient(circle at 50% 24%, var(--hive-navy-3) 0%, var(--hive-navy-2) 46%, var(--hive-navy) 100%) !important;
}

.login-ui .login-dialog {
    background: rgba(16, 22, 38, 0.72) !important;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid rgba(245,166,35,.30) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05) !important;
    padding: 2.6em 2.8em 2.2em !important;
    min-width: 320px !important;
    animation: hiveRise .5s cubic-bezier(.2,.7,.2,1) both;
}

/* Hex logo — floating + glowing */
.login-ui .login-dialog .logo {
    background: url('app/ext/hive-branding/images/hex.png') no-repeat center !important;
    background-size: contain !important;
    width: 120px !important; height: 120px !important;
    margin: 0 auto .2em !important;
    animation: hiveFloat 5s ease-in-out infinite, hiveGlow 5s ease-in-out infinite;
}

.login-ui .version { text-align: center !important; width: 100% !important; }
.login-ui .app-name {
    font-family: var(--hive-display) !important;
    font-weight: 900 !important; font-size: 1.4em !important;
    letter-spacing: 0 !important; white-space: nowrap !important;
    /* solid gold — a gradient + background-clip:text clips letters that exceed
       the text box width, which made "HiveSolutions" render as "HIVESOLUTIC" */
    background: none !important;
    color: #FFC24A !important; -webkit-text-fill-color: #FFC24A !important;
}
/* Guacamole's default .version-number is absolutely-positioned at the card
   bottom with a green background + italic (a build indicator). Hide it — we
   show the tagline ourselves. */
.login-ui .version-number { display: none !important; }
.login-ui .login-form::after {
    content: "Healthcare at your fingertips";
    display: block; text-align: center; color: #5C728A;
    font-size: .68em; letter-spacing: 1.8px; text-transform: uppercase; margin-top: 1.7em;
}

/* Fields */
.login-ui .login-fields input,
.login-ui input[type=text], .login-ui input[type=password], .login-ui input[type=email] {
    background: rgba(255,255,255,.09) !important;
    border: 1px solid #46587A !important;
    color: #F5F9FF !important; border-radius: 11px !important;
    padding: .7em .9em !important; transition: border-color .15s, box-shadow .15s;
}
.login-ui .login-fields input::placeholder { color: #5C728A !important; }
.login-ui .login-fields input:focus {
    border-color: var(--hive-gold) !important;
    box-shadow: 0 0 0 3px rgba(245,166,35,.22) !important; outline: none !important;
}

/* Gold sign-in button */
.login-ui .buttons input.login, .login-ui input[type=submit] {
    background: linear-gradient(135deg, var(--hive-gold-hi) 0%, var(--hive-gold) 55%, var(--hive-gold-lo) 100%) !important;
    color: #1A1206 !important; font-weight: 800 !important; font-family: var(--hive-display) !important;
    border: none !important; border-radius: 12px !important; padding: .75em 1em !important;
    letter-spacing: .3px !important; text-shadow: none !important; cursor: pointer;
    box-shadow: 0 8px 22px rgba(245,166,35,.32) !important; transition: transform .12s, box-shadow .12s, filter .12s;
}
.login-ui .buttons input.login:hover, .login-ui input[type=submit]:hover {
    transform: translateY(-2px); filter: brightness(1.05);
    box-shadow: 0 12px 30px rgba(245,166,35,.45) !important;
}
.login-ui .login-error { color: #FCA5A5 !important; }

/* TOTP enrollment / any auth-flow text (instructions, headings, labels) must
   be readable on the dark card — Guacamole defaults them to near-black. */
.login-ui p, .login-ui h1, .login-ui h3, .login-ui h4,
.login-ui label, .login-ui li, .login-ui td, .login-ui dt, .login-ui dd,
.login-ui .form-field, .login-ui guac-form * {
    color: #E6EDF5 !important;
}
.login-ui h2:not(.app-name) { color: #FFE2A6 !important; }
.login-ui a { color: #FFD066 !important; }
/* the QR barcode keeps its white quiet-zone; just frame it cleanly */
.login-ui img { border-radius: 8px; }

/* SSO redirect ("Redirecting to sign-in…") */
.redirect-field-container { text-align: center; }
.redirect-field p { color: var(--hive-text-dim) !important; font-size: .9em; }

/* ============================ HOME / APP PAGES ============================ */

body, .home-view, .settings, #content, .view {
    background-color: var(--hive-ink) !important; color: var(--hive-text) !important;
}

.home-view .connection-list-ui { position: relative; background: var(--hive-ink) !important; }

/* Welcome hero banner (one per page: .settings:not(.section) avoids the
   inner duplicate settings container also drawing a banner) */
.home-view .connection-list-ui::before,
.settings:not(.section)::before {
    content: "HiveSolutions";
    display: flex; align-items: center; gap: 16px;
    height: 76px; padding: 0 26px 0 84px;
    margin: 0 0 .6em 0;
    background:
        linear-gradient(120deg, rgba(245,166,35,.12), transparent 55%),
        url('app/ext/hive-branding/images/hex.png') no-repeat 20px center / 46px 46px,
        linear-gradient(180deg, #122139, var(--hive-navy)) !important;
    color: var(--hive-gold);
    font-family: var(--hive-display); font-weight: 900; font-size: 1.55em; letter-spacing: .3px;
    border-bottom: 2px solid rgba(245,166,35,.55);
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    position: relative; z-index: 1;
}

.home-view .header { background: transparent !important; border: none !important; padding: .2em 1em !important; }
.home-view h2, .settings h2, .view h2 {
    font-family: var(--hive-display) !important; font-weight: 800 !important;
    color: #FFE2A6 !important; letter-spacing: .2px !important;
}

/* Recent session thumbnails */
.recent-connections .connection { padding: .6em !important; }
.recent-connections .connection a {
    display: inline-block; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--hive-line); background: var(--hive-card);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.recent-connections .connection a:hover {
    transform: translateY(-4px); border-color: var(--hive-gold);
    box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
.recent-connections .caption .name { color: var(--hive-text) !important; font-weight: 600 !important; padding: .5em; display:block; }

/* Workspace tiles (all connections) */
.all-connections a.home-connection {
    display: flex !important; align-items: center; gap: 14px;
    background: linear-gradient(180deg, #161A24, var(--hive-card)) !important;
    border: 1px solid var(--hive-line) !important; border-radius: 14px !important;
    padding: 16px 18px !important; margin: 8px 0 !important;
    color: var(--hive-text) !important; text-decoration: none !important;
    transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.all-connections a.home-connection:hover {
    transform: translateY(-3px);
    border-color: var(--hive-gold) !important;
    background: linear-gradient(180deg, #1C2334, #161A24) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(245,166,35,.25) inset !important;
}
.all-connections a.home-connection .name {
    color: #F5F9FF !important; font-family: var(--hive-display) !important;
    font-weight: 700 !important; font-size: 1.05em !important;
}
.all-connections .home-connection .icon.type {
    width: 30px !important; height: 30px !important; opacity: .92;
    filter: drop-shadow(0 0 6px rgba(245,166,35,.35));
}
.all-connections a.home-connection.active { box-shadow: 0 0 0 2px var(--hive-gold) inset !important; }

/* Search / filter */
.home-view input[type=text], .settings input[type=text], .filter input {
    background: rgba(8,11,18,.85) !important; border: 1px solid var(--hive-line) !important;
    color: #F5F9FF !important; border-radius: 10px !important; padding: .55em .8em !important;
}
.home-view input[type=text]:focus, .filter input:focus {
    border-color: var(--hive-gold) !important; box-shadow: 0 0 0 3px rgba(245,166,35,.2) !important; outline: none;
}

/* User menu (top-right) */
.user-menu .menu-dropdown .menu-title {
    background: linear-gradient(135deg, var(--hive-gold-hi), var(--hive-gold) 60%, var(--hive-gold-lo)) !important;
    color: #1A1206 !important; font-family: var(--hive-display) !important; font-weight: 800 !important;
    border-radius: 999px !important; padding: .45em 1.1em !important;
    box-shadow: 0 6px 16px rgba(245,166,35,.3) !important;
}
.user-menu .menu-contents {
    background: #10131B !important; border: 1px solid var(--hive-line) !important;
    border-radius: 12px !important; box-shadow: 0 18px 40px rgba(0,0,0,.5) !important; overflow: hidden;
}
.user-menu .menu-contents a { color: var(--hive-text) !important; }
.user-menu .menu-contents a:hover { background: rgba(245,166,35,.14) !important; color: #FFE2A6 !important; }
.user-menu .profile .full-name a { color: var(--hive-gold) !important; }

/* Settings tabs/tables */
.settings .page-tabs, .settings .section-tabs { background: var(--hive-navy) !important; border-radius: 10px 10px 0 0; }
.settings .page-tabs a, .section-tabs a { color: #B9C6D6 !important; }
.settings .page-tabs .current a, .section-tabs .current a {
    color: var(--hive-gold) !important; border-bottom: 2px solid var(--hive-gold) !important;
}
.settings table thead { background: var(--hive-card) !important; color: #F5F9FF !important; }
.settings table td, .settings table th { border-color: var(--hive-line) !important; }

/* Generic primary buttons */
button.primary, .button.primary, input[type=submit].primary, .buttons input[type=button] {
    background: linear-gradient(135deg, var(--hive-gold-hi) 0%, var(--hive-gold) 55%, var(--hive-gold-lo) 100%) !important;
    color: #1A1206 !important; border: none !important; font-weight: 800 !important;
    font-family: var(--hive-display) !important; border-radius: 11px !important;
    box-shadow: 0 6px 16px rgba(245,166,35,.28) !important; transition: transform .12s, filter .12s;
}
button.primary:hover, .button.primary:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* In-session client slide-out menu */
.menu .header, .menu-section .header { background: var(--hive-navy) !important; color: var(--hive-gold) !important; }

/* =================== READABILITY: light text on the dark theme =================== */
/* Guacamole's defaults leave many text elements near-black; force them light. */
.name,
#content p, #content li, #content td, #content th, #content label,
#content .ng-binding:not(.menu-title):not(.app-name),
.settings .connection .name, .settings .connection-group .name,
.all-connections .name, .recent-connections .name,
.list-buttons, .protocol, .description {
    color: #E6EDF5 !important;
}
.home-view .placeholder, .recent-connections .placeholder { color: #9FB1C7 !important; }

/* Dark protocol/list/tree icons are invisible on the dark theme — lighten them */
.home-view .icon.type, .settings .icon.type,
.all-connections .icon, .recent-connections .icon,
.settings .connection .icon, .settings .connection-group .icon,
.settings .list-item .icon {
    filter: brightness(0) invert(0.82) !important;
}

.login-ui .version-number { color: #8CA0B8 !important; }

/* Scrollbar accents */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #2A3550; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--hive-gold-lo); }
::-webkit-scrollbar-track { background: var(--hive-ink); }
