/* AI 助手组件基础样式 */
.ai-assistant-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 18px 35px rgba(102, 126, 234, 0.35);
    cursor: pointer;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-assistant-toggle:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 45px rgba(102, 126, 234, 0.45);
}

.ai-assistant-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: min(420px, 90vw);
    max-height: min(560px, 80vh);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(76, 81, 191, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1055;
}

@media (max-width: 768px) {
    .ai-assistant-toggle {
        right: 16px;
        bottom: 16px;
    }
    .ai-assistant-panel {
        right: 12px;
        left: 12px;
        width: auto;
        max-height: 80vh;
    }
}

.ai-assistant-panel.open {
    display: flex;
}

.ai-assistant-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-assistant-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-assistant-header button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.ai-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    background: #f7f8fc;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-assistant-message {
    padding: 12px 14px;
    border-radius: 14px;
    max-width: 85%;
    line-height: 1.6;
    font-size: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.ai-assistant-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ai-assistant-message.ai {
    align-self: flex-start;
    background: #ffffff;
    color: #333;
}

.ai-assistant-footer {
    border-top: 1px solid rgba(118, 75, 162, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-assistant-footer textarea {
    width: 100%;
    border: 1px solid rgba(118, 75, 162, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    resize: none;
    min-height: 68px;
    font-size: 14px;
    line-height: 1.5;
    transition: border 0.2s ease;
}

.ai-assistant-footer textarea:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.15);
}

.ai-assistant-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-assistant-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-assistant-hints button {
    border: none;
    border-radius: 999px;
    background: rgba(118, 75, 162, 0.08);
    color: #5b3fad;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.ai-assistant-send {
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ai-assistant-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-assistant-status {
    font-size: 12px;
    color: #764ba2;
}

.ai-assistant-empty {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 40px;
}

.ai-assistant-error {
    background: rgba(234, 84, 85, 0.12);
    color: #d93025;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}
