/*
 * 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}/* Постоянная панель над экраном подключения (расширение tg-ui) */
.client-view-content > .tgui-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 32px;
    padding: 0 6px;
    box-sizing: border-box;
    background: #262626;
    border-bottom: 1px solid #000;
    font: 13px/20px "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
    color: #ddd;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.tgui-bar .tgui-btn,
.tgui-bar button.tgui-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 26px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    color: #ddd;
    font: inherit;
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
    cursor: pointer;
}
.tgui-bar .tgui-btn:hover { background: #3a3a3a; border-color: #555; color: #fff; }
.tgui-bar .tgui-btn.tgui-on { background: #3d6db3; border-color: #5b8bd6; color: #fff; }
.tgui-bar .tgui-ico { font-size: 15px; line-height: 1; }
.tgui-bar .tgui-spacer { flex: 1 1 auto; }

/* меню Guacamole открывается под панелью, а не поверх неё */
#guac-menu, #filesystem-menu { top: 32px; height: calc(100% - 32px); }

/* узкий экран (телефон): только значки */
@media (max-width: 640px) {
    .tgui-bar .tgui-label { display: none; }
    .tgui-bar .tgui-btn { padding: 0 8px; }
}

/* кнопка на главной странице */
.tgui-home { padding: 0.75em 1em 0.25em; }
.tgui-home-btn {
    display: inline-block;
    padding: 0.4em 1em;
    border-radius: 4px;
    background: #3d6db3;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.95em;
}
.tgui-home-btn:hover { background: #2f5b9c; }

/* ссылки на управление аккаунтами видны только администраторам */
.tgui-admin-only { display: none !important; }
html.tgui-admin .tgui-bar .tgui-admin-only { display: inline-flex !important; }
html.tgui-admin .tgui-home.tgui-admin-only { display: block !important; }

/* статус буфера обмена на панели */
.tgui-bar .tgui-status { margin-left: 6px; font-size: 12px; color: #9fd29f; white-space: nowrap;
                         overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.tgui-bar .tgui-status.tgui-bad { color: #ff9b8f; }

/* окно ручной вставки/копирования */
.tgui-box { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45);
            display: flex; align-items: center; justify-content: center; }
.tgui-box-in { background: #fff; color: #1d2025; border-radius: 10px; padding: 16px 18px; width: min(560px, 92vw);
               box-shadow: 0 10px 40px rgba(0,0,0,.35); font: 14px/1.4 "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; }
.tgui-box-title { font-weight: 600; margin-bottom: 8px; }
.tgui-box textarea { width: 100%; height: 160px; box-sizing: border-box; font: inherit; padding: 8px;
                     border: 1px solid #c9ced6; border-radius: 6px; resize: vertical; color: #1d2025; background: #fff; }
.tgui-box-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tgui-box-btns button { height: 30px; padding: 0 12px; border-radius: 5px; border: 1px solid #c9ced6; background: #fff;
                        color: #1d2025; cursor: pointer; font: inherit; min-width: 0; margin: 0; box-shadow: none; text-shadow: none; }
.tgui-box-btns .tgui-ok { background: #3d6db3; border-color: #3d6db3; color: #fff; }
