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

}
/* 帳號開關專用高對比按鈕樣式 */
th.user-status-header {
    width: 170px !important;
    min-width: 160px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

td.user-status-cell {
    width: 170px !important;
    min-width: 160px !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
}

.guac-toggle-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

/* 基礎按鈕 - 強制覆寫 Guacamole 預設深灰按鈕底色 */
button.guac-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    border-radius: 18px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    outline: none !important;
    user-select: none !important;
    min-width: 135px !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
}

/* 🟢 正常啟用狀態 - 鮮明翡翠綠 */
button.guac-toggle-btn.status-enabled {
    background-color: #28a745 !important;
    background-image: linear-gradient(180deg, #2ecc71, #27ae60) !important;
    color: #ffffff !important;
    border: 1px solid #1e8449 !important;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.35) !important;
}

button.guac-toggle-btn.status-enabled:hover:not(:disabled) {
    background-color: #e74c3c !important;
    background-image: linear-gradient(180deg, #ff6b6b, #ee5253) !important;
    color: #ffffff !important;
    border-color: #c0392b !important;
    box-shadow: 0 3px 8px rgba(238, 82, 83, 0.45) !important;
    transform: translateY(-1px) !important;
}

/* 🔴 已停用狀態 - 鮮明警示紅 */
button.guac-toggle-btn.status-disabled {
    background-color: #dc3545 !important;
    background-image: linear-gradient(180deg, #ff5252, #d63031) !important;
    color: #ffffff !important;
    border: 1px solid #b71c1c !important;
    box-shadow: 0 2px 4px rgba(214, 48, 49, 0.35) !important;
}

button.guac-toggle-btn.status-disabled:hover:not(:disabled) {
    background-color: #27ae60 !important;
    background-image: linear-gradient(180deg, #2ecc71, #27ae60) !important;
    color: #ffffff !important;
    border-color: #1e8449 !important;
    box-shadow: 0 3px 8px rgba(39, 174, 96, 0.45) !important;
    transform: translateY(-1px) !important;
}

/* ⚪ 目前登入帳號 - 淺灰保護色 */
button.guac-toggle-btn:disabled {
    background-color: #e9ecef !important;
    background-image: none !important;
    color: #6c757d !important;
    border: 1px solid #ced4da !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
    text-shadow: none !important;
}

/* 小圓點指示燈 */
.toggle-dot {
    width: 9px !important;
    height: 9px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

button.guac-toggle-btn.status-enabled .toggle-dot {
    background-color: #ffffff !important;
    box-shadow: 0 0 4px #ffffff !important;
}

button.guac-toggle-btn.status-disabled .toggle-dot {
    background-color: #ffffff !important;
    box-shadow: 0 0 4px #ffffff !important;
}

button.guac-toggle-btn:disabled .toggle-dot {
    background-color: #adb5bd !important;
    border: none !important;
    box-shadow: none !important;
}
