﻿
/* 右側 AI 對話側邊欄 */
#uMasterPage_AsideRight {
    position: relative; /* 為了 resizer 定位 */
    width: 350px; /* 初始寬度 */
    min-width: 250px; /* 最小寬度 */
    max-width: 600px; /* 最大寬度 */
    border-left: 1px solid #e0e0e0;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0; /* 防止被壓縮 */
    height: 100vh; /* 佔滿可用高度 */
}

    /* header */
    #uMasterPage_AsideRight header {
        height: 56px;
    }

#uMasterPage_AsideRight_Header_MoreOptions {
    position: relative;
    display: inline-block;
}

#uMasterPage_AsideRight_Header_MoreOptions_3dot {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
}

    #uMasterPage_AsideRight_Header_MoreOptions_3dot:hover {
        opacity: 0.8;
    }

#uMasterPage_AsideRight_Header_MoreOptions_DropdownContent {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0; /* 讓下拉選單靠右對齊 */
    border-radius: 5px;
    overflow: hidden;
}

    #uMasterPage_AsideRight_Header_MoreOptions_DropdownContent a {
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
        text-decoration: none;
    }

        #uMasterPage_AsideRight_Header_MoreOptions_DropdownContent a:hover {
            background-color: #f1f1f1;
        }

#uGemini-closer {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
}

    #uGemini-closer:hover {
        opacity: 0.8;
    }

/* body */
#uMasterPage_AsideRight_Body {
    flex: 1 1 auto;
    padding: 15px;
    overflow-y: auto;
    background-color: #f7f9fb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0; /* 防止 overflow 被壓縮 */
}

/* footer */
#uMasterPage_AsideRight footer {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background-color: #ffffff;
    flex: 0 0 auto;
}

.masterpage-aside-right-footer-file-upload {
    display: flex;
    align-items: center;
    position: relative;
}

    .masterpage-aside-right-footer-file-upload #add-file-btn,
    .masterpage-aside-right-footer-file-upload #cancel-file-btn {
        background: none;
        border: none;
        color: #555;
        cursor: pointer;
        font-size: 24px;
        padding: 5px;
    }

        .masterpage-aside-right-footer-file-upload #add-file-btn:hover,
        .masterpage-aside-right-footer-file-upload #cancel-file-btn:hover {
            color: #007bff;
        }

.file-name {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
    max-width: 100px; /* 限制文件名長度 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#txtAIInput {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    resize: none; /* 禁止手動調整大小 */
    min-height: 40px;
    max-height: 80px; /* 限制最大高度 */
    overflow-y: auto;
}
    #txtAIInput:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    }

#uMasterAI_SendMessage {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    transition: background-color 0.3s ease;
}

    #uMasterAI_SendMessage:hover {
        background-color: #0056b3;
    }

/* 拖曳調整寬度把手 */
.masterpage-aside-right-resizer {
    width: 5px;
    height: 100%;
    background-color: rgba(0,0,0,0.1); /* 淺灰色把手 */
    position: absolute;
    left: 0;
    top: 0;
    cursor: ew-resize; /* 左右拖曳游標 */
    z-index: 1001; /* 確保在聊天內容之上 */
}
    .masterpage-aside-right-resizer:hover {
        background-color: #007bff; /* 懸停時變色 */
    }
