.floating-chat-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #e2e8f0; font-size: 14px; padding: 10px 2px; cursor: pointer; }
.floating-chat-control input { appearance: none; flex: 0 0 40px; width: 40px; height: 24px; min-height: 24px; margin: 0; padding: 2px; border: 1px solid #64748b; border-radius: 999px; background: #334155; cursor: pointer; }
.floating-chat-control input::before { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; background: #f8fafc; }
.floating-chat-control input:checked { background: #15803d; border-color: #4ade80; }
.floating-chat-control input:checked::before { transform: translateX(16px); }
.floating-chat-control input:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
.floating-chat-control[hidden], .floating-chat-launcher[hidden], .floating-chat-popup[hidden] { display: none; }
.floating-chat-launcher { position: fixed; z-index: 19; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #4ade80; background: #15803d; color: white; font-size: 25px; box-shadow: 0 6px 24px #0008; cursor: grab; touch-action: none; user-select: none; }
.floating-chat-launcher:active { cursor: grabbing; }
.floating-chat-launcher svg { width: 28px; height: 28px; }
.floating-chat-launcher:focus-visible, .floating-chat-popup button:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
.floating-chat-popup { position: fixed; z-index: 20; right: 16px; bottom: 16px; width: min(1100px, calc(100vw - 32px)); height: min(800px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid #334155; border-radius: 18px; overflow: hidden; background: #0f172a; box-shadow: 0 18px 64px #0009; }
.floating-chat-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid #334155; }
.floating-chat-head strong { white-space: nowrap; font-size: 14px; }
.floating-chat-head button { min-height: 36px; }
.floating-chat-connection { position: relative; flex: 0 0 18px; height: 28px; display: grid; place-items: center; border-radius: 6px; }
.floating-chat-connection:focus-visible { outline: 2px solid #facc15; outline-offset: 2px; }
.floating-chat-connection-dot { width: 10px; height: 10px; border: 2px solid #fbbf24; border-radius: 50%; }
.floating-chat-connection.is-connected .floating-chat-connection-dot { border-color: #22c55e; background: #22c55e; }
.floating-chat-connection.is-offline .floating-chat-connection-dot { border-color: #f87171; border-radius: 2px; background: #f87171; }
.floating-chat-connection:is(:hover, :focus-visible)::after { content: attr(title); position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; width: max-content; max-width: 180px; padding: 6px 8px; border: 1px solid #64748b; border-radius: 6px; background: #0f172a; color: #e2e8f0; font-size: 12px; pointer-events: none; }
.floating-chat-status-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.floating-chat-channels { display: flex; gap: 6px; margin-left: auto; }
.floating-chat-channels .is-active { background: #166534; border-color: #22c55e; color: #f0fdf4; }
.floating-chat-host, .floating-chat-host .content-section, .floating-chat-host .line-chat-workspace, .floating-chat-host .web-chat-workspace { min-height: 0; height: 100%; overflow: hidden; }
.floating-chat-host .content-section { padding: 0; animation: none; }
.floating-chat-host .line-chat-toolbar, .floating-chat-host .web-chat-toolbar { display: none; }
.floating-chat-host .line-chat-workspace, .floating-chat-host .web-chat-workspace { grid-template-rows: minmax(0, 1fr); gap: 0; }
.floating-chat-sync-icon, .floating-chat-room-back-label { display: none; }
.floating-chat-host .floating-chat-sync { flex: none; margin-left: auto; width: 30px; height: 30px; min-height: 30px; padding: 6px; font-size: 0; }
.floating-chat-host .floating-chat-sync :is(i, span) { display: none; }
.floating-chat-host .floating-chat-sync-icon { display: block; width: 16px; height: 16px; }
.floating-chat-host .chatbot-session-title, .floating-chat-host .web-chat-session-title { gap: 8px; }
.floating-chat-host .floating-chat-room-back-label { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; white-space: nowrap; }
.floating-chat-host .floating-chat-room-back-label svg { width: 14px; height: 14px; }
.floating-chat-host :is(.chatbot-mobile-back, .web-chat-mobile-back) { width: auto; min-height: 36px; padding: 6px; }
.floating-chat-host :is(.chatbot-mobile-back, .web-chat-mobile-back) > i { display: none; }
.floating-chat-host .web-chat-toolbar, .floating-chat-host .web-chat-console-panel { border-radius: 0; }
.floating-chat-enabled .sidebar.is-open { z-index: 25; }
@media (max-width: 680px) {
  .floating-chat-popup { right: 6px; bottom: max(6px, env(safe-area-inset-bottom)); width: calc(100vw - 12px); height: calc(100dvh - 12px - env(safe-area-inset-bottom)); border-radius: 12px; }
  .floating-chat-head { gap: 6px; padding: 6px 8px; }
  .floating-chat-head strong { font-size: 12px; }
  .floating-chat-head button { min-height: 36px; padding: 6px 9px; }
}
@media (max-width: 560px) {
  .floating-chat-host .web-chat-chat-header { grid-template-columns: auto minmax(0, 1fr) auto auto; }
}
