/* Isolated frame only. The existing floating widget keeps its original CSS. */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font: 16px/1.55 system-ui, sans-serif; color: var(--bubble-bot-text, #243044); background: var(--chatbot-bg, #fff); }
[hidden] { display: none !important; }
.tm-flat-shell { display: flex; flex-direction: column; height: 100%; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--border-gray, #d8dfe6); border-radius: 16px; }
.tm-flat-shell > h2 { margin: 0 0 16px; font-size: 1.3rem; line-height: 1.3; }
#tm-chatbot { flex: 1; min-height: 0; }
#tm-chatbot > .chatbot { width: 100%; min-width: 0; height: 100%; min-height: 0; margin: 0; padding: 0; border-radius: 0; box-shadow: none; font: inherit; background: transparent; }
#tm-chatbot .chatbot-header { display: none; }
#tm-chatbot .chatbot-messages { flex: 1; min-height: 0; max-height: none; padding: 4px; overflow-wrap: anywhere; overscroll-behavior: contain; }
#tm-chatbot .chatbot-message { clear: both; font-size: 1rem; }
#tm-chatbot .chatbot-message img { max-width: 100%; height: auto; }
#tm-chatbot .chatbot-form { margin: 12px 0 0; padding-top: 16px; }
#tm-chatbot .chatbot-input { min-width: 0; width: 0; font: inherit; min-height: 46px; border-radius: 9px; background: var(--chatbot-bg); color: inherit; }
#tm-chatbot .chatbot-send-button, #tm-flat-retry { min-height: 46px; padding: 10px 16px; border: 0; border-radius: 9px; background: var(--bubble-user-bg, #0872b5); color: var(--bubble-user-text, #fff); box-shadow: none; font: inherit; font-weight: 600; cursor: pointer; }
#tm-flat-retry { align-self: flex-start; }
#tm-chatbot .chatbot-send-button:disabled { opacity: .6; cursor: wait; }
#tm-chatbot .chatbot-message a { color: var(--bubble-user-text, #fff); }
:is(input, button, a):focus-visible { outline: 2px solid var(--focus-blue, #344859); outline-offset: 2px; }
@media (max-width: 420px) {
    #tm-chatbot .chatbot-form { flex-wrap: wrap; }
    #tm-chatbot .chatbot-input { flex-basis: 100%; width: 100%; }
    #tm-chatbot .chatbot-send-button { width: 100%; }
    #tm-chatbot .chatbot-message.assistant, #tm-chatbot .chatbot-message.chatbot-message-bot { margin-right: 4%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
