/* 智能体浮窗（按钮 + 遮罩 + iframe） */

.agent-float-launcher {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20000;

    border: none;
    background: transparent;
    padding: 0;

    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.agent-launcher-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-image: url('../img/CanBaoAgent.png');
    background-size: 90%;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #dcf0d0;
    box-shadow:
        0 0 0 3px #dde1af,
        0 0 0 5px #689551,
        0 10px 30px rgba(0,0,0,0.18);
    transition: background-size 0.3s ease, box-shadow 0.3s ease;
}

.agent-float-launcher:hover .agent-launcher-avatar {
    background-size: 105%;
    box-shadow:
        0 0 0 3px #dde1af,
        0 0 0 5px #689551,
        0 14px 36px rgba(0,0,0,0.24);
}

.agent-launcher-label {
    font-size: 14px;
    font-weight: 700;
    color: #2f3a2f;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.agent-float-launcher:hover {
    transform: translateY(-50%);
}

.agent-float-overlay {
    position: fixed;
    inset: 0;
    z-index: 20001;
    display: none;
    background: rgba(0, 0, 0, 0.35);
}

.agent-float-overlay.is-open {
    display: block;
}

.agent-float-window {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);

    width: min(28vw, 450px);
    height: 95vh;

    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}

@media (max-width: 768px) {
    .agent-float-window {
        width: calc(100vw - 36px);
        height: calc(100vh - 36px);
    }
}

.agent-float-toolbar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 10px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.agent-float-menu {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-float-menu:hover {
    background: rgba(0,0,0,0.06);
}

.agent-float-title {
    font-size: 16px;
    font-weight: 700;
    color: #2f3a2f;
    flex: 1;
    text-align: center;
}

.agent-float-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.agent-float-close:hover {
    background: rgba(0,0,0,0.06);
}

.agent-float-iframe {
    width: 100%;
    height: calc(100% - 48px);
    border: 0;
    display: block;
}
