/* 
 * Astra AI 智能体应用平台
 * 主样式表
 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

.navbar-brand {
    font-weight: 700;
}

/* 智能体卡片样式 */
.card {
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.card-img-container {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card-title {
    font-weight: 600;
    margin-bottom: 10px;
}

/* 修复描述文本截断问题 */
.card-text {
    overflow: visible !important; /* 确保文本可见 */
    text-overflow: clip !important; /* 不使用省略号 */
    white-space: normal !important; /* 允许文本换行 */
    line-height: 1.5;
    height: auto !important; /* 自适应高度 */
    display: block !important; /* 块级显示 */
    margin-bottom: 15px;
}

/* 卡片描述文本悬停样式 */
.card:hover .card-text {
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

/* 针对可能存在的特定类修复 */
.text-truncate, .text-ellipsis {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

/* 卡片通用样式 */
.card-body {
    padding: 15px;
    flex: 1;
}

.card-footer {
    background-color: transparent;
    border-top: none;
    padding-top: 0;
}

/* 其他通用样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.btn-primary {
    background-color: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
}

.btn-outline-primary {
    color: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
}

/* 过期时间显示 */
.expire-date {
    border: 1px solid #dc3545;
    padding: 5px; 
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    text-align: center;
}

.expire-date span {
    color: #dc3545;
    font-weight: bold;
    font-size: 13px;
}

/* 顶部通知横幅 */
.top-banner {
    background-color: #f0f8ff;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    color: #0d6efd;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 自定义按钮 */
.btn-dark {
    background-color: #212529;
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.btn-dark:hover {
    background-color: #0d6efd;
}

/* 首页主标题区域 */
.display-4 {
    font-weight: 800;
    margin-bottom: 1rem;
}

/* 页面内容区域 */
.agent-detail-header {
    background-color: #f8f9fa;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.agent-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background-color: white;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 聊天窗口样式 */
.chat-container {
    max-height: 500px;
    overflow-y: auto;
    background-color: #f9f9f9;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
}

.chat-message {
    margin-bottom: 1rem;
    max-width: 80%;
}

.user-message {
    margin-left: auto;
    background-color: #0d6efd;
    color: white;
    border-radius: 1rem 1rem 0 1rem;
    padding: 0.75rem 1rem;
}

.bot-message {
    background-color: white;
    border-radius: 1rem 1rem 1rem 0;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 消息输入框区域 */
.message-input-container {
    background-color: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
}

.message-input {
    border: none;
    resize: none;
    outline: none !important;
    box-shadow: none !important;
}

.send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .agent-logo {
        width: 80px;
        height: 80px;
    }
    
    .agent-detail-header {
        padding: 1.5rem;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

/* 辅助类 */
.text-gradient {
    background: linear-gradient(90deg, #2F80ED, #56CCF2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 到期时间徽章样式 */
.expiry-date-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 卡密到期时间显示框 */
.expiry-box {
    background-color: #dc3545;
    color: white;
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-weight: bold;
}

/* 有效期文字样式 - 红色文字版本 */
.expiry-text {
    color: #dc3545;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    width: 100%;
    display: block;
    margin-top: 5px;
}

/* 有效期红色边框样式 - 更新版本 */
.expiry-show-box {
    color: #dc3545;
    font-weight: bold;
    font-size: 13px;
    margin-top: 10px; 
    border: 1px solid #dc3545;
    padding: 5px;
    border-radius: 4px;
    text-align: center;
}

/* 有效期文本显示 (纯红色文本) */
.expiry-plain-text {
    color: #dc3545;
    font-weight: bold;
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 0;
    padding: 3px 0;
    border-top: 1px solid #dc3545;
    border-bottom: 1px solid #dc3545;
    border-radius: 0;
} 