/* Estilos para o indicador de "digitando" do chatbot */
#chatbot-widget #chatbot-toggle {
    min-width: 48px;
    min-height: 48px;
    opacity: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    will-change: transform, box-shadow;
    transition:
        opacity 0.26s ease-out,
        transform 0.12s ease-out,
        box-shadow 0.18s ease-out,
        filter 0.18s ease-out,
        background-color 0.18s ease-out;
}

#chatbot-widget #chatbot-toggle:hover,
#chatbot-widget #chatbot-toggle:focus-visible {
    transform: scale(1.04);
    box-shadow: 0 12px 28px rgba(11, 32, 60, 0.28);
}

#chatbot-widget #chatbot-toggle:active {
    transform: scale(0.94);
}

#chatbot-widget #chatbot-toggle.chatbot-toggle-hidden {
    opacity: 0;
    pointer-events: none;
}

#chatbot-widget #chatbot-toggle.chatbot-toggle-visible {
    opacity: 1;
    pointer-events: auto;
}

.chatbot-window-anim {
    transform-origin: 92% 100%;
    opacity: 0;
    transform: translateY(14px) scale(0.22);
    filter: blur(1px);
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.12),
        opacity 0.2s ease-out,
        filter 0.2s ease-out,
        visibility 0s linear 0.34s;
}

.chatbot-window-anim.chatbot-window-closing {
    transform: translateY(-10px) scale(0.2);
    opacity: 0;
    filter: blur(1.4px);
}

.chatbot-window-anim.chatbot-window-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    visibility: visible;
    pointer-events: auto;
    transition:
        transform 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.12),
        opacity 0.22s ease-out,
        filter 0.22s ease-out,
        visibility 0s linear 0s;
}

#chatbot-window {
    overflow: hidden;
}

#chatbot-window:not(.hidden) {
    display: flex;
    flex-direction: column;
}

#chatbot-messages {
    flex: 1 1 auto;
    min-height: 0;
}

#chatbot-window > div:last-child {
    margin-top: auto;
    background: inherit;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

@media (prefers-reduced-motion: reduce) {
    .chatbot-window-anim,
    .chatbot-window-anim.chatbot-window-open,
    .chatbot-window-anim.chatbot-window-closing {
        transition: none;
    }
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1rem; /* Mesma altura do texto para alinhamento */
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #8e8e93;
    border-radius: 50%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}
