.tnr-chat { position: fixed; right: 20px; bottom: 20px; z-index: 10000; font-family: inherit; color: #202b28; }
.tnr-chat * { box-sizing: border-box; }
.tnr-chat-launcher { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; border: 0; border-radius: 26px; padding: 11px 18px; background: #04724d; color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 18px #0003; }
.tnr-chat-launcher svg { display: block; flex: none; }
.tnr-chat-launcher:hover { background: #035f40; }
.tnr-chat-launcher:focus-visible, .tnr-chat button:focus-visible, .tnr-chat a:focus-visible, .tnr-chat input:focus-visible { outline: 3px solid #e4b95f; outline-offset: 2px; }
.tnr-chat-panel { position: absolute; right: 0; bottom: 60px; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100dvh - 110px)); display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #d7e2da; border-radius: 12px; box-shadow: 0 10px 36px #0003; }
.tnr-chat-panel[hidden] { display: none; }
.tnr-chat-header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 68px; padding: 12px 16px; background: #04724d; color: #fff; }
.tnr-chat-header strong, .tnr-chat-header span { display: block; }
.tnr-chat-header span { font-size: 12px; opacity: .9; }
.tnr-chat-close { border: 0; background: transparent; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.tnr-chat-messages { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 14px; background: #f8faf8; scrollbar-width: thin; }
.tnr-chat-message { max-width: 91%; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.tnr-chat-message p { margin: 0; white-space: pre-wrap; }
.tnr-chat-bot { background: #fff; border: 1px solid #dce6de; }
.tnr-chat-user { margin-left: auto; background: #dcefe5; }
.tnr-chat-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.tnr-chat-actions a { color: #045b3f; font-weight: 700; text-decoration: underline; }
.tnr-chat-prompts { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 12px; border-top: 1px solid #e1e9e3; background: #fff; }
.tnr-chat-prompts button { border: 1px solid #9cbba9; border-radius: 16px; padding: 5px 9px; color: #045b3f; background: #fff; font: inherit; font-size: 12px; line-height: 1.25; cursor: pointer; }
.tnr-chat-prompts button:hover { background: #e8f5ed; }
.tnr-chat-form { flex: 0 0 auto; padding: 10px 12px 12px; background: #fff; border-top: 1px solid #e1e9e3; }
.tnr-chat-label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.tnr-chat-compose { display: flex; gap: 7px; }
.tnr-chat-compose input { flex: 1; min-width: 0; border: 1px solid #aebfb4; border-radius: 6px; padding: 9px; font: inherit; font-size: 14px; color: #202b28; background: #fff; }
.tnr-chat-compose button { border: 0; border-radius: 6px; padding: 9px 12px; background: #04724d; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.tnr-chat-compose button:disabled { opacity: .6; cursor: wait; }
html[data-theme="dark"] .tnr-chat-panel, html[data-theme="dark"] .tnr-chat-form, html[data-theme="dark"] .tnr-chat-bot, html[data-theme="dark"] .tnr-chat-prompts { background: #202a26; color: #f4f7f4; border-color: #44594b; }
html[data-theme="dark"] .tnr-chat-messages { background: #17211c; }
html[data-theme="dark"] .tnr-chat-user { background: #315b43; color: #fff; }
html[data-theme="dark"] .tnr-chat-prompts { border-color: #44594b; }
html[data-theme="dark"] .tnr-chat-prompts button, html[data-theme="dark"] .tnr-chat-compose input { background: #17211c; border-color: #64816b; color: #fff; }
html[data-theme="dark"] .tnr-chat-actions a { color: #a8e4ba; }
@media (max-width: 480px) { .tnr-chat { right: 12px; bottom: 12px; } .tnr-chat-panel { bottom: 60px; height: min(540px, calc(100dvh - 90px)); } }
@media (max-width: 900px) {
    body:has(.customer-mobile-shortcuts) .tnr-chat {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
    body:has(.customer-mobile-shortcuts) .tnr-chat-panel {
        height: min(540px, calc(100dvh - 175px - env(safe-area-inset-bottom)));
    }
}
@media (max-width: 700px) {
    .tnr-chat-staff { right: 8px; bottom: 0; }
    .tnr-chat-staff .tnr-chat-launcher { display: none; }
    .tnr-chat-staff .tnr-chat-panel {
        position: fixed;
        right: 8px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: min(380px, calc(100vw - 16px));
        height: min(540px, calc(100dvh - 100px - env(safe-area-inset-bottom)));
    }
}
