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

}
/* PRISM-HPC-01 — CSS รุ่น v5 (แก้ปัญหาจาก v4 ที่ทดสอบจริงแล้ว)
   ==========================================================================
   v4 ใส่ป้ายที่ body::before เพื่อให้ชนะ specificity ที่ทับ content ของเรา — ได้ผลจริง
   แต่ "body" อยู่ทุกหน้าของแอป Guacamole (SPA) รวมถึงหน้าจอ remote desktop ตอนใช้งานจริง
   (route /client/...) ทำให้ป้ายไปบังหน้าจอที่กำลังใช้งานอยู่ ซึ่งไม่ถูกต้อง

   รอบนี้ย้ายป้ายไปผูกกับ .login-ui แทน (ยังคง !important ทุกจุดเพื่อกัน specificity เดิม)
   เพราะ .login-ui เป็น element เฉพาะหน้า login เท่านั้น (ตรวจจากซอร์สโค้ดต้นทางแล้วว่า
   Guacamole ใช้ Angular route สลับออกเมื่อ login สำเร็จ) ป้ายจะหายไปเองทันทีที่ login ผ่าน
   ไม่ว่า .login-ui จะถูกลบออกจาก DOM จริงหรือแค่ซ่อนด้วย display:none ก็ตาม เพราะ
   generated content (::before) ของ element ที่ไม่แสดงผล จะไม่แสดงผลตามไปด้วยเสมอ

   เพิ่มเติม: ขยายกล่อง login ให้ใหญ่ขึ้นตามที่ขอ (การ์ด/ไอคอน/ตัวอักษร/ปุ่ม/ช่องกรอก) */

:root{
  --prism-accent: #1F5FA8;
  --prism-accent-2: #5C93DD;
  --prism-ink: #0D131C;
  --prism-muted: #69727F;
  --prism-line: #DEE4EB;
  --prism-panel: #0E1218;
}

/* ===== แถบแจ้งเตือน — ผูกกับ .login-ui เท่านั้น ไม่ใช่ body อีกต่อไป ===== */
.login-ui::before {
  content: "▎ PRISM-HPC-01 · MACHINE SIGN-IN — เข้าใช้งานเครื่องประมวลผลด้วยบัญชี Windows ของเครื่อง คนละบัญชีกับที่ใช้เข้า PRISM" !important;
  display: block !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  z-index: 999999 !important;
  padding: 10px 16px !important;
  background: #0E1218 !important;
  border-bottom: 1px solid rgba(255,255,255,.14) !important;
  color: #93A0B3 !important;
  font: 12.5px/1.5 -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ดันการ์ด login ทั้งหน้าลงมาให้พ้นแถบบนสุด (มีผลเฉพาะตอน .login-ui แสดงอยู่เท่านั้น) */
div.login-ui{
  top: 46px !important;
  height: calc(100% - 46px) !important;
}

/* ===== การ์ดล็อกอิน — ขยายให้ใหญ่ขึ้นตามที่ขอ ===== */
.login-dialog{
  width: 420px !important;
  max-width: 92vw !important;
  padding: 8px 6px !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(13,19,28,.06), 0 12px 32px rgba(13,19,28,.12) !important;
  border: 1px solid var(--prism-line) !important;
}
.login-form{
  padding: 14px 10px !important;
}

/* แทนที่โลโก้ Guacamole เดิมด้วยไอคอนจอประมวลผล (ขยายใหญ่ขึ้นเล็กน้อย) */
.login-dialog .logo{
  background-image: none !important;
  width: 54px !important;
  height: 54px !important;
  margin: 4px auto 12px !important;
  border-radius: 12px;
  background-color: var(--prism-panel);
  position: relative;
}
.login-dialog .logo::after{
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><rect x='3' y='4' width='18' height='12' rx='1.5' stroke='%235C93DD' stroke-width='1.6'/><path d='M8 20h8M12 16v4' stroke='%235C93DD' stroke-width='1.6' stroke-linecap='round'/><path d='M6.5 8h4M6.5 11h7' stroke='%2300AB8E' stroke-width='1.3' stroke-linecap='round'/></svg>") no-repeat center;
  background-size: 27px 27px;
}

.login-dialog .version .app-name{
  font-family: -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  color: var(--prism-ink) !important;
}
.login-dialog .version .version-number{
  display: none !important;
}

/* ===== ช่องกรอกข้อมูล — ขยายใหญ่ขึ้น ===== */
.login-fields{
  margin-top: 8px !important;
}
.login-fields .field-header{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  color: var(--prism-muted);
}
.login-fields .labeled-field{
  margin-bottom: 6px !important;
}
.login-fields .labeled-field input{
  border-radius: 9px !important;
  border: 1px solid var(--prism-line) !important;
  font-size: 15.5px !important;
  padding: 13px 14px !important;
  height: auto !important;
  width: 100% !important;
}
.login-fields .labeled-field input:focus{
  outline: 2px solid var(--prism-accent);
  outline-offset: 1px;
}

/* ===== ปุ่ม — ขยายใหญ่ขึ้น ===== */
.buttons{
  margin-top: 10px !important;
}
.buttons input.login,
.buttons input.continue-login{
  background: var(--prism-accent) !important;
  border: none !important;
  border-radius: 9px !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 15.5px !important;
  padding: 13px 16px !important;
  width: 100% !important;
}
.buttons input.login:hover,
.buttons input.continue-login:hover{
  filter: brightness(1.08);
}
