/* CodeCat 社区小助手 —— 回复框右上角 3D 悬浮（配色全部走 CSS 变量，适配主题换肤） */

/* 锚定：回复卡片为定位参照 */
#replyBox {
    position: relative;
}

/* 挂载点：右上角「坐框沿」效果——猫坐在回复卡片上沿，脚垂在框面上
   （top:-86px + 110px 高 = 脚部 24px 与框面重叠，呈坐姿）；游客无回复框时隐藏 */
#codecat-mount {
    position: absolute;
    top: -86px;
    right: 14px;
    width: 110px;
    height: 110px;
    pointer-events: none;
    display: none;
}

#replyBox #codecat-mount {
    display: block;
}

#codecat-mount.cc-hidden {
    display: none !important;
}

/* 画布不裁切：整只猫可见，脚部与框面重叠形成「坐在上沿」的坐姿 */
#codecat-mount canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto;
    cursor: pointer;
}

/* 静态降级（移动端 / 低配 / 强制静态）：同款坐姿 */
#codecat-mount img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
    transform-origin: 50% 100%;
}

#codecat-mount.breathe img {
    animation: cc-breathe 3.2s ease-in-out infinite;
}

@keyframes cc-breathe {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.015); }
}

/* 点击弹出的小 tip（无圆角，跟随核心风格） */
#codecat-tip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--card);
    border: 1px solid var(--bd);
    color: var(--tx);
    font-size: 12.5px;
    line-height: 1.4;
    padding: 6px 10px;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    pointer-events: none;
    z-index: 7;
}

#codecat-tip.show {
    opacity: 1;
    visibility: visible;
}

/* 弱网 / 减少动效：呼吸动画关闭 */
@media (prefers-reduced-motion: reduce) {
    #codecat-mount.breathe img {
        animation: none;
    }
}
