/**
 * ai-trigger-dot.css — AI 辅助触发器组件样式
 * 版本：v1.0 | 日期：2026-06-18
 */

/* ==================== 小圆点 ==================== */

.ai-trigger-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff, #36cfc9);
    box-shadow: 0 0 8px rgba(24, 144, 255, 0.5), 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1050;
    animation: ai-dot-breathe 2s ease-in-out infinite;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ai-trigger-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 0 14px rgba(24, 144, 255, 0.7), 0 3px 8px rgba(0, 0, 0, 0.2);
}

@keyframes ai-dot-breathe {
    0%, 100% {
        transform: scale(1.0);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ==================== AI 面板 ==================== */

.ai-trigger-panel {
    position: fixed;
    width: 200px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1100;
    overflow: hidden;
    animation: ai-panel-in 0.2s ease-out;
}

@keyframes ai-panel-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-trigger-panel-header {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #8c8c8c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.ai-trigger-panel-options {
    padding: 4px 0;
}

/* ==================== 面板选项 ==================== */

.ai-trigger-panel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    user-select: none;
}

.ai-trigger-panel-item:hover {
    background-color: #e6f7ff;
}

.ai-trigger-panel-item:active {
    background-color: #bae7ff;
}

.ai-trigger-panel-item-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.ai-trigger-panel-item-label {
    font-size: 13px;
    font-weight: 600;
    color: #262626;
    white-space: nowrap;
}

.ai-trigger-panel-item-desc {
    display: none; /* 隐藏描述文字，保持面板简洁；hover 时可扩展 */
}

/* ==================== 加载状态 ==================== */

.ai-trigger-panel.ai-trigger-loading .ai-trigger-panel-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    gap: 10px;
}

.ai-trigger-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 操作反馈提示（轻量级，非阻塞） */
.ai-trigger-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #262626;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 1200;
    pointer-events: none;
    animation: ai-toast-in 0.3s ease-out, ai-toast-out 0.3s ease-in 2.5s forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes ai-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes ai-toast-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
