/* /Components/Layout/AICodingAssistant.razor.rz.scp.css */
/* AI Assistant Box */

#ai-assistant[b-rixkrqsosz] {
    position: absolute;
    bottom: 64px;
    left: 9px;
    width: 188px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 5px 16px;
    background: linear-gradient(var(--kendo-color-surface), var(--kendo-color-surface)) padding-box, linear-gradient(114deg, #4b5ffa 0%, #c158e4 93%) border-box;
}

    #ai-assistant[b-rixkrqsosz]::before {
        content: "";
        position: absolute;
        z-index: 0;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: .18;
        background: url(ai-circle.png) center center no-repeat;
        background-size: cover;
    }

    #ai-assistant h4[b-rixkrqsosz],
    #ai-assistant > p[b-rixkrqsosz],
    #ai-assistant > a[b-rixkrqsosz] {
        position: relative;
        padding-left: 41px;
        z-index: 2;
    }

    #ai-assistant h4[b-rixkrqsosz] {
        position: relative;
        margin: 0 0 .3em;
        font-size: 20px;
        line-height: 1.4;
        font-weight: 500;
    }

    #ai-assistant .k-icon[b-rixkrqsosz] {
        position: absolute;
        left: 0;
        top: 0;
        color: #4b5ffa;
    }

    #ai-assistant > a[b-rixkrqsosz] {
        color: #a75ae9;
        text-decoration: none;
    }

        #ai-assistant > a:hover[b-rixkrqsosz] {
            text-decoration: underline;
        }
/* /Components/Layout/ChatGPTLayout.razor.rz.scp.css */
.chat-layout[b-kgwcouogfb] {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: #212121;
    color: #ececec;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Sidebar Styling */
.sidebar[b-kgwcouogfb] {
    width: 260px;
    height: 100%;
    background-color: #171717;
    display: flex;
    flex-direction: column;
    padding: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-header[b-kgwcouogfb] {
    margin-bottom: 20px;
}

[b-kgwcouogfb] .new-chat-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
    border-radius: 8px;
    background-color: transparent !important;
    border: 1px solid #424242 !important;
    color: #fff !important;
    transition: background-color 0.2s;
}

[b-kgwcouogfb] .new-chat-btn:hover {
    background-color: #2f2f2f !important;
}

.history-scroll-area[b-kgwcouogfb] {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Custom Scrollbar */
.history-scroll-area[b-kgwcouogfb]::-webkit-scrollbar {
    width: 6px;
}

.history-scroll-area[b-kgwcouogfb]::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}

.sidebar:hover .history-scroll-area[b-kgwcouogfb]::-webkit-scrollbar-thumb {
    background: #424242;
}

.history-group[b-kgwcouogfb] {
    margin-bottom: 24px;
}

.history-label[b-kgwcouogfb] {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    padding: 0 12px;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-list[b-kgwcouogfb] {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item[b-kgwcouogfb] {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    position: relative;
    color: #d1d1d1;
}

.history-item:hover[b-kgwcouogfb] {
    background-color: #2f2f2f;
    color: #fff;
}

.history-item.active[b-kgwcouogfb] {
    background-color: #2f2f2f;
    color: #fff;
}

.history-item .k-icon[b-kgwcouogfb] {
    margin-right: 12px;
    font-size: 1rem;
    opacity: 0.7;
}

.item-text[b-kgwcouogfb] {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
    /* 增加右側間距，避免文字貼住按鈕 */
}

.item-actions[b-kgwcouogfb] {
    display: none;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(90deg, rgba(47, 47, 47, 0) 0%, rgba(47, 47, 47, 1) 30%);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 2;
    padding-right: 8px;
    /* 固定與右邊邊緣的距離 */
}

.history-item:hover .item-actions[b-kgwcouogfb],
.history-item.active .item-actions[b-kgwcouogfb] {
    display: flex;
}

/* 針對 Telerik Button 的深度樣式優化 */
[b-kgwcouogfb] .item-more-btn {
    color: #888 !important;
    transition: color 0.1s, background-color 0.1s !important;
    border-radius: 6px !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    display: flex !important;
    /* 強制按鈕內部使用 flex */
    justify-content: center !important;
    /* 水平居中 */
    align-items: center !important;
    /* 垂直居中 */
    border: none !important;
}

[b-kgwcouogfb] .item-more-btn:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

[b-kgwcouogfb] .item-more-btn .k-button-icon {
    font-size: 14px !important;
    margin: 0 !important;
    /* 移除任何可能的邊距偏移 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[b-kgwcouogfb] .rename-input {
    background-color: #212121 !important;
    color: #fff !important;
    border: 1px solid #4b5ffa !important;
    font-size: 0.9rem !important;
    height: 28px !important;
    width: 100% !important;
}

[b-kgwcouogfb] .rename-input .k-input-inner {
    padding: 0 8px !important;
}

/* Sidebar Footer */
.sidebar-footer[b-kgwcouogfb] {
    border-top: 1px solid #333;
    padding-top: 12px;
}

.user-profile[b-kgwcouogfb] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.user-profile:hover[b-kgwcouogfb] {
    background-color: #2f2f2f;
}

.user-info[b-kgwcouogfb] {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name[b-kgwcouogfb] {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Content Area */
.content[b-kgwcouogfb] {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chat-header[b-kgwcouogfb] {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background-color: rgba(33, 33, 33, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
    z-index: 10;
}

.model-selector[b-kgwcouogfb] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.model-selector:hover[b-kgwcouogfb] {
    background-color: #2f2f2f;
}

.model-name[b-kgwcouogfb] {
    font-weight: 600;
    font-size: 1.1rem;
}

.body-container[b-kgwcouogfb] {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* /Components/Pages/AgentChat.razor.rz.scp.css */
/* AgentChat V2: Premium Glassmorphism Theme */

.chat-page-container[b-ahft6g5m91] {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #1a1c2c 0%, #0d0e14 100%);
    overflow: hidden;
    position: relative;
}

/* Welcome Mode Styling */
.welcome-overlay[b-ahft6g5m91] {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-title[b-ahft6g5m91] {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    text-align: center;
}

.welcome-subtitle[b-ahft6g5m91] {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Telerik Chat Container */
.telerik-chat-container[b-ahft6g5m91] {
    flex: 1;
    padding: 1rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 0;
    animation: fadeIn-b-ahft6g5m91 0.4s ease-out;
}

@keyframes fadeIn-b-ahft6g5m91 {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ChatGPT 1:1 Design System --- */

/* Hide Telerik Defaults completely */
[b-ahft6g5m91] .k-chat .k-bubble,
[b-ahft6g5m91] .k-chat .k-message,
[b-ahft6g5m91] .k-chat .k-message-list-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

[b-ahft6g5m91] .k-message-list-content {
    display: flex;
    flex-direction: column;
    padding-bottom: 100px !important; /* Space for input box */
}

/* Prompt Box Styling */
.official-prompt-wrapper[b-ahft6g5m91] {
    width: 100%;
    max-width: 840px; /* Increased width as requested */
    margin-bottom: 3rem;
}

[b-ahft6g5m91] .k-prompt-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
}

/* ChatGPT Message Row - Minimalist No-Avatar Style */
.gpt-message-row[b-ahft6g5m91] {
    display: flex;
    padding: 12px 16px; /* Reduced vertical padding */
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 0;
    transition: background 0.2s ease;
    border-radius: 12px;
}

.user-row[b-ahft6g5m91] {
    background: transparent; /* Transparent row */
}

/* User Message: background only for the text bubble area */
.user-row .gpt-text-container[b-ahft6g5m91] {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 16px;
    border-radius: 15px;
    width: fit-content;
}

.gpt-content-col[b-ahft6g5m91] {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.gpt-text-container[b-ahft6g5m91] {
    color: #ececf1;
    line-height: 1.6;
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ChatGPT style horizontal action bar below text */
.gpt-action-bar[b-ahft6g5m91] {
    display: flex;
    gap: 12px;
    margin-top: 4px; /* Closer to the text block */
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gpt-message-row:hover .gpt-action-bar[b-ahft6g5m91] {
    opacity: 1;
}

[b-ahft6g5m91] .gpt-action-btn {
    color: rgba(255, 255, 255, 0.4) !important;
    padding: 4px !important;
    min-width: unset !important;
    border-radius: 5px !important;
    font-size: 1.1rem !important;
    transition: color 0.2s, background 0.2s !important;
}

[b-ahft6g5m91] .gpt-action-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Telerik Chat Internal Overrides */
[b-ahft6g5m91] .k-chat {
    background: transparent !important;
    border: none !important;
}

[b-ahft6g5m91] .k-chat .k-message-time, 
[b-ahft6g5m91] .k-chat-date,
[b-ahft6g5m91] .k-chat .k-avatar,
[b-ahft6g5m91] .k-chat .k-message-author,
[b-ahft6g5m91] .k-chat .k-message-group-header,
[b-ahft6g5m91] .k-chat .k-timestamp {
    display: none !important; /* Hide all internal elements, labels and timestamps */
}

/* Status Indicators */
.status-indicator-container[b-ahft6g5m91] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-indicator[b-ahft6g5m91] {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.online[b-ahft6g5m91] { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.offline[b-ahft6g5m91] { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.connecting[b-ahft6g5m91] { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }

/* Suggestion Pills */
.suggestion-pills[b-ahft6g5m91] {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pill[b-ahft6g5m91] {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.pill:hover[b-ahft6g5m91] {
    background: rgba(255, 255, 255, 0.1);
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
}

/* Stop Generation Button (Floating Mode) */
.stop-generation-container[b-ahft6g5m91] {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideUp-b-ahft6g5m91 0.3s ease-out;
}

@keyframes slideUp-b-ahft6g5m91 {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

[b-ahft6g5m91] .stop-btn-premium {
    background: rgba(15, 15, 15, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
}

[b-ahft6g5m91] .stop-btn-premium:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.8) !important;
    color: #ef4444 !important;
    transform: scale(1.05);
}
