﻿/* Chat.css — 新增日/夜主題變數並以變數替換顏色
   使用方式：在 <html> 加上 data-theme="dark" 即啟用深色，或用 JS 切換：
     document.documentElement.setAttribute('data-theme', 'dark');
*/

/* ----------------------------- Theme variables ----------------------------- */
:root {
    --chat-bg: #ffffff;
    --chat-panel-bg: #ffffff;
    --chat-alt-bg: #f2f2f2;
    --chat-border: #cccccc;
    --chat-border-2: #aaaaaa;
    --chat-text: #333333;
    --chat-muted: #999999;
    --chat-accent: #4CAF50;
    --chat-accent-text: #ffffff;
    --chat-link: #005f94;
    --chat-code-head-bg: #3e576d;
    --chat-response-temp: #b9b9b9;
    --chat-extend-bg: #e9e9e9;
    --chat-room-bg: #f0f0f0;
    --chat-room-hover: #dddddd;
    --chat-delete-btn-bg: #ffffff;
    --chat-delete-btn-border: #cccccc;
    --chat-zoom-overlay: rgba(0,0,0,0.8);
    --chat-last-message: gray;
    --chat-room-label-bg: #d5d5d5;
    --chat-room-label-border: gray;
    --chat-room-name-color: blue;
    --chat-parent-label-color: black;
    --chat-public-span-border: #f9ff00;
    --chat-public-span-color: #f9ff00;
    --chat-selected-bg: #ffffce;
    --chat-drag-border: #000000;
    --chat-drag-bg: #f0f0f0;
    --chat-down-arrow-bg: #eaef08;
    --chat-suggestion-bg: #ffffff;
    --chat-suggestion-border: #cccccc;
    --chat-modal-overlay: rgba(0,0,0,0.4);
    --chat-modal-content-bg: #fefefe;
    --chat-modal-border: #888888;
    --chat-keyword-item-bg: #e0e0e0;
    --chat-open-icon-color: #000000;
    --chat-mermaid-marker: yellowgreen;
    --chat-unread-bg: #ff5a5f;
    --chat-window-border: #cccccc;
    --chat-window-shadow: rgba(0,0,0,0.3);
    --chat-sidebar-bg: #333333;
    --chat-sidebar-text: #ffffff;
    --chat-close-btn-bg: #cccccc;
    --chat-close-btn-text: #ffffff;
    --chat-iframe-header-bg: #f5f5f5;
    --chat-readmore-bg: rgba(0,0,0,0.5);
    /* bubble / triangle */
    --chat-tri-border: #666666;
    --chat-bubble-response-bg: lightyellow;
    --chat-bubble-question-bg: #f5d8c4;
    --chat-ui-state-bg: white;
    --chat-ui-tabs-nav-b: white;
}

[data-theme="dark"] {
    --chat-bg: #0e0e10;
    --chat-panel-bg: #232323;
    --chat-alt-bg: #1b1b1b;
    --chat-border: #333333;
    --chat-border-2: #444444;
    --chat-text: #e5e5e5;
    --chat-muted: #aaaaaa;
    --chat-accent: #4CAF50;
    --chat-accent-text: #ffffff;
    --chat-link: #66b2ff;
    --chat-code-head-bg: #28424f;
    --chat-response-temp: #3a3a3a;
    --chat-extend-bg: #2c2c2c;
    --chat-room-bg: #232323;
    --chat-room-hover: #333333;
    --chat-delete-btn-bg: #1b1b1b;
    --chat-delete-btn-border: #444444;
    --chat-zoom-overlay: rgba(0,0,0,0.85);
    --chat-last-message: #999999;
    --chat-room-label-bg: #2d2d2d;
    --chat-room-label-border: #444444;
    --chat-room-name-color: #9fcfff;
    --chat-parent-label-color: #f5f5f5;
    --chat-public-span-border: #ffea00;
    --chat-public-span-color: #ffea00;
    --chat-selected-bg: #343434;
    --chat-drag-border: #ffffff;
    --chat-drag-bg: #2c2c2c;
    --chat-down-arrow-bg: #cfae08;
    --chat-suggestion-bg: #2b2b2b;
    --chat-suggestion-border: #444444;
    --chat-modal-overlay: rgba(0,0,0,0.7);
    --chat-modal-content-bg: #1f1f1f;
    --chat-modal-border: #666666;
    --chat-keyword-item-bg: #3a3a3a;
    --chat-open-icon-color: #ffffff;
    --chat-mermaid-marker: #7fe08a;
    --chat-unread-bg: #ff5a5f;
    --chat-window-border: #444444;
    --chat-window-shadow: rgba(0,0,0,0.5);
    --chat-sidebar-bg: #222222;
    --chat-sidebar-text: #ffffff;
    --chat-close-btn-bg: #444444;
    --chat-close-btn-text: #ffffff;
    --chat-iframe-header-bg: #2b2b2b;
    --chat-readmore-bg: rgba(255,255,255,0.08);
    --chat-tri-border: #888888;
    --chat-bubble-response-bg: #2b2b18;
    --chat-bubble-question-bg: #4b3a2e;
    --chat-ui-state-bg: gray;
    --chat-ui-tabs-nav-b: #181818;
    --filter: invert(1);
}

/* ----------------------------- 原 CSS（僅替換顏色為變數） ----------------------------- */


.chat-container-area {
    position: relative;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--chat-bg);
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.send-message-group {
    width: 95%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    z-index: 999;
}

.send-message-group p {
    margin-bottom: 0;
}

.chat-message-list-group {
    min-height: 500px;
    list-style: none;
    padding-left: 0px;
    padding-right: 0px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 0px;
}

.loading {
    position: absolute;
    top: -80px;
    left: 30%;
    margin-left: 10px;
    z-index: 9999;
    width: 150px;
    height: 150px;
}

.chat-message-list-group img {
    max-width: 200px;
    max-height: 200px;
}

.send-message {
    width: 100%;
    height: 50px;
    min-height: 50px;
    max-height: 200px;
    line-height: initial;
    padding-right: 60px;
    border: solid;
    border-width: thin;
    border-color: var(--chat-border);
    overflow-y: auto;
}

/* 設定 placeholder 樣式 */
.placeholder {
    color: var(--chat-muted);
    position: absolute;
    pointer-events: none; /* 讓 placeholder 不影響點擊事件 */
}
.card-body {
    /*  background: floralwhite;*/
}

.chat-card-body {
    background: var(--chat-panel-bg);
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.question-message {
    /* background-color: antiquewhite; */
}

.response-message {
    /* background-color: gainsboro; */
    padding: 0 0 0 2em;
}

.sidebar {
    position: fixed;
    display: none;
    top: 0;
    left: 0px;
    width: 300px;
    height: 100%;
    background-color: var(--chat-sidebar-bg);
    color: var(--chat-sidebar-text);
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

@media screen and (min-width: 575px) {
    .sidebar {
    }
}

@media screen and (max-width: 575px) {
    .sidebar {
        display: none;
        width: 100%;
    }

    .menu-area {
        margin-top: 0px !important;
    }
    .chat-room-footer {
        height: 0px !important;
    }
}

.sidebar.show {
    display: block !important;
}

/* 菜單區域的樣式 */
.menu-area {
    position: absolute;
    width: 100%;
    background-color: var(--chat-panel-bg);
    border: 1px solid var(--chat-border);
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    padding: 0px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-area a {
    text-decoration: unset;
}

/* 標題和關閉按鈕的樣式 */
.menu-area h2 {
    color: var(--chat-text);
    font-size: 20px;
    margin: 0;
    padding-bottom: 10px;
    text-align: center;
}

.close-btn {
    background-color: var(--chat-close-btn-bg);
    border: none;
    border-radius: 50%;
    color: var(--chat-close-btn-text);
    cursor: pointer;
    font-size: 16px;
    height: 20px;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 20px;
}

.toggle-btn {
    margin-right: 5px;
}

/* 子菜單的樣式 */
.submenu {
    display: none;
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
}

.submenu li {
    margin: 0;
    padding: 5px 5px;
    text-align: left;
}

.submenu a {
    color: var(--chat-link);
    text-decoration: unset;
}

.submenu li:hover {
    background-color: var(--chat-alt-bg);
    cursor: pointer;
}

.submenu.show {
    display: block;
}

.message-options img {
    margin-right: 8px;
}

.message-content {
    flex-grow: 1;
    padding: 10px;
    font-size: 14px;
    white-space: break-spaces;
    word-wrap: break-word;
    overflow: hidden;
    max-height: 300px;
}

.message-content-border {
    border-style: none none none solid;
    border-width: 0.05em;
    border-color: var(--chat-border-2);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-options {
    margin-left: auto;
}

.message-content-bottom {
    padding-left: 20px;
}

.sample-message {
    display: none;
}
.sample-room-list-label {
    display: none;
}
.chat-star-img {
    width: 20px;
    height: 20px;
}

.chat-close-img {
    width: 15px;
    height: 15px;
    filter: var(--filter);
}

.chat-copy-img {
    width: 15px;
    height: 15px;
    filter:var(--filter);
}

.chat-read-more-area {
    left: 0px;
    z-index: 99;
    background: linear-gradient(180deg, rgba(255,255,255,0), var(--chat-alt-bg));
    width: 100%;
}

.read-more-area:hover {
    cursor: pointer;
}

.chat-read-more-text {
    display: block;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
}

.sample-read-more {
    display: none;
}

.chat-edit-img {
    width: 15px;
    height: 15px;
    filter:var(--filter);
}

.chat-edit-img-area {
    right: 30px;
}

.chat-delete-img {
    width: 12px;
    height: 12px;
    filter: var(--filter);
}

.chat-delete-img-area {
    right: 10px;
}

.room-sub-label {
    display: inline-block;
    width: 170px;
}

.sample-favorite-li {
    display: none;
}

.card-body {
    padding: 0px !important;
}

.message-div {
    margin-top: 10px;
    padding-top: 10px;
    background-color: var(--chat-extend-bg);
}

.message-content-response {
    text-decoration: unset;
    color: var(--chat-text) !important;
    padding-right: 20px;
}

.message-content-response2 {
    text-decoration: unset;
    color: var(--chat-text) !important;
    padding-right: 20px;
}

.message-content-good {
    text-decoration: unset;
    color: var(--chat-text) !important;
}

.chat-wrapper {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-alt-bg);
}

    .chat-wrapper .box1 {
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        height: 100%;
        position: relative;
        background-color: var(--chat-panel-bg);
    }

    .chat-wrapper .box2 {
        display: flex;
        flex-direction: column;
        background-color: var(--chat-panel-bg);
    }

.send-message-div {
    display: flex;
    position: relative;
    flex-direction: column;
    width: 99%;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.send-btn {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 30px;
    filter:var(--filter);
}

.chatCount {
    right: 0px;
    position: absolute;
    color: var(--chat-text);
}

.chat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--chat-panel-bg);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    height: 100%;
    overflow-y: auto;
}

.chat-message-area {
    background-color: var(--chat-panel-bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 定義動畫 */
@keyframes yellow-glow {
    0% {
        background-color: #ffcc00;
    }

    50% {
        background-color: #fff;
    }

    100% {
        background-color: #ffcc00;
    }
}

.chat-personal-img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-size: cover;
    padding: 2px;
    border: outset 1px;
}

#gptCheckArea {
    display: inline-block;
}


.toggle-btn {
    background-color: var(--chat-accent);
    color: var(--chat-accent-text);
}

label {
    color: var(--chat-text);
}

.send-message {
    background-color: var(--chat-panel-bg);
}

.chatCount {
    color: var(--chat-text);
}

/* 測試顏色區結束 */
.ui-resizable {
    position: fixed;
}

.code-head {
    background-color: var(--chat-code-head-bg);
    color: var(--chat-accent-text);
    position: relative;
}

.code-title {
    display: inline;
}

.copy-button {
    position: absolute;
    right: 10px;
    width: 15px;
    height: 15px;
    display: inline;
}

.html-button {
    width: 15px;
    height: 15px;
    display: inline;
    margin-left: 10px;
}

.html-img {
    width: 15px;
    height: 15px;
}

.mermaid svg[id^="m"][width][height][viewBox] {
    width: 80%;
    height: auto;
    pointer-events: none;
}

pre.mermaid {
    margin-left: 0 !important;
    text-align: center;
    resize: both;
    overflow: auto;
    margin-bottom: 2px;
    position: relative;
    max-height: 600px;
    max-width: 100%;
}

pre.mermaid::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--chat-mermaid-marker);
    position: absolute;
    right: 0;
    bottom: 0;
}

.hide-code {
    display: none;
}

.talk-bubble {
    margin: 1px 15px 5px 15px;
    position: relative;
    height: auto;
    border-radius: 10px;
    overflow-wrap: anywhere;
}

.question-bubble-color {
    background-color: var(--chat-bubble-question-bg);
}

.response-bubble-color {
    background-color: var(--chat-bubble-response-bg);
}

/* 右三角/左三角/底部三角等 — 使用變數化顏色 */
.tri-right.border.left-top:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -40px;
    right: auto;
    top: -8px;
    bottom: auto;
    border: 32px solid;
    border-color: var(--chat-tri-border) transparent transparent transparent;
}

.tri-right.left-top:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -10px;
    right: auto;
    top: 0px;
    bottom: auto;
    border: 15px solid;
    border-color: var(--chat-bubble-response-bg) transparent transparent transparent;
}

.tri-right.left-top.response-bubble-color:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -10px;
    right: auto;
    top: 0px;
    bottom: auto;
    border: 10px solid;
    border-color: var(--chat-bubble-response-bg) transparent transparent transparent;
}

.tri-right.left-top.question-bubble-color:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -10px;
    right: auto;
    top: 0px;
    bottom: auto;
    border: 10px solid;
    border-color: var(--chat-bubble-question-bg) transparent transparent transparent;
}

/* Right triangle, left side slightly down */
.tri-right.border.left-in:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -40px;
    right: auto;
    top: 30px;
    bottom: auto;
    border: 20px solid;
    border-color: var(--chat-tri-border) var(--chat-tri-border) transparent transparent;
}

.tri-right.left-in:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -20px;
    right: auto;
    top: 38px;
    bottom: auto;
    border: 12px solid;
    border-color: var(--chat-bubble-response-bg) var(--chat-bubble-response-bg) transparent transparent;
}

/* Right triangle, placed bottom left side slightly in */
.tri-right.border.btm-left:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: -8px;
    right: auto;
    top: auto;
    bottom: -40px;
    border: 32px solid;
    border-color: transparent transparent transparent var(--chat-tri-border);
}

.tri-right.btm-left:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: 0px;
    right: auto;
    top: auto;
    bottom: -20px;
    border: 22px solid;
    border-color: transparent transparent transparent var(--chat-bubble-response-bg);
}

/* Right triangle, placed bottom left slightly in */
.tri-right.border.btm-left-in:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: 30px;
    right: auto;
    top: auto;
    bottom: -40px;
    border: 20px solid;
    border-color: var(--chat-tri-border) transparent transparent var(--chat-tri-border);
}

.tri-right.btm-left-in:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: 38px;
    right: auto;
    top: auto;
    bottom: -20px;
    border: 12px solid;
    border-color: var(--chat-bubble-response-bg) transparent transparent var(--chat-bubble-response-bg);
}

/* Right triangle, placed bottom right slightly in */
.tri-right.border.btm-right-in:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: 30px;
    bottom: -40px;
    border: 20px solid;
    border-color: var(--chat-tri-border) var(--chat-tri-border) transparent transparent;
}

.tri-right.btm-right-in:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: 38px;
    bottom: -20px;
    border: 12px solid;
    border-color: var(--chat-bubble-response-bg) var(--chat-bubble-response-bg) transparent transparent;
}

/* Right triangle, placed bottom right slightly in */
.tri-right.border.btm-right:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: -8px;
    bottom: -40px;
    border: 20px solid;
    border-color: var(--chat-tri-border) var(--chat-tri-border) transparent transparent;
}

.tri-right.btm-right:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: 0px;
    bottom: -20px;
    border: 12px solid;
    border-color: var(--chat-bubble-response-bg) var(--chat-bubble-response-bg) transparent transparent;
}

/* Right triangle, right side slightly down */
.tri-right.border.right-in:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: -40px;
    top: 30px;
    bottom: auto;
    border: 20px solid;
    border-color: var(--chat-tri-border) transparent transparent var(--chat-tri-border);
}

.tri-right.right-in:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: -20px;
    top: 38px;
    bottom: auto;
    border: 12px solid;
    border-color: var(--chat-bubble-response-bg) transparent transparent var(--chat-bubble-response-bg);
}

/* Right triangle placed top right flush. */
.tri-right.border.right-top:before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: -40px;
    top: -8px;
    bottom: auto;
    border: 32px solid;
    border-color: var(--chat-tri-border) transparent transparent transparent;
}

.tri-right.right-top:after {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    left: auto;
    right: -20px;
    top: 0px;
    bottom: auto;
    border: 20px solid;
    border-color: var(--chat-bubble-response-bg) transparent transparent transparent;
}

.create-chat-icon {
    width: 25px;
    height: 25px;
    position: absolute;
    right: 40px;
    top: 7px;
}

.create-chat-img {
    width: 25px;
    height: 25px;
}

.response-message-temp {
    height: 50px;
    overflow-y: clip;
    background: var(--chat-response-temp);
    display: none;
}

.response-options {
    margin-left: auto;
    padding-right: 10px;
}

.response-content {
    width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.message-line {
    width: 2rem;
    border-style: none none solid solid;
    border-width: 0.05em;
    border-color: var(--chat-border-2);
    height: 15px;
    margin: -10px 0 0 -2em;
    position: relative;
    left: 0px;
    top: 0px;
}

.chat-room-area {
    background-color: var(--chat-room-bg);
    padding: 0px;
    border-radius: 8px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}

.chat-room-class {
    list-style-type: none;
    padding: 0;
}

.child-room-list {
    list-style-type: none;
    padding-left: 0px;
}

.chat-room-area a:hover {
    background-color: var(--chat-room-hover);
}

.attachmentImg {
    width: 20px;
    height: 20px;
    filter:var(--filter);
}

.attachmentArea {
    display: inline-block;
    position: relative;
}

.attachmentArea input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    display: none;
}

.attachment-temp {
    display: none;
}

.delete-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    cursor: pointer;
    background-color: var(--chat-delete-btn-bg);
    border-radius: 50%;
    border: 1px solid var(--chat-delete-btn-border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.delete-btn svg {
    width: 10px;
    height: 10px;
}

.attachment-img {
    width: 50px;
    height: 50px;
}

.attachment-div {
    position: relative;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}
/* 放大圖片 CSS */
.zoom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--chat-zoom-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.zoom img {
    max-width: 90%;
    max-height: 90%;
}

.last-message {
    display: block;
    color: var(--chat-last-message) !important;
    font-size: small;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-height: 25px;
}

.room-list-label {
    background-color: var(--chat-room-label-bg);
    padding: 5px;
    border: solid;
    border-width: 1px;
    border-color: var(--chat-room-label-border);
    margin-bottom: 2px;
    cursor: pointer;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 25px 25px;
}

.room-name-grid-row1 {
    display: flex;
    justify-content:space-between;
}
.room-name-grid-row2 {
    display: flex;
    justify-content: space-between;
}

.room-name-label {
    pointer-events: none;
    color: var(--chat-room-name-color) !important;
}

.group-manage-img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-size: cover;
    padding: 2px;
    border: outset 1px;
    right: 20px;
    position: absolute;
    filter:var(--filter);
}

.create-group-member-img {
    width: 25px;
    height: 25px;
}

.chat-profile-img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-size: cover;
    padding: 2px;
    border: outset 1px;
    margin-right: 5px;
}

.parent-room-label {
    color: var(--chat-parent-label-color)!important;
    display: inline-block;
    width: 100%;
}
/* 設定游標為指標，表示可點擊 */
.toggle-button {
    cursor: pointer;
    margin-right: 5px;
}

.ui-tabs .ui-tabs-panel {
    padding: 0px !important;
}
.ui-state-default {
    background-color: var(--chat-ui-state-bg) !important;
}
.ui-tabs-nav {
    background-color: var(--chat-ui-tabs-nav-bg);
}
.extend-area {
    height: 50px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    background-color: var(--chat-extend-bg);
    border-radius: 5px;
    padding: 5px;
}

.chat-room-list {
    overflow-y: auto;
    scrollbar-width: none;
}
.chat-option-area{
    flex:1;
    max-width:45px;
}
.room-name-flex{
}
.chat-room-footer{
}
.room-list-public-span {
    display: inline-block;
    width: 15px;
    height: 15px;
    font-size: 12px;
    text-align: center;
    line-height: 15px;
    border: 1px solid var(--chat-public-span-border);
    color: var(--chat-public-span-color);
    font-weight: bold;
}
.group-manage-area {
    display: none;
}
.room-list-label.selected {
    background-color: var(--chat-selected-bg);
}
.message-input-drag-over {
    border-color: var(--chat-drag-border);
    background-color: var(--chat-drag-bg);
}
.down-arrow-img {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 25px;
    bottom: 100px;
    z-index: 9;
    cursor: pointer;
    filter: invert(1);
    background: var(--chat-down-arrow-bg);
    border-radius: 20px;
}
/* 快選清單的樣式 */
#suggestionList {
    display: none;
    border: 1px solid var(--chat-suggestion-border);
    max-height: 100px;
    overflow-y: auto;
    background-color: var(--chat-suggestion-bg);
    z-index: 1000;
    width:200px;
}
#suggestionList li {
    padding: 5px;
    cursor: pointer;
}
#suggestionList li:hover {
    background-color: var(--chat-room-hover);
}

/* 模態視窗內容 */
.keyword-modal-content {
    background-color: var(--chat-modal-content-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--chat-modal-border);
    width: 80%;
}

/* 關閉按鈕 */
.keyword-close {
    color: var(--chat-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.keyword-close:hover,
.keyword-close:focus {
    color: var(--chat-text);
    text-decoration: none;
    cursor: pointer;
}

/* 關鍵字列表樣式 */
#keywordList {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-item {
    background-color: var(--chat-keyword-item-bg);
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}
#chat-room-name-header {
    font-weight: bold;
}
.iframe-container {
    border: 1px solid var(--chat-border);
    margin: 10px 0;
}

.iframe-header {
    background-color: var(--chat-iframe-header-bg);
    padding: 4px;
    text-align: right;
    position:relative;
}

.open-new-window-icon {
    cursor: pointer;
    fill: var(--chat-open-icon-color);
}
.upload-icon {
    cursor: pointer;
    filter:var(--filter);
}

#htmlCodeModal {
    z-index: 9991 !important;
}

.html-code-modal-content {
    background-color: var(--chat-modal-content-bg);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--chat-modal-border);
    width: 80%;
}

.html-code-close {
    color: var(--chat-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.html-code-close:hover,
.html-code-close:focus {
    color: var(--chat-text);
    text-decoration: none;
    cursor: pointer;
}

#htmlCodeModalUrl {
}

.svg-container-open{
    display:inline-flex;
}
.svg-container-upload {
    display: inline-flex;
}

/* 設置閱讀更多按鈕的樣式 */
.message-content-read-more {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--chat-readmore-bg);
    color: var(--chat-accent-text);
    padding: 5px 10px;
    cursor: pointer;
}

/* 設置模態框的樣式 */
.message-content-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--chat-modal-overlay);
    z-index:200;
}

.message-content-modal-content {
    background-color: var(--chat-modal-content-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--chat-modal-border);
    width: 80%;
    white-space: break-spaces;
}

.message-content-close {
    color: var(--chat-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.message-content-close:hover,
.message-content-close:focus {
    color: var(--chat-text);
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .message-content-modal-content {
        margin: 0;
        width: 100%;
        border-radius: 0;
        white-space: break-spaces;
    }
}
.resource-usage{
    font-size:small;
}
.preview-button{
    display:inline-flex;
    margin:5px;
    cursor:pointer;
}
.code-button {
    display: inline-flex;
    margin: 5px;
    cursor: pointer;
}

.unread-count {
    background: var(--chat-unread-bg);
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: bold;
}
.chat-loading-img {
    width: 200px;
    height: 200px;
}
/* 基本樣式設定 */
.chat-room-search-container {
    display: inline-flex;
    align-items: baseline;
    cursor: pointer;
    position: absolute;
    right: 80px;
}

.chat-room-search-icon {
    width: 24px;
    height: 24px;
    fill: var(--chat-open-icon-color);
    transition: opacity 0.3s;
    position: absolute;
}

.chat-room-search-bar {
    display: none;
    margin-left: 0;
    padding: 5px;
    border: 1px solid var(--chat-suggestion-border);
    border-radius: 4px;
    position: absolute;
    left: -160px;
}

.active .chat-room-search-bar {
    display: inline-block;
}

.active .chat-room-search-icon {
    opacity: 0;
}
.chat-window {
    position: fixed;
    top: 50px;
    right: 50px;
    background-color: var(--chat-panel-bg);
    border: 1px solid var(--chat-window-border);
    box-shadow: 2px 2px 5px var(--chat-window-shadow);
    width: 300px;
    height: 700px;
    display: none;
    z-index: 9999;
    flex-direction: column;
}
.ui-state-active a{
    color:var(--chat-text)!important;
}