/**
 * TalkingAgent - 对话组件样式
 * 透明背景、无边框的对话容器
 */

/* 主容器 */
.talking-agent {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 消息显示区域 */
.talking-agent-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
    min-height: 60px;
    max-height: 100px;
    background-color: transparent;
    scrollbar-width: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 消息显示区域 - Webkit 滚动条样式 */
.talking-agent-messages::-webkit-scrollbar {
    display: none;
}

/* 单条消息 */
.talking-agent-message {
    padding: 4px 20px;
    word-wrap: break-word;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 400;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
}

/* 用户消息样式（不显示，但保留以防万一） */
.talking-agent-message-user {
    display: none;
}

/* Agent 消息样式 */
.talking-agent-message-agent {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* 默认消息样式 */
.talking-agent-message-default {
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

/* 输入区域容器 */
.talking-agent-input {
    position: relative;
    margin-top: 0px;
}

/* 输入框 */
.talking-agent-input-field {
    width: 100%;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 400;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    outline: none;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: center;
    transition: border-bottom-color 0.3s ease, background-color 0.3s ease;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

/* 输入框占位文字 */
.talking-agent-input-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 输入框 focus 状态 */
.talking-agent-input-field:focus {
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* 输入框：:-webkit-autofill 状态（避免背景变色） */
.talking-agent-input-field:-webkit-autofill,
.talking-agent-input-field:-webkit-autofill:hover,
.talking-agent-input-field:-webkit-autofill:focus {
    background-color: transparent;
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .talking-agent-messages {
        min-height: 50px;
        max-height: 80px;
        padding: 4px 0;
    }

    .talking-agent-message {
        font-size: 11px;
        padding: 3px 15px;
    }

    .talking-agent-input-field {
        font-size: 11px;
        padding: 3px 0;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .talking-agent {
        /* 适配暗色主题的样式（如果需要） */
    }
}

/* 动画效果 - 消息淡入 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.talking-agent-message {
    animation: fadeIn 0.3s ease-out;
}
