/* Chat Agent Floating Button */
#chat-agent-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: filter 0.2s;
}
#chat-agent-btn:hover img {
    filter: brightness(0.97) drop-shadow(0 2px 8px rgba(0,0,0,0.10));
    animation: chat-agent-subtle 0.28s cubic-bezier(.4,0,.2,1);
    transform: scale(1.045) translateY(-2px);
}

@keyframes chat-agent-subtle {
    0%   { transform: scale(1) translateY(0); }
    60%  { transform: scale(1.06) translateY(-3px); }
    100% { transform: scale(1.045) translateY(-2px); }
}
#chat-agent-btn img {
    width: 88px;
    height: 88px;
    max-width: 22vw;
    max-height: 22vw;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

/* Chat Agent Box */
#chat-agent-box {
    position: fixed;
    bottom: 110px;
    right: 32px;
    width: 350px;
    max-width: 95vw;
    height: 480px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px);}
    to { opacity: 1; transform: translateY(0);}
}
#chat-agent-header {
    background: #2d3e50;
    color: #fff;
    padding: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#chat-agent-header img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
}
#chat-agent-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    margin-left: 8px;
}
#chat-agent-log {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f7f8fa;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.chat-msg.agent {
    justify-content: flex-start;
}
.chat-msg.user {
    justify-content: flex-end;
}
.chat-msg.agent .bubble {
    background: #e9f1fb;
    color: #1a2a3a;
    border-radius: 16px 16px 16px 4px;
}
.chat-msg.user .bubble {
    background: #2d3e50;
    color: #fff;
    border-radius: 16px 16px 4px 16px;
}
.bubble {
    padding: 10px 16px;
    max-width: 220px;
    word-break: break-word;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
#chat-agent-input-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
    gap: 8px;
}
#chat-agent-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 15px;
    outline: none;
    background: #f7f8fa;
}
#chat-agent-send {
    background: #2d3e50;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 18px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
#chat-agent-send:disabled {
    background: #aaa;
    cursor: not-allowed;
}
#chat-agent-suggested {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.suggested-btn {
    background: #e9f1fb;
    color: #1a2a3a;
    border: none;
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}
.suggested-btn:hover {
    background: #d0e3fa;
}
@media (max-width: 600px) {
    #chat-agent-box {
        width: 98vw;
        right: 1vw;
        bottom: 80px;
        height: 70vh;
        min-width: unset;
        max-width: 100vw;
    }
    #chat-agent-btn {
        bottom: 12px;
        right: 12px;
    }
    #chat-agent-btn img {
        width: 48px;
        height: 48px;
        max-width: 18vw;
        max-height: 18vw;
    }
}