/*
 * 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}/* SimpleLinks Cloud branding for the Guacamole login page. */

/* Replace the Guacamole avocado with the SimpleLinks logo (728x154 PNG). */
.login-ui .login-dialog .logo {
    background-image: url('app/ext/simplelinks-branding/images/simplelinks-logo.png');
    background-size: contain !important;
    -webkit-background-size: contain !important;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 18em;
    height: 3.1em;
    margin: 0.5em auto 1em auto;
}

/* Product name under the logo, in SimpleLinks blue. */
.login-ui .login-dialog .version .app-name {
    color: #2A62E2;
    letter-spacing: 0.05em;
}

/* Hide the Guacamole version number. */
.login-ui .login-dialog .version .version-number {
    display: none;
}

/* Login button in SimpleLinks blue. */
.login-ui .login-dialog .buttons input[type="submit"] {
    background-color: #2A62E2;
    border-color: #1E4CB8;
}
.login-ui .login-dialog .buttons input[type="submit"]:hover {
    background-color: #1E4CB8;
}

/* "Back to home" button on the logged-out screen, styled like Guacamole's buttons. */
.sl-home-btn {
    display: inline-block;
    margin-left: 0.5em;
    padding: 0.35em 1em;
    background: #2A62E2;
    color: #fff !important;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    vertical-align: middle;
}
.sl-home-btn:hover { background: #1E4CB8; }

/* Link under the login form. */
.sl-home-link {
    display: block;
    text-align: center;
    margin-top: 0.9em;
    font-size: 0.9em;
    color: #2A62E2 !important;
    text-decoration: none;
}
.sl-home-link:hover { text-decoration: underline; }
/* SimpleLinks Cloud: Files sidebar inside the Tally web app. */
.sl-files, .sl-overlay, .sl-files-tab {
    --sl-blue: #2A62E2; --sl-blue-dark: #1E4CB8; --sl-red: #D4343B;
    --sl-ink: #1B2333; --sl-muted: #5B6578; --sl-line: #E2E6EE; --sl-bg: #FFFFFF; --sl-soft: #F4F6FA;
    font-family: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px; line-height: 1.4; color: var(--sl-ink); box-sizing: border-box;
}
.sl-files *, .sl-overlay * { box-sizing: border-box; }

.sl-files-tab {
    position: fixed; right: 0; top: 40%; z-index: 2147483000;
    writing-mode: vertical-rl; transform: rotate(180deg);
    background: var(--sl-blue); color: #fff; border: 0; border-radius: 0 8px 8px 0;
    padding: 14px 7px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.25); opacity: .85;
}
.sl-files-tab:hover, .sl-files-tab.sl-active { opacity: 1; background: var(--sl-blue-dark); }
.sl-files-tab[hidden] { display: none; }

.sl-files {
    position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw; z-index: 2147483001;
    background: var(--sl-bg); border-left: 1px solid var(--sl-line); box-shadow: -6px 0 24px rgba(0,0,0,.18);
    display: flex; flex-direction: column; padding: 0 0 8px 0;
}
.sl-files[hidden] { display: none; }
.sl-files.sl-drop { outline: 3px dashed var(--sl-blue); outline-offset: -8px; background: #F0F5FF; }

.sl-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 8px 16px; border-bottom: 1px solid var(--sl-line); }
.sl-title { flex: 1; margin: 0; font-size: 18px; font-weight: 700; color: var(--sl-ink); }
.sl-lang { border: 1px solid var(--sl-line); background: var(--sl-soft); border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--sl-ink); font: inherit; font-size: 13px; }
.sl-icon-btn { border: 0; background: transparent; font-size: 20px; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; color: var(--sl-muted); }
.sl-icon-btn:hover, .sl-lang:hover { background: var(--sl-line); }

.sl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px 12px 0 12px; }
.sl-crumb { border: 0; background: transparent; color: var(--sl-blue); padding: 2px 4px; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 600; }
.sl-crumb:hover { background: var(--sl-soft); }
.sl-sep { color: var(--sl-muted); }
.sl-info { margin: 4px 16px 0 16px; color: var(--sl-muted); font-size: 13px; }

.sl-toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 4px 16px; }
.sl-btn { border: 1px solid var(--sl-line); background: #fff; color: var(--sl-ink); border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.sl-btn:hover { background: var(--sl-soft); }
.sl-btn[disabled] { opacity: .5; cursor: not-allowed; }
.sl-primary { background: var(--sl-blue); border-color: var(--sl-blue); color: #fff; }
.sl-primary:hover { background: var(--sl-blue-dark); }
.sl-danger-btn { background: var(--sl-red); border-color: var(--sl-red); color: #fff; }

.sl-msg { margin: 6px 16px 0 16px; font-size: 13px; min-height: 0; }
.sl-msg:empty { display: none; }
.sl-msg.sl-err { color: #fff; background: var(--sl-red); padding: 6px 10px; border-radius: 6px; }
.sl-msg.sl-info-msg { color: var(--sl-blue-dark); }

.sl-list { flex: 1; overflow-y: auto; padding: 8px 8px; }
.sl-empty { color: var(--sl-muted); text-align: center; padding: 32px 12px; border: 2px dashed var(--sl-line); border-radius: 10px; margin: 8px; }
.sl-row { display: flex; align-items: center; border-radius: 8px; }
.sl-row:hover { background: var(--sl-soft); }
.sl-row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 6px;
    text-align: left; border: 0; background: transparent; padding: 7px 8px; cursor: pointer; font: inherit; color: inherit; }
.sl-ico { grid-row: span 2; font-size: 20px; align-self: center; text-align: center; }
.sl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sl-sub { color: var(--sl-muted); font-size: 12px; }
.sl-sub:empty { display: none; }
.sl-acts { display: flex; gap: 2px; padding-right: 4px; }
.sl-act { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 15px; opacity: .65; }
.sl-act:hover { background: var(--sl-line); opacity: 1; }
.sl-danger { color: var(--sl-red); }

.sl-usage { padding: 8px 16px 0 16px; font-size: 12px; color: var(--sl-muted); border-top: 1px solid var(--sl-line); }
.sl-bar { height: 6px; background: var(--sl-line); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.sl-bar span { display: block; height: 100%; background: var(--sl-blue); }
.sl-bar.sl-over span { background: var(--sl-red); }
.sl-drive { margin: 6px 16px 0 16px; font-size: 12px; color: var(--sl-muted); word-break: break-word; }

.sl-overlay { position: fixed; inset: 0; z-index: 2147483002; background: rgba(15,20,30,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sl-dialog { background: #fff; border-radius: 12px; padding: 18px 20px; width: 420px; max-width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.sl-dialog.sl-wide { width: min(1100px, 100%); }
.sl-dialog h3 { margin: 0 0 12px 0; font-size: 17px; word-break: break-word; }
.sl-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sl-input { width: 100%; padding: 8px 10px; border: 1px solid #C9D0DC; border-radius: 8px; font: inherit; color: var(--sl-ink); background: #fff; }
.sl-input:focus { outline: 2px solid var(--sl-blue); outline-offset: 0; }
.sl-field { display: block; margin-bottom: 10px; }
.sl-field > span, .sl-label { display: block; font-weight: 600; margin: 0 0 4px 0; font-size: 13px; }
.sl-people { display: grid; gap: 6px; max-height: 40vh; overflow: auto; }
.sl-person { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; font-size: 13px; }
.sl-err { color: var(--sl-red); font-size: 13px; margin: 6px 0 0 0; min-height: 1em; }
.sl-strong { font-weight: 600; word-break: break-word; }
.sl-linkbtn { border: 0; background: transparent; padding: 8px 0 0 0; cursor: pointer; font: inherit; text-decoration: underline; }
.sl-fine { font-size: 12px; color: var(--sl-muted); margin: 0 0 8px 0; }

.sl-sheets { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.sl-sheet { border: 1px solid var(--sl-line); background: var(--sl-soft); border-radius: 6px 6px 0 0; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 13px; }
.sl-sheet.sl-on { background: #fff; border-bottom-color: #fff; font-weight: 700; color: var(--sl-blue-dark); }
.sl-grid { overflow: auto; max-height: 62vh; border: 1px solid var(--sl-line); }
.sl-grid table { border-collapse: collapse; font-size: 13px; }
.sl-grid th, .sl-grid td { border: 1px solid var(--sl-line); padding: 3px 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sl-grid thead th { position: sticky; top: 0; background: var(--sl-soft); z-index: 1; }
.sl-grid tbody th { background: var(--sl-soft); color: var(--sl-muted); font-weight: 500; position: sticky; left: 0; }

@media (max-width: 520px) {
    .sl-files { width: 100vw; }
    .sl-person { grid-template-columns: 1fr; }
}
