body {
    max-height: 100vh;
}

#aiQAservice-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

#aiQAservice-sidebar {
    width: 250px;
    position: absolute;
    background: #f9f9f9;
    color: #333;
    height: 100%;
    padding: 45px 15px 15px;
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
}

#chat-hist-list {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    margin-left: -15px;
    margin-right: -15px;
}

#chat-hist-list.disabled * {
    cursor: not-allowed;
}

#chat-hist-list .chat-hist-item-wrapper {
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
}

#chat-hist-list .chat-hist-item-wrapper .chat-hist-item {
    position: relative;
    padding: 10px 0px 10px 8px;
    overflow: hidden;
    white-space: nowrap;
}

#chat-hist-list .chat-hist-item-wrapper .chat-hist-item:hover {
    background-color: #ececec;
    border-radius: 0.5rem;
}

#chat-hist-list .chat-hist-item-wrapper .chat-hist-item.active {
    background-color: #e3e3e3;
    border-radius: 0.5rem;
}

#chat-hist-list .chat-hist-item-wrapper .chat-hist-item a {
    color: #333;
    display: inline-block;
    width: 100%;
    mask-image: linear-gradient(90deg, #000, #000 84%, transparent 89%, transparent);
}

#aiQAservice-content {
    position: relative;
    padding-left: 15px;
    padding-right: 15px;
    transition: margin-left 0.5s ease-in-out;
}

#aiQAservice-sidebar.open {
    transform: translateX(0%);
}

#aiQAservice-sidebar.open+#aiQAservice-content {
    margin-left: 250px;
}

#aiQAservice-sidebar-toggle-icon {
    position: absolute;
    z-index: 2;
    left: 10px;
    top: 10px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

#aiQAservice-sidebar-toggle-icon {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url("/sys/res/icon/ai-sidebar-toggle.svg");
}

/* 捲軸寬度及高度 */
#chat-hist-list::-webkit-scrollbar {
    width: 5px;
}

#chat-hist-list::-webkit-scrollbar-track {
    background: #ececec;
    /* 浅灰色背景 */
    border-radius: 4px;
}

#chat-hist-list::-webkit-scrollbar-thumb {
    background: #b0b0b0;
    border-radius: 4px;
}

#chat-hist-list::-webkit-scrollbar-thumb:hover {
    background: #8a8a8a;
}

#chat {
    min-height: 260px;
    /* padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 20px;
    margin-left: -15px;
    margin-right: -15px; */
}

#chat.hasError {
    min-height: 105px;
}

.welcome {
    margin: 0 auto;
    margin-bottom: 20px;
}

.welcome,
.welcome .welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: .5rem;
}

.welcome .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.welcome .logo > img {
    max-width: 200px !important;
    max-height: 200px !important;
}

.welcome .default-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    column-gap: 1rem;
    margin: 3rem 1rem 0;
}

.welcome .default-actions button {
    width: 12rem;
    text-align: justify;
    text-align-last: left;
    border: 1px solid #e3e3e3;
    background: #FFF;
    padding: .75rem 1rem;
    border-radius: 1rem;
}

.welcome .welcome-title {
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 2rem;
}

.welcome .welcome-intro {
    max-width: 500px;
}

@keyframes bgColorCycle {
    0% {
        color: white;
    }

    50% {
        color: #FFBB00;
    }

    100% {
        color: white;
    }
}

span.animate-light {
    animation: bgColorCycle 1s infinite;
}

.prompt-example {
    height: 80px;
    width: 150px;
    font-size: 1rem;
    text-align: left;
    border-radius: 1rem;
    margin: 0.5rem;
    display: flex;
    border: 1px solid rgba(0, 0, 0, .1);
    background-color: transparent;
    color: #666666;
    word-break: break-all;
    text-wrap: wrap;
    padding: 12px;
}

.prompt-example:hover {
    background-color: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, .1);
}

.prompt-example-subDiv {
    display: flex;
}

.prompt-example-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    max-width: 48rem;
    justify-content: center;
}

.gpt-icon {
    background-image: url('/sys/res/icon/gpt-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

.up-arrow-icon {
    background-image: url('/sys/res/icon/ai-arrow-up.svg');
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center center;
}

.bubble {
    position: relative;
    margin: 1rem 0 3rem;
    word-wrap: break-word;
    background-color: #FFFFFF;
    /* 泡泡背景色改為白色 */
}

.bubble.user {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bubble.user .content {
    resize: none;
    background-color: #F4F4F4;
    color: #272525;
    border-radius: 1.5rem;
    padding: 1rem;
    max-width: 70%;
}

.bubble.response .meeting-item  { margin-bottom:1rem; }
.bubble.response .meeting-item:last-child { margin-bottom: 0; }
.bubble.response .meeting-item .meeting-title { font-weight: bold; margin-bottom:.5rem; }
.bubble.response .meeting-item .meeting-digest { line-height:1.25; }

.bubble.response .content {
    padding-left: 3rem;
}

.bubble.response .content:before {
    content: "\f672";
    font-family: 'Font Awesome 5 Pro';
    /* #19360 AI 介面改善 ~ 調整小幫手對話介面中，小幫手回應的 logo style */
    /*font-weight: 900;*/
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    font-size: 1.5rem;
    line-height: 1.5rem;

    position: absolute;
    top: 0;
    left: 0;
}

.bubble.response .satisfaction {
    padding-left: 3rem;
    margin: .5rem 0;
}

.bubble.response.no-reference .satisfaction {
    display: none;
}

.bubble.response .satisfaction .interactive-panel {
    display: inline-flex;
    column-gap: 2px;
}
.bubble.response .satisfaction .interactive-panel>.icon-item,
.bubble.response .satisfaction .interactive-panel>div {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .2rem;
    padding: 0 .5rem;
}

.bubble.response .satisfaction .interactive-panel>div span.fs-font-star {
    color: #FFAA33;
}

.bubble.response .satisfaction .interactive-panel>.icon-item {
    font-size: 1em;
    width: 1.6em;
    height: 1.6em;
    padding: 0;
}

.bubble.response .satisfaction .interactive-panel>div:hover {
    background: #DDD;
    cursor: pointer;
}

.bubble.response label.response-label {
    margin: 0;
    padding-left: 3rem;
    font-weight: normal;
    font-size: 0.8rem;
    color: #999;
}

.bubble.response label.response-label.remote-resp {
    padding-left:0;
}

.bubble.response .content.qa .que {
    margin-top: 1rem;
    font-weight: bold;
}

.bubble.response .content.qa .ans {
    margin-top: 1rem;
}

.bubble.response.multi-ques .content > ol.list {
    margin-top: 1rem;
    margin-bottom: 0px;
}

.bubble.response.multi-ques .content > ol.list > li {
    margin-bottom: .5rem;
    font-size: bold;
}

.bubble.response .ref-block {
    padding-left: 3rem;
    flex-wrap: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem .5rem;
    margin-top: 1.5rem;
}

.bubble.response .ref-block>.caption {
    font-weight: bold;
    margin-bottom: .5rem;
}

.bubble.response .ref-block>.list {
    flex-wrap: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem .5rem;
}

.bubble.response .ref-block>.list>.list-item {
    padding: .1rem 0;
}

.bubble.response ul.case-refs li.ref-case {
    padding: .1rem 0;
    list-style: none;
    margin-bottom: 1rem;
}

.bubble.response ul.case-refs.remote-resp {
    padding-left: 0;
}

.ref-case .conclusion {
    font-size: 0.86rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bubble:last-child {
    margin-bottom: 1rem;
}

.bubble label {
    font-weight: bold;
    font-size: 1.1rem;
}

.textarea-container {
    position: relative;
    margin-top: 40px;
}

.textarea-container textarea:disabled {
    cursor: not-allowed;
}

.textarea-container textarea {
    display: block;
    width: 100%;
    resize: none;
    height: unset;
    min-height: 1rem;
    background-color: #F4F4F4;
    border-radius: 1.5rem;
    padding: 1rem;
    border: none;
}

.textarea-container button {
    --button-size: 30px;

    position: absolute;
    right: .5rem;
    bottom: calc((100% - var(--button-size))/2);
    cursor: pointer;
    width: var(--button-size);
    height: var(--button-size);
    border-radius: var(--button-size);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #000;
    color: #FFF;
}

.textarea-container button svg,
.textarea-container button img {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--button-size);
    height: var(--button-size);
}

.textarea-container button:hover {
    background-color: #222;
}

.textarea-container button:disabled {
    background-color: #D7D7D7;
    color: #F4F4F4;
    cursor: not-allowed;
}

.curr-usage {
    text-align: center;
}

.curr-usage span.warning {
    color: red;
}

.curr-usage span.danger {
    color: red;
}

.input-hints {
    display: flex;
    align-items: center;
    justify-content: right;
    gap: .5rem;
    color: #aaa;
    font-size: .8rem;
    margin-top: 5px;
}

.admin-actions {
    margin-top: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.ai-chat-alert-container-default-not-display {
    display: none;
}

.ai-chat-alert-container-top {
    position: sticky;
    z-index: 1000;
    pointer-events: none;
}

.ai-chat-alert-container .ai-chat-alert {
    width: 80%;
    max-width: 500px;
    border-radius: 15px;
    margin: 0 auto;
}