<style>
.custom-alert {
    max-width: 300px !important;/* 調整寬度 */
    margin: 0 auto !important;   /* 使其居中 */
    padding: 10px 20px !important; /* 調整內邊距 */
    font-size: 0.9rem !important; /* 可選：縮小字體大小 */
}

/* 隱藏刪除按鈕的容器 */
#history-list .history-item .delete-container {
    display: none; !important;
}

/* 當滑鼠移到歷史記錄項目上時顯示刪除按鈕 */
#history-list .history-item:hover .delete-container {
    display: block; !important;
}
/* 整合樣式 */
body {
    background-color: #f4f7f6;
    font-family: Arial, sans-serif;
}

.card {
    background: #fff;
    transition: .5s;
    border: 0;
    margin-bottom: 30px;
    border-radius: .55rem;
    position: relative;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
}

.chat-app .people-list {
    width: 100%;
    max-width: 280px;
    position: relative;
    padding: 20px;
    background: #fff;
    padding: 5px 10px; /* 控制內間距 */
    margin-bottom: 2px; /* 控制行與行之間的距離 */
}

.chat-app .chat {
    margin-left: 300px;
    border-left: 1px solid #eaeaea;
}

.chat .chat-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f4f7f6;
    background: #e9ecef;
}

.chat .chat-history {
    height: calc(100vh - 300px);
    padding: 20px;
    overflow-y: auto;
    background: #fff;
}

.chat .chat-message {
    padding: 20px;
    background: #f4f7f6;
    border-top: 1px solid #ddd;
}

.input-group .form-control {
    resize: none;
}

.people-list .chat-list li {
    list-style: none;
    border-radius: 3px;
    line-height: 1.2; /* 控制行距 */
    font-size: 14px; /* 字體大小 */
    border-bottom: 1px solid #ddd; /* 分隔線 */
    cursor: pointer; /* 指針樣式 */
    padding: 0px 10px; /* 控制內間距 */
    margin-bottom: 1px; /* 控制行與行之間的距離 */
    border-bottom: none !important;
}

.people-list .chat-list li:hover {
    background-color: #f7f7f7; /* 滑鼠移過效果 */
}

/* 確保輸入框與結果在主區域內垂直排列 */
#query-results {
    height: calc(100vh - 300px); /* 設置高度為視窗高度減去其他佔用的高度 */
    overflow-y: auto; /* 當內容超出高度時，啟用垂直滾動條 */
    border: 1px solid #ddd; /* 添加邊框，區分滾動區域（可選） */
    padding: 10px; /* 添加內間距 */
    border-radius: 5px; /* 邊角圓滑（可選） */
    background-color: #fff; /* 背景色設為白色（可選） */
    box-sizing: border-box; /* 確保內間距不會影響整體尺寸 */
}

#plist {
    height: calc(100vh - 200px); /* 設置高度為瀏覽器高度減去其他佔用空間 */
    overflow-y: auto; /* 啟用垂直滾動條 */
    border: 1px solid #ddd; /* 添加邊框 */
    padding: 10px; /* 內邊距 */
    border-radius: 5px; /* 圓角 */
    background-color: #fff; /* 背景色 */
    box-sizing: border-box; /* 確保內邊距不影響高度 */
}

/* 調整輸入框與按鈕 */
#query-input {
    resize: none;
    min-height: 40px; /* 設置適當高度 */
}

.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background-color: #0056b3;
    color: white;
    padding: 10px;
    text-align: center;
}

.container {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.history {
    width: 25%;
    background-color: #f4f4f4;
    padding: 10px;
    overflow-y: auto;
}

.results {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.input-box {
    display: flex;
    padding: 10px;
    background-color: #eaeaea;
}

textarea {
    flex: 1;
    margin-right: 10px;
    resize: none;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}


/* Header Styles */
.site-header {
    background-color: #003366;
    color: white;
    padding: 20px 0;
    border-bottom: 2px solid #007bff;
}

.site-header h1 {
    text-align: center;
    margin: 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 30px 0;
    text-align: center;
}

.welcome-section p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    color: white;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Footer Styles */
.site-footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 30px;
    font-size: 14px;
}

    .btn {
        display: inline-block;
        padding: 10px 20px;
        margin: 10px 5px;
        color: white;
        background-color: #007bff;
        text-decoration: none;
        border-radius: 5px;
    }

    .btn:hover {
        background-color: #0056b3;
    }
    /* 初始隱藏的樣式 */
    .hidden {
        display: none;
    }

    /* 顯示時的樣式（可選，若需要動態控制顯示狀態） */
    .visible {
        display: block;
    }
    .error-message {
       color: red;
       font-weight: bold;
       margin-top: 10px;
    }
    /* 歷史記錄按鈕的樣式 */
/* 歷史記錄按鈕的樣式 */
.history-btn {
    background: none; /* 移除背景 */
    border: none; /* 移除邊框 */
    color: #007bff; /* 設置文字顏色 */
    text-decoration: none; /* 移除下劃線 */
    cursor: pointer; /* 滑鼠移過顯示為可點擊 */
    display: block; /* 將按鈕設置為塊級，讓其占滿列表項 */
    text-align: left; /* 左對齊文字 */
    transition: background-color 0.3s; /* 平滑過渡效果 */
    line-height: 1.2; /* 行高縮小 */
}

/* 滑鼠移過的背景樣式 */
.history-btn:hover {
    background-color: #e6e6e6; /* 更深一點的灰色，區分 hover 狀態 */
    color: #0056b3; /* 可選：改變文字顏色 */
}
.list-group-item {
    padding: 5px 10px; /* 減少內間距，縮小行距 */
    border: none; /* 移除列表項的邊框 */
}

/* 歷史記錄的背景樣式 */
aside {
    background-color: #f9f9f9; /* 設置淺灰色背景 */
    padding: 10px; /* 添加內間距 */
    border-radius: 5px; /* 可選：圓角效果 */
}

.container-fluid .row > aside {
    border-right: none; /* 如果是由 aside 元素的右邊框造成的 */
}
.nav-link-btn {
    color: inherit;
    text-decoration: none;
    padding: 0; /* 適配 p-0 類 */
}

.chat-list .btn {
    padding: 0; /* 移除按鈕內間距 */
    background: none; /* 移除背景 */
    border: none; /* 移除邊框 */
    color: #007bff; /* 設置文字顏色 */
    text-align: left; /* 左對齊文字 */
    text-decoration: none; /* 移除下劃線 */
    width: 100%; /* 讓按鈕填滿父元素 */
    border-bottom: none !important; /* 移除每個項目的底部邊框 */
    margin-bottom: 5px; /* 可選，減小項目之間的距離 */
}

.chat-list .btn:hover {
    text-decoration: underline; /* 滑鼠移過添加下劃線 */
}
.chat-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    line-height: 1.2;
    font-size: 14px;
    cursor: pointer;
}

.chat-list .dropdown-toggle {
    font-size: 16px;
    color: #999;
}

.chat-list .dropdown-menu {
    min-width: auto;
}


</style>
