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

}
/* InfoGrab skin for Apache Guacamole 1.5 — ig-dashboard tone (dark flat, dot status)
 * 토큰 SoT: ig-dashboard/app/static/index.html :root
 * 스코프: 홈(.home-view)·로그인(.login-ui)만 다크. 설정/관리 화면은 기본 라이트 유지. */

:root {
  --igd-page: #0d0d0d;
  --igd-surface: #1a1a19;
  --igd-surface-2: #222221;
  --igd-ink: #ffffff;
  --igd-ink-2: #c3c2b7;
  --igd-muted: #898781;
  --igd-line: rgba(255, 255, 255, .10);
  --igd-grid: #2c2c2a;
  --igd-good: #0ca30c;
  --igd-warn: #fab219;
  --igd-crit: #d03b3b;
  --igd-green: #5C9A4F;
  --igd-teal: #11686E;
}

@keyframes igd-blink { 50% { opacity: .25; } }

body {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", "Pretendard", sans-serif !important;
}

/* ── 다크 페이지 (홈/로그인 렌더 시에만) ── */
body:has(.home-view), body:has(.login-ui) { background: var(--igd-page) !important; }

.home-view { background: var(--igd-page); min-height: 100vh; color: var(--igd-ink); }

.connection-list-ui { max-width: 880px; margin: 0 auto; padding: 18px 20px 48px; }

/* 공통 헤더 → flex */
.connection-list-ui > .header {
  display: flex !important;
  align-items: center;
  gap: 14px;
  width: auto;
}

/* ── 첫 헤더 = ig-dashboard header 바 (surface + IG mark) ── */
.connection-list-ui > .header:first-of-type {
  background: var(--igd-surface) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 10px;
  box-shadow: none;
  padding: 10px 14px;
  margin: 4px 0 14px;
}
.connection-list-ui > .header:first-of-type h2 {
  display: flex; align-items: center; gap: 12px;
  color: var(--igd-ink) !important;
  font-size: 15px; font-weight: 800; letter-spacing: .18em;
  padding: 0; margin: 0; text-shadow: none;
  flex: 1;
}
.connection-list-ui > .header:first-of-type h2::before {
  content: "IG";
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--igd-green), var(--igd-teal));
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0;
}

/* ── 이후 헤더(모든 연결) = 패널 타이틀 행 ── */
.connection-list-ui > .header:not(:first-of-type) {
  background: transparent !important;
  border: none !important;
  box-shadow: none;
  padding: 18px 0 10px;
  margin: 0;
  justify-content: space-between;
}
.connection-list-ui > .header:not(:first-of-type) h2 {
  color: var(--igd-ink) !important;
  font-size: 13px; font-weight: 800;
  padding: 0; margin: 0;
}

/* ── 엣지 정렬: guac 기본 래퍼 패딩 제거 (히어로/카드/필터 좌우 라인 일치) ── */
.connection-list-ui .recent-connections,
.connection-list-ui .all-connections,
.connection-list-ui .group-list,
.connection-list-ui .group-list-page { padding: 0 !important; margin: 0 !important; }

/* ── 최근 연결 ── */
.recent-connections { text-align: left; }
.recent-connections .placeholder {
  font-size: 12.5px !important; font-weight: 500;
  color: var(--igd-muted) !important;
  opacity: 1 !important; text-shadow: none !important;
  background: var(--igd-surface);
  border: 1px solid var(--igd-line);
  border-radius: 10px;
  padding: 18px; text-align: center; margin: 0;
}
.recent-connections .connection {
  display: inline-block;
  background: var(--igd-surface);
  border: 1px solid var(--igd-line);
  border-radius: 10px;
  padding: 8px; margin: 0 8px 8px 0;
}
.recent-connections .connection:hover { border-color: rgba(255, 255, 255, .25); }
.recent-connections .connection .name { color: var(--igd-ink); font-weight: 600; font-size: 13px; }

/* ── 커넥션 행 = .svc 스타일 (dot + name + 상태 배지) ── */
.all-connections .group-list-page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 10px;
}
.all-connections .group-list .list-item { margin: 0; }
/* 같은 행 카드 높이 통일 */
.all-connections .list-item > .connection { height: 100%; }
.all-connections .list-item > .connection > .caption { height: 100%; box-sizing: border-box; }
.all-connections .group-list .connection { margin: 0; }
.all-connections .group-list .connection > .caption {
  background: var(--igd-surface);
  border: 1px solid var(--igd-line);
  border-radius: 10px;
  padding: 0 6px;
  transition: border-color .12s, background .12s;
}
.all-connections .group-list .connection > .caption:hover {
  border-color: rgba(255, 255, 255, .25);
  background: var(--igd-surface-2) !important;
}
.all-connections .group-list .connection.empty > .caption > .icon { display: none; }

a.home-connection {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 13px 14px;
  color: var(--igd-ink) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13.5px;
}
a.home-connection::before { order: 0; }
a.home-connection .name { order: 1; }
a.home-connection::after { order: 2; }
a.home-connection .activeUserCount { order: 3; }
.ig-desc {
  order: 4;
  flex-basis: 100%;
  padding-left: 21px;
  color: var(--igd-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.ig-chips {
  order: 5;
  flex-basis: 100%;
  padding-left: 21px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.ig-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  line-height: 1.5;
}
.ig-chip-warn { color: var(--igd-warn); background: color-mix(in srgb, var(--igd-warn) 14%, transparent); }
.ig-chip-crit { color: var(--igd-crit); background: color-mix(in srgb, var(--igd-crit) 14%, transparent); }
.ig-chip-good { color: var(--igd-good); background: color-mix(in srgb, var(--igd-good) 14%, transparent); }
.ig-chip-spark { color: #3987e5; background: color-mix(in srgb, #3987e5 14%, transparent); }
a.home-connection .icon.type { display: none; }
a.home-connection .name { color: var(--igd-ink) !important; }

/* 상태 dot: 기본 = 사용 가능(green) */
a.home-connection::before {
  content: "";
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--igd-good);
  flex: 0 0 auto;
}
/* 상태 배지: 기본 = 사용 가능 */
a.home-connection::after {
  content: "사용 가능";
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  color: var(--igd-good);
  border: 1px solid color-mix(in srgb, var(--igd-good) 40%, transparent);
  border-radius: 999px;
  padding: 2.5px 11px;
}
/* 사용 중 (activeUserCount가 렌더되면 = 세션 점유) */
a.home-connection:has(.activeUserCount:not(.ng-hide))::before {
  background: var(--igd-crit);
  box-shadow: 0 0 6px var(--igd-crit);
  animation: igd-blink 1s step-end infinite;
}
a.home-connection:has(.activeUserCount:not(.ng-hide))::after {
  content: "사용 중";
  color: var(--igd-crit);
  border-color: color-mix(in srgb, var(--igd-crit) 50%, transparent);
}
a.home-connection .activeUserCount {
  order: 3;
  font-size: 11px; color: var(--igd-muted);
  background: transparent; padding: 0 2px;
}

/* ── 필터 ── */
.home-view .filter { background: transparent !important; }
.home-view .filter input.search-string {
  background: var(--igd-surface-2) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  min-width: 240px;
  font-size: 12.5px;
  color: var(--igd-ink) !important;
}
.home-view .filter input.search-string::placeholder { color: var(--igd-muted); }
.home-view .filter input.search-string:focus {
  outline: none !important;
  border-color: rgba(255, 255, 255, .3) !important;
  box-shadow: none !important;
}

/* ── 사용자 메뉴 = badge 필 ── */
.home-view .user-menu .menu-dropdown {
  border: 1px solid var(--igd-line) !important;
  background: transparent !important;
  border-radius: 999px;
}
.home-view .user-menu .menu-dropdown:hover,
.home-view .user-menu .menu-dropdown.open { background: var(--igd-surface-2) !important; }
.home-view .user-menu .menu-dropdown .menu-title {
  color: var(--igd-ink-2) !important;
  font-size: 12.5px; font-weight: 600;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c3c2b7'><path d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: 12px center !important;
  background-size: 13px !important;
  padding-left: 32px !important;
}
.home-view .menu-dropdown .menu-indicator { filter: brightness(0) invert(.8); }
.home-view .menu-dropdown .menu-contents {
  background: var(--igd-surface) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5) !important;
  color: var(--igd-ink-2);
  overflow: hidden;
}
.home-view .menu-dropdown .menu-contents a { color: var(--igd-ink-2) !important; }
.home-view .menu-dropdown .menu-contents li a:hover { background: var(--igd-surface-2) !important; color: var(--igd-ink) !important; }
.home-view .menu-dropdown .menu-contents .profile { background: var(--igd-surface-2); border-bottom: 1px solid var(--igd-line); }

/* ── 버튼 (전역, ig-dashboard 서브틀 스타일) ── */
button, a.button, .button {
  background: transparent !important;
  color: inherit !important;
  border: 1px solid rgba(127, 127, 127, .35) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 600;
}
button:hover, a.button:hover, .button:hover { border-color: rgba(127, 127, 127, .65) !important; }
input[type="submit"], button.add, a.button.add {
  background: var(--igd-teal) !important;
  color: #fff !important;
  border-color: var(--igd-teal) !important;
}
button.danger, .button.danger {
  background: transparent !important;
  color: var(--igd-crit) !important;
  border-color: color-mix(in srgb, var(--igd-crit) 50%, transparent) !important;
}

/* ── 로그인 (로컬 fallback) ── */
.login-ui { background: var(--igd-page) !important; }
.login-ui .login-dialog {
  background: var(--igd-surface) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  color: var(--igd-ink);
}
.login-ui .login-dialog .login-fields input {
  background: var(--igd-surface-2) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 8px !important;
  color: var(--igd-ink) !important;
}
.login-ui .logo {
  background: linear-gradient(135deg, var(--igd-green), var(--igd-teal)) !important;
  border-radius: 12px;
}

/* ── 알림 ── */
.home-view .notification, .login-ui .notification {
  background: var(--igd-surface) !important;
  border: 1px solid var(--igd-line) !important;
  border-radius: 10px;
  color: var(--igd-ink);
}
