/* 暫時隱藏上傳按鈕 */
.attach-icon {
    display: none !important;
}

/* 避免 Chatbot 繼承到其他 css 樣式 */

.chat__messages * {
    all: revert;
}

.lwh-open-cbot * {
    all: revert;
}

.chatbot-container {
border-radius: 8px;
background-color: white;
}

button#submit-btn {
    background-color: #ffffff00;
}

.lwh-open-cbot .bot-image {
    display: block;
    width: 30px;
    height: auto;
    border-radius: 50%;
}
.lwh-open-cbot .avatar-image {
    display: block;
    width: 30px;
    height: auto;
    border-radius: 30%;
}


.typing-animation .typing-dots {
    display: inline-block;
    margin-left: 8px; /* 讓三點和圖片之間保留些空間 */
}
  
/* 三個小圓點 span */
.typing-animation .typing-dots span {
    width: 6px;
    height: 6px;
    background-color: gray; /* 您的想要的顏色 */
    display: inline-block;
    margin: 1px;
    border-radius: 50%;
    opacity: 0.3; /* 初始透明度 */
    animation: bounce 1s infinite ease-in-out;
}

/* 每個小圓點有不同的 animation-delay */
.typing-animation .typing-dots span:nth-child(1) {
    animation-delay: 0s;
}
.typing-animation .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-animation .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* 定義彈跳和透明度變化的動畫 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.3; /* 最初和最後透明度較低 */
    }
    50% {
        transform: translateY(-8px);
        opacity: 1; /* 中間完全顯現 */
    }
}

.lwh-open-cbot, .lwh-open-cbot :root {
    --chatbot-width: 350px;
    --chatbot-font-family: 'sans-serif', 'Segoe UI';
    --chatbot-image-position-bottom: 5%;
    --chatbot-image-position-right: 3%;
    --chatbot-position-bottom: 6%;
    --chatbot-position-right: 10%;
    --chatbot-height:60vh;
    --chatbot-border-color: #E4E3E3;
    --chatbot-primary-color: #ef3030;
    --chatbot-secondary-color: #2c2b8e;
    --chatbot-hover-color: #4170df;
    --chatbot-bg-color: #ffffff;
    --chatbot-scrollbar-track-color: #f3f3f3;
    --chatbot-scrollbar-thumb-color: #d7d7d7;
    --chatbot-scrollbar-thumb-hover-color: #949494;
    --chatbot-button-disabled-color: grey;
    --chatbot-popup-bg-color: #fff;
    --chatbot-dot-color: grey;
}

.lwh-open-cbot *,
.lwh-open-cbot *::after,
.lwh-open-cbot *::before,
.lwh-open-cbot *:focus {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.lwh-open-cbot *:focus {
    box-shadow: none;
}

.lwh-open-cbot .custom-chatbot {
    width: var(--chatbot-width);
    font-family: var(--chatbot-font-family);
    position: fixed;
    bottom: var(--chatbot-position-bottom);
    right: var(--chatbot-position-right);
    overflow: hidden;
    z-index: -9998;
    display: flex;
    flex-direction: column;
    perspective: 200px;
}

.lwh-open-cbot .chat {
    border-radius: 12px;
    position: relative;
    z-index: 9999;
    opacity: 0;
    transform: translateY(100%) scale(0.9) rotateX(90deg); 
    transform-origin: bottom;
    transition: 
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
        opacity 0.8s ease;
}

.lwh-open-cbot .chat.show {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
}

.lwh-open-cbot .custom-chatbot__image {
    position: fixed;
    right: var(--chatbot-image-position-right);
    bottom: var(--chatbot-image-position-bottom);
    z-index: 9999;
    cursor: pointer;
}

.lwh-open-cbot .custom-chatbot button {
    border: none;
}

.lwh-open-cbot .custom-chatbot button>i {
    color: var(--chatbot-primary-color);
    font-size: 18px;
}

.lwh-open-cbot .custom-chatbot button:hover i {
    color: var(--chatbot-hover-color);
    cursor: pointer;
}

.lwh-open-cbot .custom-chatbot input[type='text'] {
    border: none;
    outline: none;
    padding: 0;
    box-shadow: none !important;
}

.lwh-open-cbot .chat__header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1.5px solid var(--chatbot-border-color);
    padding: 12px 10px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    background: linear-gradient(to right, #b22222, #ef3030, #ff6666, #b22222);
    background-size: 300% 100%;
    animation: flowingGradient 6s infinite linear;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.lwh-open-cbot .chat__header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    pointer-events: none;
    z-index: -10000;
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.5), 0 8px 10px rgba(255, 0, 0, 0.3);
    animation: flowingNeon 6s infinite alternate;
}

@keyframes flowingNeon {
    0% {
        box-shadow: 0 4px 6px rgba(255, 0, 0, 0.4), 0 6px 8px rgba(255, 0, 0, 0.3);
        background-position: 0% 50%;
    }
    50% {
        box-shadow: 0 6px 8px rgba(245, 157, 157, 0.6), 0 8px 10px rgba(255, 0, 0, 0.4);
        background-position: 100% 50%;
    }
    100% {
        box-shadow: 0 4px 6px rgba(255, 0, 0, 0.4), 0 6px 8px rgba(255, 0, 0, 0.3);
        background-position: 0% 50%;
    }
}

@keyframes flowingGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.lwh-open-cbot .chat__header>div:nth-child(1)>div:nth-child(2) {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-top: 4px;
}

.lwh-open-cbot .chat__header .chat__new {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 6px 4px 6px;
    background-color: var(--chatbot-primary-color);
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.lwh-open-cbot .chat__header .chat__new:hover {
    background-color: var(--chatbot-hover-color);
}

.lwh-open-cbot .chat__header>div:nth-child(2) {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.lwh-open-cbot .chat__export i,

.lwh-open-cbot .chat__export i:hover,
.lwh-open-cbot .copy-text i:hover,
.lwh-open-cbot .feedback-btn:hover,
.lwh-open-cbot .feedback__modal-close:hover {
    color: var(--chatbot-hover-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.lwh-open-cbot .chat__export {
    font-size: 12px;
    cursor: pointer;
    width: -moz-fit-content;
    width: fit-content;
    margin-left: -1px;
}

.lwh-open-cbot .chat__title {
    font-weight: 500;
    font-size: 16px;
}

.lwh-open-cbot .chat__title span {
    font-size: 12px;
}

.lwh-open-cbot .chat__status {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.lwh-open-cbot .chat__status span {
    background-color: #68D391;
    background-color: #acacac;
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 100px;
}

.lwh-open-cbot .chat__messages {
    padding: 12px 10px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: var(--chatbot-height);
    overflow-y: auto;
    position: relative;
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar {
    width: 3px;
    height: 5px;
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar-track,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-track {
    background: var(--chatbot-scrollbar-track-color);
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar-thumb,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-thumb {
    background: var(--chatbot-scrollbar-thumb-color);
    border-radius: 100px;
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar-thumb:hover,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-thumb:hover {
    background: var(--chatbot-scrollbar-thumb-hover-color);
}

.lwh-open-cbot .chat__messages__user,
.lwh-open-cbot .chat__messages__ai {
    display: flex;
    gap: 6px;
    flex-direction: column;
    width: calc(100% - 38px);
}

.lwh-open-cbot .chat__messages__user {
    align-self: flex-end;
}

.lwh-open-cbot .chat__messages__user>div {
    align-self: flex-end;
}

.lwh-open-cbot .chat__messages__ai>div,
.lwh-open-cbot .chat__messages__user>div {
    display: flex;
    gap: 0.5rem;
}

.lwh-open-cbot .chat__messages__ai p {
    background-color: var(--chatbot-bg-color);
    padding: 6px 12px;
    padding-right: 20px;

    width: -moz-fit-content;
    width: fit-content;
    align-self: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
}

.lwh-open-cbot .chat__messages__ai .code-snippet {
    background-color: rgb(27, 27, 27);
    border-radius: 8px;
}

.lwh-open-cbot .chat__messages__ai pre {
    display: flex;
    overflow: hidden;
}

.lwh-open-cbot .chat__messages__ai code {
    display: block;
    padding: 10px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    color: #f8f8f8;
    overflow-x: auto;
    word-break: normal;
    word-spacing: normal;
    white-space: pre;
    align-self: flex-start;
    text-align: left;
}

.lwh-open-cbot .snippet-header {
    background: rgb(164, 164, 164);
    border-radius: 8px 8px 0 0;
    padding: 6px 12px;
}

.lwh-open-cbot .snippet-header button {
    cursor: pointer;
    color: rgb(55 55 55);
    font-weight: 600;
}

.lwh-open-cbot .chat__messages__ai img:not(.bot-image) {
    padding: 6px 12px;
    border-radius: 0px 8px 8px 8px;
    align-self: flex-start;
    border: 1.5px solid var(--chatbot-bg-color);
    max-width: 160px;
}

.lwh-open-cbot .chat__messages__user p {
    background-color: #ffe6e6;
    background-image: linear-gradient(to right, rgba(239, 48, 48, 0.15), rgba(255, 102, 102, 0.15));
    padding: 6px 12px;
    border-radius: 15px 15px 15px 15px;
    color: black;
    width: -moz-fit-content;
    width: fit-content;
    align-self: flex-end;
}

.lwh-open-cbot .chat__messages__user img:not(.avatar-image) {
    padding: 6px 12px;
    border-radius: 15px 15px 15px 15px;
    align-self: flex-end;
    border: 1.5px solid var(--chatbot-primary-color);
    max-width: 160px;
}

.lwh-open-cbot .chat__input-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

.lwh-open-cbot .chat__input-area>form {
    padding: 12px 10px 3px;
    background-color: #fff;
}

.lwh-open-cbot .chat__input-area>form>div {
    display: flex;
    gap: 6px;
    align-items: center;
    border: 2px solid var(--chatbot-border-color);
    border-radius: 10px;
    padding: 0 10px;
}

.lwh-open-cbot .chat__input-area .input {
    display: flex;
    gap: 6px;
    width: 100%;
    align-items: center;
}

.lwh-open-cbot .chat__input-area .input label {
    font-size: 12px;
    opacity: 0.7;
}

.lwh-open-cbot .chat__input-area .input label:hover {
    color: var(--chatbot-secondary-color);
    cursor: pointer;
    opacity: 1;
}

.lwh-open-cbot .chat__input-area .input>div:nth-child(1),
.lwh-open-cbot .chat__input-area .input input {
    width: 100%;
    font-size: 16px;
}

.lwh-open-cbot .custom-chatbot button[disabled] i {
    cursor: not-allowed;
    color: var(--chatbot-button-disabled-color);
}

.lwh-open-cbot .popup {
    display: none;
    width: 100%;
    position: absolute;
    background-color: var(--chatbot-popup-bg-color);
    padding: 12px;
    border-radius: 4px;
    top: 1%;
    opacity: 0;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.lwh-open-cbot .popup-animation {
    animation: slideInRight 0.5s ease forwards, fadeOut 2s ease forwards 3s;
}

.lwh-open-cbot .popup p {
    color: var(--chatbot-popup-text-color);
}

.lwh-open-cbot .popup .close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes blink {
    50% {
        fill: transparent;
    }
}

.lwh-open-cbot .dot {
    animation: 1s blink infinite;
    fill: var(--chatbot-dot-color);
}

.lwh-open-cbot .dot:nth-child(2) {
    animation-delay: 250ms;
}

.lwh-open-cbot .dot:nth-child(3) {
    animation-delay: 500ms;
}

.lwh-open-cbot .loading {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 20px;
}

.lwh-open-cbot .copy-text {
    cursor: pointer;
    font-size: 12px;
    position: absolute;
    top: 4px;
    right: 4px;
}

.lwh-open-cbot .copy-text span {
    display: none;
    position: absolute;
    background-color: white;
    border-radius: 4px;
    padding: 0px 6px 1px 6px;
    color: black;
    border: 1px solid var(--chatbot-border-color);
}

.lwh-open-cbot .avatar-image {
    display: block;
}

.lwh-open-cbot .startup-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    bottom: 0;
    order: 2;
    flex-shrink: 0;
    margin-top: 10%;
}

.lwh-open-cbot .startup-btns p {
    padding: 6px 10px;
    border: 0px solid;
    border-radius: 8px;
    width: -moz-fit-content;
    width: fit-content;
    cursor: pointer;
    color: #bf5656;
    background-color: #e234342b;
    transition: background-color 0.9s ease, color 0.3s ease, box-shadow 0.3s ease-in-out;
}

.lwh-open-cbot .feedback-form {
    background: white;
    border-radius: 4px;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
    position: absolute;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    display: none;
}

.lwh-open-cbot .feedback-form.show {
    display: flex;
}

.lwh-open-cbot .feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 0.8rem 0;
}

.lwh-open-cbot .feedback-form form {
    display: flex;
    flex-direction: column;
    align-items: baseline;
}

.lwh-open-cbot .feedback-form textarea {
    width: 100%;
    border: 2px solid var(--chatbot-border-color);
    outline: none;
    padding: 6px;
    font-size: 16px;
}

.lwh-open-cbot .feedback-form button {
    background: var(--chatbot-primary-color);
    padding: 0.7rem;
    color: white;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 14px;
    font-weight: 400;
}

.lwh-open-cbot .feedback-form button[disabled] {
    cursor: not-allowed;
    background-color: var(--chatbot-button-disabled-color) !important;
}

.lwh-open-cbot .feedback-form button:hover {
    background: var(--chatbot-hover-color);
}

.lwh-open-cbot .footer-area {
    padding: 0 10px 10px 10px;
    font-size: 11px;
    display: none;
}

.lwh-open-cbot .footer-area a {
    text-decoration: none;
}

@media (max-width: 679px) {
    .lwh-open-cbot .custom-chatbot {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        bottom: auto;
    }
}


/* 調整輸入區域的布局 */
.chat__input-area .input-icons {
    display: flex;
    align-items: center;
}

.chat__input-area .input-icons .attach-icon {
    margin-right: 10px;
    cursor: pointer;
    font-size: 20px;
    color: #888;
}

.chat__input-area .input-icons input[type="text"] {
    flex: 1;
}

/* 調整選擇的圖片預覽容器 */
.selected-image-container img {
    max-width: 100px;
    max-height: 100px;
}

.fa-solid:hover {
    color: var(--chatbot-hover-color);
}

.lwh-open-cbot .selected-image-container {
    position: relative;
    display: inline-block;
    background-color: #ffffffe0;
    padding: 12px 10px 0;
}

/* 圖片與取消按鈕的外框 */
.lwh-open-cbot .selected-image-wrapper {
    position: relative;
    display: inline-block;
}

/* 圖片樣式 */
.lwh-open-cbot .selected-image-wrapper img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 5px;
}

/* 取消按鈕樣式 */
.lwh-open-cbot .cancel-selected-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff7878;
    border: none;
    color: white;
    font-size: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
}

/* 取消按鈕的滑鼠懸停效果 */
.lwh-open-cbot .cancel-selected-image:hover {
    background-color: #ff1c1c;
}

/* 針對 Markdown 標題 */
.lwh-open-cbot .chat__messages__ai h1,
.lwh-open-cbot .chat__messages__ai h2,
.lwh-open-cbot .chat__messages__ai h3,
.lwh-open-cbot .chat__messages__ai h4,
.lwh-open-cbot .chat__messages__ai h5,
.lwh-open-cbot .chat__messages__ai h6 {
    margin: 0;
    font-weight: bold;
    background-color: var(--chatbot-bg-color);
    padding: 6px 12px;
    padding-right: 20px;
}

/* 針對 Markdown 粗體與斜體 */
.lwh-open-cbot .chat__messages__ai strong {
    font-weight: bold;
}

.lwh-open-cbot .chat__messages__ai em {
    font-style: italic;
}

/* 針對 Markdown 列表 */
.lwh-open-cbot .chat__messages__ai ol,
.lwh-open-cbot .chat__messages__ai ul {
    margin: 0;
    list-style-position: inside; /* 確保編號或項目符號在內側顯示 */
}

/* 針對 Markdown 區塊引用 */
.lwh-open-cbot .chat__messages__ai blockquote {
    border-left: 4px solid #ccc;
    padding-left: 10px;
    margin: 0;
    color: #454545;
    padding: 6px 12px;
    padding-right: 20px;
}
.lwh-open-cbot .chat__messages__ai p,
.lwh-open-cbot .chat__messages__ai ol,
.lwh-open-cbot .chat__messages__ai ul {
    display: block; /* 確保元素以區塊方式顯示 */
    width: 100%; /* 避免元素被分隔成多個區域 */
    background-color: var(--chatbot-bg-color);
    padding: 6px 12px;
    padding-right: 20px;

}
/* 針對 Markdown 程式碼區塊 */
.lwh-open-cbot .chat__messages__ai pre {
    background-color: #2c2c2c;
    padding: 10px;
    border-radius: 5px;
    overflow: auto;
    padding: 6px 12px;
    padding-right: 20px;
}

.lwh-open-cbot .chat__messages__ai code {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    background-color: rgb(73 73 74);
    color: #ffffff;
    border-radius: 3px;
    font-size: 10px;
    padding: 6px 12px;
    padding-right: 20px;
}

/* 針對 Markdown 表格 */
.lwh-open-cbot .chat__messages__ai table {
    border-collapse: collapse;
    width: 80%;
    background-color: var(--chatbot-bg-color);
    padding: 6px 12px;
    padding-right: 20px;
}

.lwh-open-cbot .chat__messages__ai th,
.lwh-open-cbot .chat__messages__ai td {
    border: 1px solid #ddd;
    padding: 8px;
    background-color: var(--chatbot-bg-color);
}

.lwh-open-cbot .chat__messages__ai th {
    background-color: #caceff;
    font-weight: bold;
}

/* 針對 Markdown 連結 */
.lwh-open-cbot .chat__messages__user a,
.lwh-open-cbot .chat__messages__ai a {
    color: #294bf5;
    text-decoration: none;
}

.lwh-open-cbot .chat__messages__user a:hover,
.lwh-open-cbot .chat__messages__ai a:hover {
    text-decoration: underline;
    color: #002aff;
}

/* quick-replies 容器樣式 */
.lwh-open-cbot .custom-chatbot .quick-replies {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-left: 15%;
    margin-right: 15%;
}

/* quick-reply-button 按鈕樣式 */
.lwh-open-cbot .custom-chatbot .quick-reply-button {
    color: white;
    background: linear-gradient(90deg, #38b2ac 0%, #1e8ece 100%);
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.9s ease, color 0.3s ease, box-shadow 0.3s ease-in-out;
    font-size: 12px;
    text-align: left;
}

.lwh-open-cbot .custom-chatbot .quick-reply-button:hover, 
.lwh-open-cbot .startup-btns p:hover {
    background: linear-gradient(to right, #b22222, #ef3030, #ff6666, #b22222);
    background-size: 300% 100%;
    animation: flowingGradient 3s infinite linear;
    color: white;
    box-shadow: 0 0 0.5rem #f37f7f;
}



/* Click to view examples.. */
summary {
    color: #287fcb !important;
}

/* 進度條外框 */
.progress-bar-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0px auto;
    display: flex;
    align-items: center;
    margin-bottom: -10px; /* 與輸入框的間距 */
}

/* 進度條柱本體 */
.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-right: 8px; /* 與「進度」的間距 */
    display: none; /* (可改)隱藏進度條特效，只留下文字 */

}

/* 進度條狀態 */
.progress-bar-status {
    height: 100%;
    width: 0%;
    background-color: #ef3030;
    transition: width 0.4s ease;
}

/* 進度文字 */
.progress-label {
    margin-left: auto;
    font-size: 12px;
    color: #a7a6a6;
    white-space: nowrap; /* 防止換行 */
}

/* 重整對話、收回前一則訊息 btn */
.chat__close-icon,
.chat__undo-icon,
.chat__refresh-icon {
    display: inline-block;
    margin: 0 2px;
    cursor: pointer;
    color: #ffffff;
    transition: color 0.2s ease;
}

.chat__close-icon:hover,
.chat__undo-icon:hover,
.chat__refresh-icon:hover {
    color: var(--chatbot-hover-color);
    font-size: 1.2rem;
}

/* 語言下拉選單 */
.language-selector-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
}

.language-current {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
}

.language-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333333; /* 背景色 */
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 5px 0;
    z-index: 10;
}

.language-list li {
    color: #ffffff;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.language-list li:hover {
    background: #ef3030;
}

.language-selector-container:hover .language-list {
    display: block;
}

/* input message */
#message {
    display: block;
    width: 100%;
    border: 0px solid var(--chatbot-bg-color);
    background-color: var(--chatbot-bg-color);
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 200px; /* 限制最大高度，避免過度增大 */
    overflow-y: auto; /* 當內容超過時啟用滾動條 */
    outline: none; /* 禁用外部高亮效果 */
    align-content: center;
}


/* ai訊息圖片視窗 */
.image__modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.2);
}

.image__modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

img:not(.bot-image):not(.avatar-image) {
    cursor: pointer;
    border-color: #ffffff00;
    background-color: #ffffff00;
    transition: transform 0.2s ease-in-out;
}

/*img:not(.bot-image):not(.avatar-image):hover {
    transform: scale(1.05);
}*/

.vertical-container {
    display: flex;
    gap: 6px;
    flex-direction: column;
    width: calc(100% - 38px);
}

/* 整體折疊式窗樣式 */
.ai_think {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: var(--chatbot-bg-color);
    overflow: hidden; /* 確保動畫流暢 */
}

/* 控制 transition，使展開/折疊平滑 */
.ai_think[open] {
    animation: expand 0.3s ease-out;
}

@keyframes expand {
    from {
        opacity: 0;
        transform: scaleY(0.8);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* 標題（summary）樣式 */
.ai_think_summary {
    cursor: pointer;
    font-weight: bold;
    padding: 10px;
    color: #243ba3;
    background-color: #e0e0e0;
    border-radius: 8px 8px 0 0;
    transition: background-color 0.2s ease;
}

.ai_think_summary:hover, .ai_think_summary:focus {
    background-color: #d0d0d0;
    padding: 10px;
}

/* 內容區塊樣式 */
.thinking_content {
    padding: 10px;
    overflow-y: auto;
    word-wrap: break-word;
    transition: max-height 0.3s ease-out;
    max-height: 200px; /* 預設最大高度 */
}

/* 當 `details` 展開時，移除高度限制 */
.ai_think[open] .thinking_content {
    max-height: none;
}