#search-agent {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 500px;
    min-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px #0005;
    display: flex;
    flex-direction: column;
    padding: 30px;
    padding-top: 60px;
    pointer-events: none;
    opacity: 0;
    bottom: 10px;
    transition: opacity .2s, bottom .2s;
}

#search-agent.open {
    pointer-events: auto;
    opacity: 1;
    bottom: 30px;
}

#search-agent-minimize-btn {
    all: unset;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

#search-agent-minimize-btn span {
    display: block;
    height: 2px;
    width: 16px;
    background: black;
    margin-top: 10px;
}

#search-agent-launcher {
    cursor: pointer;
    position: fixed;
    transition: opacity .2s;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    width: 80px;
    height: 80px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: white;
    box-shadow: 0 3px 15px #0005;
}

#search-agent-launcher svg {
    width: 32px;
    height: 32px;
}

#search-agent-launcher.open {
    opacity: 0;
    pointer-events: none;
}

#search-agent-messages {
    overflow-y: auto;
    flex: 1;
    max-height: 75dvh;
    margin-bottom: 12px;
}

.search-agent-message {
    display: flex;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
}

.search-agent-message .bubble {
    background-color: #F3F3F4;
    padding: 6px 12px;
    border-radius: 8px;
    word-break: break-word;
    max-width: 75%;
}

.search-agent-message .bubble :last-child {
    margin-bottom: 0 !important;
}

.search-agent-message .avatar,
#search-agent-typing .avatar {
    width: 32px;
    height: 32px;
    border-radius: 100%;
    border: 1px solid #EFEFEF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.search-agent-message .avatar svg,
#search-agent-typing .avatar svg {
    width: 20px;
    height: 20px;
}

.search-agent-message .avatar [fill],
#search-agent-typing .avatar [fill] {
    fill: var(--systemColor);
}

.search-agent-message-agent {
    flex-direction: row-reverse;
    justify-content: left;
}

.search-agent-system-message {
    text-align: center;
    color: #abafb5;
    padding: 10px;
}

.search-agent-message-user {
    justify-content: right;
}

#search-agent-typing {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    margin-bottom: 8px;
    align-items: center;
}

#search-agent-typing .avatar {
    margin-right: 4px;
}

#search-agent-typing span {
    width: 4px;
    height: 4px;
    background-color: #bebec9;
    border-radius: 50%;
    opacity: 0.3;
    animation: search-agent-fade 1.4s infinite ease-in-out;
}

#search-agent-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

#search-agent-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes search-agent-fade {
    0%, 80%, 100% {
        opacity: 0.2;
    }
    40% {
        opacity: 1;
    }
}
