/**
 * JexHRAI - Conversation 模組專用樣式
 *
 * 此檔案包含 Conversation 模組的所有專用 CSS 樣式
 * 從共同樣式檔案中抽離出來，便於模組自主管理
 *
 * @version 1.0.0
 * @since 2025-01-19
 */

/* --- Conversation 模組對話容器樣式 --- */
.jexhrai-conversation-wrapper .jexhrai-conversation-input-area {
    flex-shrink: 0;
}

/* 歷史對話列表樣式 */
.jexhrai-conversation-history-list {
    margin: 0px 0;
    border: 1px solid var(--jexhrai-border);
    border-radius: var(--jexhrai-radius-sm);
    background: var(--jexhrai-bg-light);
    overflow: hidden;
    width: 100%;
}

.jexhrai-conversation-history-list ul {
    list-style: none;
    /* 這行就是用來移除圓點的 */
    margin: 0;
    padding: 0;
}

.jexhrai-conversation-history-list .history-list-item {
    border-bottom: 1px solid var(--jexhrai-border-light);
    transition: background-color 0.2s ease;
}

.jexhrai-conversation-history-list .history-list-item:last-child {
    border-bottom: none;
}

.jexhrai-conversation-history-list .history-list-item:hover {
    background-color: var(--jexhrai-bg-hover);
}

.jexhrai-conversation-history-list .history-list-item.active {
    background-color: var(--jexhrai-primary);
    color: white;
}

.jexhrai-conversation-history-list .history-list-item.active:hover {
    background-color: #f1a919;
}

.jexhrai-conversation-history-list .history-item-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.jexhrai-conversation-history-list .history-item-link:hover {
    text-decoration: none;
    color: inherit;
}

.jexhrai-conversation-history-list .history-item-snippet {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jexhrai-conversation-history-list .history-item-time {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    font-style: italic;
}

.jexhrai-conversation-history-list .history-list-item.active .history-item-time {
    opacity: 0.9;
}

/* 無歷史記錄時的樣式 */
.jexhrai-no-history {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* ======== Conversation：送出按鈕閃爍動畫（原本由 JS inline <style> 注入，已移至 CSS） ======== */
@keyframes jexhraiConversationButtonFlash {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 120, 212, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(0, 120, 212, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 120, 212, 0); }
}

.jexhrai-conversation-submit.icon-button.flash-animation {
    animation: jexhraiConversationButtonFlash 0.5s ease;
}
