﻿#ask-etherscan-main {
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 1020;
}

@media (min-width: 576px) {
    #ask-etherscan-main {
        bottom: 2rem;
        right: 2rem;
        z-index: 1020;
    }

    #ask-etherscan-main .js-chat-container {
        width: 500px;
    }
}

#divAskChat-main .js-chat-container {
    max-height: 75vh;
    z-index: 1020;
}

/**
 * AI Chat plugin — floating chat widget styles.
 * Scoped to [data-ai-chat] for reuse across pages.
 */

[data-ai-chat] .js-chat-container {
    display: flex;
    flex-direction: column;
    width: calc(100vw - 1rem);
    max-height: 75vh;
}

[data-ai-chat] .js-chat-container > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-anchor: none;
}

[data-ai-chat] .js-chat,
[data-ai-chat] .js-chat-messages {
    overflow-anchor: none;
}

[data-ai-chat] .js-chat-prompts {
    padding-top: 0.5rem;
}

/* Optional textarea + submit layout (when present in markup) */
[data-ai-chat] .js-chat-input {
    padding-right: 2.575rem;
    resize: none;
    overflow-y: hidden;
    max-height: 10rem;
}

[data-ai-chat] .js-chat-form button[type="submit"] {
    right: 0.5rem;
    bottom: 0.375rem;
    width: 1.75rem;
    height: 1.75rem;
}

[data-ai-chat] .js-chat-form:has(.js-chat-input) .js-stop-reply {
    right: 0.5rem;
    bottom: 0.375rem;
    width: 1.75rem;
    height: 1.75rem;
}

/* Stop-only footer (no textarea) */
[data-ai-chat] .js-chat-form:not(:has(.js-chat-input)) {
    display: flex;
    justify-content: flex-start;
}
