/*
 * 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 {
  --font-size-h1: 40px;
  --font-size-h2: 34px;
  --font-size-h3: 28px;
  --font-size-h4: 24px;
  --font-size-h5: 18px;
  --font-size-h6: 16px;
  --font-size-text: 19px;
  --font-size-small: 13px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-image: url('/guacamole/app/ext/mytheme/images/ivoris-demo-bg.jpg') !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: cover !important;
}

.login-ui {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-ui .login-dialog-middle,
.login-ui .login-dialog.notification,
.login-ui .login-form {
  width: 100%;
}

.login-ui .login-dialog-middle {
  max-width: 520px;
  padding: 2rem;
  box-sizing: border-box;
}

.login-ui .login-dialog.notification {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.login-ui .login-form .logo {
  width: min(320px, 80%);
  height: 76px;
  margin: 0 auto 2rem;
  background: url('/guacamole/app/ext/mytheme/images/ivoris-demo-logo.svg')
    center/contain no-repeat !important;
  display: block !important;
}

.login-ui .version,
.login-ui .login-form p[ng-show='helpText'],
.login-ui .continue-login,
.login-ui .toggle-password,
.login-ui .login-error {
  display: none !important;
}

.login-ui .login-fields {
  margin: 0;
}

.login-ui .form,
.login-ui .fields {
  display: grid;
  gap: 0.9rem;
}

.login-ui .labeled-field {
  position: relative;
  margin: 0;
}

.login-ui .labeled-field .field-header {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  pointer-events: none !important;
  z-index: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

.login-ui .labeled-field .field-header label {
  padding: 0 1.1rem !important;
  color: #999 !important;
  font-size: var(--font-size-text) !important;
  line-height: 3.4rem !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  text-align: left !important;
}

.login-ui .labeled-field:not(.empty) .field-header {
  opacity: 0;
}

.login-ui .form-field {
  margin: 0;
}

.login-ui .labeled-field input[type='text'],
.login-ui .labeled-field input[type='password'] {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 3.4rem !important;
  border: 1px solid #ffd597 !important;
  border-radius: 0.4rem !important;
  background: #ffffff !important;
  color: #1a1a1a !important;
  font-size: var(--font-size-text) !important;
  line-height: 1.5 !important;
  padding: 0.85rem 1.1rem !important;
  vertical-align: middle !important;
}

.login-ui .labeled-field input[type='text']::placeholder,
.login-ui .labeled-field input[type='password']::placeholder {
  color: #999;
  opacity: 1;
}

.login-ui .labeled-field input:focus {
  outline: none;
  border: 1px solid #093b61;
}

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

.login-ui .buttons .login {
  width: 100%;
  height: 3.4rem;
  border: 0;
  border-radius: 0.4rem;
  background: #093b61;
  color: #fff;
  font-size: var(--font-size-h5);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
}

.login-ui .buttons .login:hover {
  background: #0b4a7a;
}

.login-ui .buttons .login:active {
  background: #07304f;
}

.login-ui {
  background: unset !important;
}

/* =============================================
   In-Session Credential Prompt (login2 / modal)
   ============================================= */

/* Modal backdrop – override Guacamole's absolute positioning */
.client-status-modal.shown {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.55) !important;
  z-index: 99999 !important;
}

/* Modal card – override Guacamole notification panel */
.client-status-modal guac-modal,
.client-status-modal guac-modal > .modal-contents {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

.client-status-modal .modal-contents {
  background: #fff !important;
  border-radius: 0.6rem !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
  padding: 2.5rem 2rem 2rem !important;
  max-width: 520px !important;
  width: 90vw !important;
  box-sizing: border-box !important;
}

/* Logo in the modal */
.client-status-modal .modal-contents::before {
  content: '' !important;
  display: block !important;
  width: min(280px, 80%) !important;
  height: 68px !important;
  margin: 0 auto 1.8rem !important;
  background: url('/guacamole/app/ext/mytheme/images/ivoris-demo-logo.svg')
    center/contain no-repeat !important;
}

/* Notification form reset – override Guacamole's form.notification styles */
.client-status-modal form.notification,
.client-status-modal .notification {
  position: static !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: none !important;
  animation: none !important;
}

/* Hide title bar */
.client-status-modal .title-bar {
  display: none !important;
}

/* Hide non-authentication form sections */
.client-status-modal .form:not(.form-authentication) {
  display: none !important;
}

/* Hide form-header ("Authentifizierung") */
.client-status-modal .form-authentication .form-header {
  display: none !important;
}

/* Body / parameters area */
.client-status-modal .body {
  padding: 0 !important;
  margin: 0 !important;
}

.client-status-modal .parameters {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Fields layout */
.client-status-modal .form-group {
  display: block !important;
}

.client-status-modal .form-authentication {
  display: grid !important;
  gap: 0.9rem !important;
}

.client-status-modal .form-authentication .fields {
  display: grid !important;
  gap: 0.9rem !important;
}

/* Labeled field container */
.client-status-modal .labeled-field {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

/* Floating label (placeholder-style) */
.client-status-modal .labeled-field .field-header {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  pointer-events: none !important;
  z-index: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

.client-status-modal .labeled-field .field-header label {
  padding: 0 1.1rem !important;
  color: #999 !important;
  font-size: var(--font-size-text) !important;
  line-height: 3.4rem !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  text-align: left !important;
}

.client-status-modal .labeled-field:not(.empty) .field-header {
  opacity: 0 !important;
}

/* Form field reset */
.client-status-modal .form-field {
  margin: 0 !important;
  padding: 0 !important;
}

/* Text & password inputs */
.client-status-modal .labeled-field input[type='text'],
.client-status-modal .labeled-field input[type='password'] {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 3.4rem !important;
  border: 1px solid #ffd597 !important;
  border-radius: 0.4rem !important;
  background: #ffffff !important;
  color: #1a1a1a !important;
  font-size: var(--font-size-text) !important;
  line-height: 1.5 !important;
  padding: 0.85rem 1.1rem !important;
  vertical-align: middle !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.client-status-modal .labeled-field input[type='text']::placeholder,
.client-status-modal .labeled-field input[type='password']::placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

.client-status-modal .labeled-field input:focus {
  outline: none !important;
  border: 1px solid #093b61 !important;
}

/* Hide toggle-password icon */
.client-status-modal .toggle-password {
  display: none !important;
}

/* Buttons – override Guacamole button styles */
.client-status-modal .buttons {
  margin-top: 0.9rem !important;
  display: flex !important;
  gap: 0.6rem !important;
  padding: 0 !important;
  text-align: center !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.client-status-modal .buttons button {
  flex: 1 !important;
  height: 3.4rem !important;
  border: 0 !important;
  border-radius: 0.4rem !important;
  background: #093b61 !important;
  color: #fff !important;
  font-size: var(--font-size-h5) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  cursor: pointer !important;
  padding: 0 1.5rem !important;
  margin: 0 !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.client-status-modal .buttons button:hover {
  background: #0b4a7a !important;
}

.client-status-modal .buttons button:active {
  background: #07304f !important;
}

/* "Abbruch" button – secondary style */
.client-status-modal .buttons button:last-child {
  background: transparent !important;
  color: #093b61 !important;
  border: 1px solid #093b61 !important;
}

.client-status-modal .buttons button:last-child:hover {
  background: rgba(9, 59, 97, 0.06) !important;
}

/* Hide progress bar & countdown if unused */
.client-status-modal .progress {
  display: none !important;
}

.client-status-modal .countdown-text {
  display: none !important;
}

/* Hide text paragraph if empty */
.client-status-modal p.text.ng-hide {
  display: none !important;
}

body.client {
  background: url('/guacamole/app/ext/mytheme/images/ivoris-demo-bg.jpg') !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.client-status-modal.shown {
  background: transparent !important;
}

.client-status-modal .notification {
  color: #002c5a !important;
}

.button.reconnect:before,
button.reconnect:before,
.button.logout:before,
button.logout:before {
  display: none !important;
}
